Chapter 6 Basic Instructions; Comparison Operation Instructions; Comparing 16-Bit Binary Data - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

6
BASIC INSTRUCTIONS
6.1

Comparison Operation Instructions

Comparing 16-bit binary data

LD(_U), AND(_U), OR(_U)
RnPCPU
RnCPU RnENCPU
(Process)
These instructions compare the two sets of 16-bit binary data specified. (Devices are used as normally open contacts.)
Ladder
LD
AND
OR
( is to be replaced by any of the following: =(_U), <>(_U), >(_U), <=(_U),
<(_U), >=(_U).)
FBD/LD
EN
ENO
s1
s2
( is to be replaced by combination of any of the following: LD_, AND_, OR_ and EQ(_U), NE(_U), GT(_U), LE(_U), LT(_U), GE(_U).)
*1 The engineering tool with version "1.035M" or later supports the ST.
*2 EQ indicates =, NE indicates <>, GT indicates >, LE indicates <=, LT indicates <, and GE indicates >=.
■Execution condition
Instruction
LD(_U), AND(_U), OR(_U)
Setting data
■Description, range, data type
Operand
(s1)
LD, AND, OR
LD_U, AND_U,
OR_U
(s2)
LD, AND, OR
LD_U, AND_U,
OR_U
EN
ENO
• In safety programs executed by the Safety CPU, only safety devices and safety labels of data types described in the table
can be used.
6 BASIC INSTRUCTIONS
218
6.1 Comparison Operation Instructions
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
(s1)
(s2)
(s1)
(s2)
(s1)
(s2)
Execution condition
Every scan
Description
Comparison data or the device where
comparison data is stored
Comparison data or the device where
comparison data is stored
Execution condition
Execution result
*1
ST
ENO:=LD_(EN,s1,s2);
ENO:=AND_(EN,s1,s2);
ENO:=OR_(EN,s1,s2);
( is replaced by any of the following: EQ, NE, GT, LE, LT, GE.)
Range
Data type
-32768 to 32767
16-bit signed binary
0 to 65535
16-bit unsigned binary
-32768 to 32767
16-bit signed binary
0 to 65535
16-bit unsigned binary
Bit
Bit
ENO:=LD__U(EN,s1,s2);
ENO:=AND__U(EN,s1,s2);
ENO:=OR__U(EN,s1,s2);
*2
*2
Data type (label)
ANY16_S
ANY16_U
ANY16_S
ANY16_U
BOOL
BOOL

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents