User`s manual

7.0 - Troubleshooting Section
Page - 66
OPEN PROG 1 CLEAR ; Prepare buffer to be written
LINEAR ; Linear interpolation
INC ; Incremental mode
TA500 ; Acceleration time is 500 msec
TS0 ; No S-curve acceleration component
TM2000 ; Total move time is 500 + 2000=2500 msec
X1 ; One unit of distance, 2000 encoder counts
CLOSE ; Close written buffer, program one
4) To run it, press CTRL+A and then type B1R in the terminal window.
5) Repeat steps 2 through 4 for all the motors that you intend to run in your actual motion program.
A good method to test motion programs is to run them at lower than one hundred percent override rate. Any value for n
from 1 to 100 in the “%n” online command will run the motion programs slower, increasing the chances of success of
execution. For example, in the terminal window type: &1 %75 B1R
If a program run successfully at lower feedrate override values there could be mainly two reasons why it fails at 100%:
either there is insufficient calculation time for the programmed moves or the acceleration and\or velocity parameters
involved are unsuitable for the machine into consideration. Look for further details in the section entitled “PMAC Tasks”.
7.6 - PLC programs
PLCs and PLCCs are one of the most common sources for communication or watchdog timer failures.
- Any SEND, COMMAND, or DISPLAY action statement should be done only on an edge-triggered condition, because the
PLC can cycle faster than these operations can process their information, and the communications channels can get
overwhelmed if these statements get executed on consecutive scans through the PLC.
IF (M11=1) ; input is ON
IF (P11=0) ; input was not ON last time
COMMAND"#1J+" ; JOG motor
P11=1 ; set latch
ENDIF
ELSE
P11=0 ; reset latch
ENDIF
- PLC0 or PLCC0 are meant to be used for only a very few tasks (usually a single task) that must be done at a higher
frequency than the other PLC tasks. The PLC 0 will execute every real-time interrupt as long as the tasks from the
previous RTI have been completed. PLC 0 is potentially the most dangerous task on PMAC as far as disturbing the
scheduling of tasks is concerned. If it is too long, it will "starve" the background tasks for time. The first thing you will
notice is that communications and background PLC tasks will become sluggish. In the worst case, the watchdog timer
will trip, shutting down the card, because the housekeeping task in background did not have the time to keep it updated.
- Because all PLC programs in PMAC's memory are enabled at power-on/reset it is good practice to have I5 saved as 0
in PMAC's memory when developing PLC programs. This will allow you to reset PMAC and have no PLC's running
(an enabled PLC only runs if I5 is set properly) and more easily recover from a PLC programming error.
- As an example, type these commands in the terminal window. After that, open a “watch” window and monitor for P1
to be counting up:
OPEN PLC1 CLEAR ; Prepare buffer to be written
P1=P1+1 ; P1 continuously incrementing
CLOSE ; Close written buffer, PLC1
I5=2
Press <CTRL+D> and type ENA PLC1