Move - subroutine – Yaskawa MotionWorks+ Windows Software User Manual

Page 195

Advertising
background image

MotionWorks+™

Standardized Template Project

189

Move - Subroutine

The move subroutine is simply a relative move, which incorporates a programmable limit
switch (PLS) block and a couple of timers. This subroutine differs slightly from the others
in that there is no event that locks it in the subroutine. Once the move is complete and the
timers have timed out, the subroutine ends and execution is returned to the main program.
If the input (input 5) that calls the subroutine is left on, the subroutine will be executed
again (and again).

The SET VARIABLE block (3) activates output 5, and the corresponding block (7) deacti-
vates the output making the output correspond to an “in motion” indicator. The next
block, TIMER (8) creates a delay by the user variable [MoveDelay]. SET VARIABLE
block (9) deactivates any outputs that may be left on from the PLS. Execution continues
to another TIMER block, with the same user variable as the earlier TIMER block.

Advertising