PMAC Product Guide DIS PLC 3,4,7 DISABLE PLC 0..31 ENABLE PLC Function : Enable specified PLC programs Scope : Global Syntax : ENABLE PLC {constant}[,{constant}] ENA PLC {constant}[,{constant}] ENABLE PLC {constant}..{constant} ENA PLC {constant}..{constant} where {constant} is an integer from 0 to 31, representing the program number. This command causes PMAC to enable (start executing) the specified PLC program or programs. PLC programs are specified by number and may be used singularly in this command, in a list (separated by commas), or in a range of consecutively numbered programs.
If a motion or PLC program buffer is open when this command is sent to PMAC, the command will be entered into that buffer for later execution. I-Variable I5 must be in the proper state to allow the PLC programs specified in this command to execute. Note: This command must be used to start operation of a PLC program after it has been entered or edited because the OPEN PLC command disables the program automatically, and CLOSE does not re-enable it. Examples: ENABLE PLC 1 ENA PLC 2,7 ENABLE PLC 3,21 ENABLE PLC 0..31 This example shows the sequence of commands to download a simple PLC program and have it enabled automatically on the download:
OPEN PLC 7 CLEAR P1=P1+1 CLOSE ENABLE PLC 7 F Function : Report motor following error Scope : Motor specific Syntax : F This command causes PMAC to report the present motor following error (in counts, rounded to the nearest tenth of a count) to the host. Following error is the difference between motor desired and measured position at any instant. When the motor is open loop (killed or enabled), following error does not exist and PMAC reports a value of 0. Examples: F ; Ask for following error of addressed motor 12 ; PMAC responds #3F ; Ask for following error of Motor 3 -6.7 ; PMAC responds Online Commands 161