EasyManua.ls Logo

Mitsubishi Electric CR750-Q - Page 258

Mitsubishi Electric CR750-Q
730 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4-238 Detailed explanation of command words
4MELFA-BASIC V
(4) If the argument is omitted from the system status variable requiring the mechanism designation, the cur-
rently acquired mechanism will be designated.
(5) If the program is stopped, RelM will be executed automatically by the system. When the program is
restarted, GetM will be executed automatically.
(6) This instruction cannot be used in a constantly executed program.
[Related instructions]
RelM (Release Mechanism)
GoSub (Return)(Go Subroutine)
[Function]
Calls up the subroutine at the designated step label. Be sure to return from the jump destination using the
Return instruction.
[Format]
[Terminology]
<Call Destination> Describe the step label name.
[Reference Program]
1 GoSub *LBL
2 End
:
20 *LBL
21 Mov P1
22 Return ' Be sure to use the Return instruction to return.
[Explanation]
(1) Make sure to return from the subroutine by using the Return command. If return by GoTo command, the
memory for control structure (stack memory) will decrease, and it will cause the error at continuous exe-
cuting.
(2) The call of other subroutines is possible again by the GoSub command out of the subroutine. This
approach can be employed approximately up to 800 times.
(3) When the step or label of the call place does not exist, it becomes the execution-time error.
[Related instructions]
Return (Return)
GoSub[]<Call Destination>

Table of Contents

Related product manuals