Mitsubishi Electric CR750-Q Instruction Manual page 327

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

XRun (X Run)
[Function]
This instruction executes concurrently the specified programs from within a program.It is used during
multitask operation.
[Format]
XRun[]<Slot No.> [, ["<Program Name>"] [, <Operation Mode>] ]
[Terminology]
<Slot No.>
<Program Name>
<Operation Mode> 0 = Continuous operation,
[Reference Program]
(1) When the program of execution is specified by XRun command (continuous executing).
1 XRun 2,"1"
2 Wait M_Run(2)=1
(2) When the program of execution is specified by XRun command (cycle operation)
1 XRun 3,"2",1
2 Wait M_Run(3)=1
(3) When the program of execution is specified by XLoad command (continuous executing).
1 XLoad 2, "1"
2 *L2
3 If C_Prg(2)<>"1" Then GoTo *L3
4 XRun 2
(4) When the program of execution is specified by XLoad command (cycle operation)
1 XLoad 3, "2"
2 *L2
3 If C_Prg(2)<>"1" Then GoTo *L2
4 XRun 3, ,1
[Explanation]
(1) An error occurs at execution if the specified program does not exist.
(2) If the designated slot No. is already in use, an error will occur at execution.
(3) If a program has not been loaded into a task slot, this instruction will load it. It is thus possible to operate
the program without executing the XLoad instruction.
(4) If XRun is executed in the "Pausing" state with the program stopped midway, continuous execution will
start.
(5) Designate the program name in double quotations.
(6) If the operation mode is omitted, the current operation mode will be used.
(7) If it is used in programs that are constantly executed, change the value from 0 to 7 in the ALWENA
parameter, and power ON the controller again.
(8) 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 both reference program (3)
and (4).
[Related instructions]
XClr (X
Clear),
XLoad (X
[Related parameter]
ALWENA
[Related system variables]
M_Run
(Slot number) (1: Executing, 0: Not executing)
Specify a slot number in the range from 1 to 32 as a constant or variable.
Designate the program name.
Specify with either the character string constant or character string variables.
1 = Cycle stop operation. If the operation mode is omitted, the current operation mode
will be used. Specify this argument using a constant or a variable.
' Start the program 1 with slot 2.
' Wait to have started.
' Start the program 2 with slot 3 in the cycle operation mode
' Wait to have started.
' Select the program 1 as the slot 2.
' Wait for load complete.
' Start the slot 2.
' Select the program 2 as the slot 3.
' Wait for load complete
' Start the program 1 with cycle operation.
Load),
XRst (X
Reset),
XStp (X Stop)
Detailed explanation of command words 4-307
4MELFA-BASIC V

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents