EasyManua.ls Logo

Mitsubishi Electric Q172CPU - Conditional Branch Using Bit Device (ON, OFF)

Mitsubishi Electric Q172CPU
634 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...
7 - 184
7 MOTION PROGRAMS FOR POSITIONING CONTROL
7.16.33 Conditional branch using bit device (ON, OFF)
Code ON, OFF
Function
Bit device conditional
branch
By describing this command in the conditional expression of
IF or WHILE, branches processing according to the ON/OFF status of
the specified bit device.
Format
F
ON/OFF device (X, Y, M, B, F)
IOO[GT1] ;ON #M
1
00
ON/OFF command (describe OFF for OFF)
*Conditional expression of IF THEN or WHILE can also be described similarly.
[Explanation]
(1) The ON/OFF status of the specified bit device is judged by the ON/OFF command
to see if it is true (1) or false (0).
By using this command in the conditional expression of IF or WHILE, a conditional
branch can be made with a bit device.
When used with a logical operator, this command enables a conditional branch
with multiple bit devices.
(2) [ ] of the conditional expression can be five levels deep including [ ] of a function.
An operational expression may be described in up to 72 characters in all. (Up to
the maximum number of characters in one block)
<When "ON" is specified>
IF [ON #M100] GOTO1 ;
When M100 is ON, the result is true (1) and a branch to N01 is taken.
When M100 is OFF, the result is false (0) and the next block is executed.
<When "OFF" is specified>
IF [OFF #M100] GOTO1 ;
When M100 is ON, the result is false (0) and the next block is executed.
When M100 is OFF, the result is true (1) and a branch to N01 is taken.
<When used with logical operator>
IF [ [ON #M100] AND [ON #M110] ] GOTO1 ;
When M100 is ON and M110 is ON, a branch to N01 is taken.
If either of them is OFF, the next line is executed.
(3) The device that may be specified after the ON/OFF command is the bit device
only.
If a word device is specified, a "Format error" (error code : 560) occurs.
(4) The bit devices usable in the ON/OFF command are X, Y, M, B and F.
(5) The ON/OFF command is available for the conditional expressions of the program
control functions (IF GOTO, IF THEN, WHILE).

Table of Contents

Other manuals for Mitsubishi Electric Q172CPU

Related product manuals