![Mitsubishi Electric CR750 Series Скачать руководство пользователя страница 325](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840325.webp)
Detailed explanation of command words
4-305
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]
[Terminology]
<Slot No.>
Specify a slot number in the range from 1 to 32 as a constant or variable.
<Program Name> Designate the program name. Specify with the character string constant. (The character
string variables cannot be used.)
[Reference Program]
1 If M_Psa(2)=0 Then *L1
' Checks whether slot 2 is in the program selectable state.
2 XLoad 2,"10"
' Select program 10 for slot 2.
3 *L3
4 If C_Prg(2)<>"10" Then GoTo *L3
' Waits for a while until the program is loaded.
5 XRun 2
' Start slot 2.
6 Wait M_Run(2)=1
' Wait to confirm starting of slot 2.
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 4'th step of the statement example.
[Related instructions]
,
,
[Related parameter]
ALWENA
XLoad[]<Slot No.> <Program Name>