4 DriveProgramming Editor
4 - 18
DriveProgramming User’s Manual (I622-E1)
4-4
Inserting, Deleting and Calling Subroutines
To insert a subroutine, select the tab of the task in which you want to insert a subroutine, and select
[New Tab] - [New Subroutine (flowchart)] or [New Subroutine (text)] in the toolbar of the DriveProgram-
ming Editor.
A new subroutine appears on the DriveProgramming Editor.
Similar to tasks, you can delete or rename a subroutine by right-clicking on its tab.
The subroutine name is displayed as "Task name: Subroutine name", next to the task name to which
the subroutine belongs.
All subroutines must begin with "sub" command, and finish with "endsub" command.
To execute a subroutine, specify the subroutine name in the "call" command.
It is only possible to call a subroutine that belongs to the task. Tasks cannot share the same subroutine.
To use a subroutine with multiple tasks, insert the same subroutine in each task.
Flowchart Text
Flowchart Text