EasyManuals Logo

Mitsubishi MELSEC System Q User Manual

Mitsubishi MELSEC System Q
170 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
Page #154 background imageLoading...
Page #154 background image
6.3 Compare Instructions
Checking the status of bit devices like inputs and relays can be achieved with basic logic
instructions because these devices can only have two states, “0” and “1”. However, you will
also often want to check the contents of word devices before doing something for example
switching on a cooling fan when a specified setpoint temperature is exceeded.
To achieve this an output instruction or an logical operation can be made conditional on the
result of a compare instruction. In addition to the compare instructions described here the PLC
CPUs of the MELSEC System Q can compare also floating decimal point values, binary block
data and character strings.
For comparisons MELSEC and IEC instructions are available.
Comparison at the beginning of a logic operation
Compare condition
First value to be compared
Second value to be compared
If the condition evaluates true the signal state after the comparison is set to “1”.A signal state of
“0” shows that the comparison evaluated as false. In the above example the relay M10 is set
when the contents of data register D40 is greater than or equal to the contents of data register
D50.
The following comparisons are possible:
Compare for "equals": = (value1=value2)
IEC instruction: EQ (
Equal
)
The output of the instruction is only set to "1" if the values of both devices are identical.
Compare for "greater than": > (value1>value2)
IEC instruction: GT (
Greater Than
)
The output of the instruction is only set to "1" if the first value is greater than the second value.
Compare for "less than": < (value1<value2)
IEC instruction: LE (
Less Than
)
The output of the instruction is only set to "1" if the first value is smaller than the second value.
Compare for "not equal": <> (value 1 <> value 2)
IEC instruction: NE (
Not Equal
)
The output of the instruction is only set to "1" if the two values are not equal.
Compare for "less than or equal to": <= (value 1 value 2)
IEC instruction: LE (
Less Equal
)
6–22 MITSUBISHI ELECTRIC
Compare Instructions More Advanced Programming
Ladder Diagram
MELSEC Instruction List
LD>= D40
D50
OUT M10
IEC Instruction List
LD TRUE
LD_GE_M D40, D50
ST M10
This instruction is equivalent to the "wiring" of
the EN input in the Ladder Diagram. "TRUE"
means that the input condition is always
fulfiled.

Table of Contents

Other manuals for Mitsubishi MELSEC System Q

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC System Q and is the answer not in the manual?

Mitsubishi MELSEC System Q Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC System Q
CategoryController
LanguageEnglish

Related product manuals