6.18.4 How to call a subroutine
You can call a subroutine from the main program, another subroutine or
an interrupt routine;You can ’ t call the subroutine from the subroutine
itself.
In LAD, the subroutine generates a block instruction.You can call the
block instruction to call the subroutine.
Steps to call a subroutine:
1. In program edit window,place the cursor on the position where you want
to place the subroutine.
2. Instructions → Subroutine,then select the subroutine that you
need.Double click on it.
210
Made with FlippingBook - Online magazine maker