Mitsubishi MELFA CR1D Instruction Manual page 271

Table of Contents

Advertisement

XLoad (X Load)
[Function]
This instruction commands the specified program to be loaded into the specified task slot from within a pro-
gram.
It is used during multitask operation.
[Format]
XLoad[]<Slot No.> <Program Name>
[Terminology]
<Slot No.>
<Program Name> Designate the program name.
[Reference Program]
1 If M_Psa(2)=0 Then *L1
2 XLoad 2,"10"
3 *L3
4 If C_Prg(2)<>"10" Then GoTo *L3
5 XRun 2
6 Wait M_Run(2)=1
7 *L1
8 ' When the slot 2 is already operating, execute from here.
[Explanation]
(1) An error occurs at execution if the specified program does not exist.
(2) If the designated program is already selected for another slot, an error will occur at execution.
(3) If the designated program is being edited, an error will occur at execution.
(4) If the designated program is being executed, an error will occur at execution.
(5) Designate the program name in double quotations.
(6) If used in a program that is executed constantly, this instruction is enabled by changing the value of the
"ALWENA" parameter from 0 to 7 and then turning the controller's power on again.
(7) If XRun is executed immediately after executing XLoad, an error may occur while loading a program. If
necessary, perform a load completion check as shown on the 3rd step of the statement example.
[Related instructions]
XClr (X
Clear),
XRst (X
[Related parameter]
ALWENA
Specify a slot number in the range from 1 to 32 as a constant or variable.
' Checks whether slot 2 is in the program selectable state.
' Select program 10 for slot 2.
' Waits for a while until the program is loaded.
' Start slot 2.
' Wait to confirm starting of slot 2.
Reset),
XRun (X
Run),
XStp (X Stop)
Detailed explanation of command words 4-258
4MELFA-BASIC IV

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents