
91
Programming
Example Programs
Out and Return - Simple
Description: Move out to an absolute position and return
Index.2.Initiate ‘Absolute,Posn=10.000in,Vel=5.0in/s
Index.1.Initiate ‘Absolute,Posn=0.000in,Vel=10.0in/s
Wait For Index.AnyCommandComplete
Out and Return – More Complex
Description: Home, Wait For an input, Move out to an absolute position, set an output, dwell
for 1 second, clear the output, return to home position, repeat the out and return sequence until
the stop input halts the program.
Home.0.InitiateHome.1.Initiate ‘Sensor,Offset=0.000in,Vel=-10.0in/s
ModuleOutput.1=ON ‘Set the “At Position 1” output
Do While (TRUE) ‘Repeat until the program is halted
Wait For ModuleInput.2=ON ‘Wait for the “Go” Input
ModuleOutput.1=OFF ‘Clear the “At Position 1” output
Index.2.Initiate ‘Absolute,Posn=10.000in,Vel=5.0in/s
Wait For InPosn
ModuleOutput.2=ON ‘Set the “At Position 2” output
Wait For Time 1.000 ‘Seconds
ModuleOutput.2=OFF ‘Clear the “At Position 2” output
Index.1.Initiate ‘Absolute,Posn=0.000in,Vel=10.0in/s
Wait For InPosn
ModuleOutput.1=ON ‘Set the “At Position 1” output
Loop
Punch a Hole in a Web a Specified Distance Beyond a Registration Mark
Description: Index a web to a position 2 inches beyond a registration mark. Then fire a solenoid
to punch a hole in the web. Wait for a sensor to indicate that the punch is in the down position.
Retract the solenoid. Wait until it is sensed in the up position.
Do While (TRUE) ‘Repeat until the program is halted
Index.0.Initiate ‘Registration,Offet=2.0in,Dist=20in,Vel=20in/s
Wait For InPosn
ModuleOutput.1=ON ‘Fire the punch solenoid
Wait For ModuleInput.2=ON ‘Wait for the “down” indicator
ModuleOutput.1=OFF ‘Retract the punch solenoid
Wait For ModuleInput.3=ON ‘Wait for the “up” indicator
Loop
Comentarios a estos manuales