Compare Instructions Equal - Allen-Bradley Micro800 General Instructions Manual

Programmable controllers
Hide thumbs Also See for Micro800:
Table of Contents

Advertisement

Chapter 10
Compare instructions
Equal
Parameter
EN
i1
i2
o1
260
Equal (=) compares the first input to the second input to determine equality for
Integer, Real, Time, Date, and String data types.
Recommendation: Using the Equal (=) operator
Equality testing of Time values is not recommended for TON, TP, and TOF
functions.
The Real data type is not recommended when comparing values for equality
because numbers in the math operation are rounded differently than those that
appear in the variable output display. Consequently, two output values may appear
equal in the display, but will still evaluate as false. For example, 23.500001
compared to 23.499999 will both display as 23.5 in the variable input display, but
will not be equal in the controller. For an alternative method to determine
equality, see the following topic.
Arguments
Parameter Type
Data Type
Input
BOOL
Input
BOOL - SINT - USINT - BYTE - INT -
UINT - WORD - DINT - UDINT - DWORD
- LINT - ULINT - LWORD - REAL - LREAL
- TIME - DATE - STRING
Input
BOOL - SINT - USINT - BYTE - INT -
UINT - WORD - DINT - UDINT - DWORD
- LINT - ULINT - LWORD - REAL - LREAL
- TIME - DATE - STRING
Output
BOOL
Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
Description
Function enable.
When Enable = TRUE, execute the equality comparison.
When Enable = FALSE, there is no comparison.
Applies only to LD programs.
All inputs must be the same data type.
The Time input applies to the ST, LD and FBD languages.
Note: The Real data type is not recommended.
TRUE if i1 = i2.

Advertisement

Table of Contents
loading

Table of Contents