![Mitsubishi Electric CR750 Series Instruction Manual Download Page 324](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840324.webp)
4-304
Detailed explanation of command words
XClr (X Clear)
[Function]
This instruction cancels the program selection status of the specified task slot from within a program.
Enabling the execution of a new program in the specified task slot. 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.
[Reference Program]
1 XRun 2,"1"
' Executes the first program in task slot 2.
:
10 XStp 2
' Pauses the program of task slot 2.
11 Wait M_Wai(2)=1
' Waits until the program of task slot 2 pauses.
12 XRst 2
' Cancels the pause status of the program of task slot 2.
13 Wait M_Psa(2)=1
' Waits until selection of a program is possible in task slot 2.
14 XClr 2
' Cancels the program selection status of task slot 2.
15 End
[Explanation]
(1) An error occurs at execution if the specified slot does not select the program.
(2) If the designated program is being operating, an error will occur at execution.
(3) If the designated program is being pausing, an error will occur at execution.
(4) If this instruction is used within a constantly executed program, it becomes enabled by changing the
value of the "ALWENA" parameter from 0 to 7 and turning the controller's power off and on again.
[Related instructions]
,
,
[Related parameter]
ALWENA
XClr[]<Slot No.>