
88
FM-3 Programming Module Reference Manual
Dwell For Time 1.000 ‘seconds
Loop
Wait For
This program flow instruction is used to halt program execution until an expression becomes
true. Once the expression becomes true the program continues on with the next line of code.
Logical tests (AND, OR, NOT) can be used in the Wait For instruction. However, “analog”
variable comparisons (MasterPosn>1000.000) cannot be used. Only sources
(DriveInput.1=ON, AtVel, etc.) can be used in a Wait For instruction.
Examples:
Wait For (ModuleInput.1=ON AND ModuleInput.2=OFF)
Index.0.Initiate
Wait For Index.AnyCommandComplete
If (ModuleInput.2=ON) Then ‘Jog+ when ModuleInput.2=ON
Jog.0.PlusInitiate ‘Vel=20in/s
Wait For ModuleInput.2=OFF ‘Stop when the input goes OFF
Jog.Stop ‘Decelerate to a stop
Endif
If (ModuleInput.3=ON) Then ‘Jog- when ModuleInput.3=ON
Jog.0.MinusInitiate ‘Vel=20in/s
Wait For ModuleInput.3=OFF ‘Stop when the input goes OFF
Jog.Stop ‘Decelerate to a stop
Endif
Wait For Time
This program instruction is used to halt program execution for a specified period of time. This
instruction is not a motion instruction and can be used while a motion instruction is executing.
Units: Seconds, Resolution: 0.001 seconds
A comment is automatically inserted after the “Wait For Time” instruction which notes that the
time is in units of seconds. The comment starts with the apostrophe ‘ character.
Examples:
Wait For Time 5.000 ‘seconds
Do While (TRUE) ‘Repeat until the program is halted
Index.1.Initiate ‘Incremental,Dist=25.250in,Vel=10.0in/s
Wait For AtVel
‘Turn Output 1 ON for 1 second, after the
‘index reaches its’ target velocity
DriveOutput.1=ON
Comentarios a estos manuales