×

Subscribe to newsletter

subscribe to our weekly newsletter to get notified with latest story and article Subscribe now!




PLC BLOG | codesys comparison instrunction
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


codesys comparison instrunction

codesys comparison instrunction compare two inputs and if compariosn result true than set the boolean output true,comparisonperform between two same data type input variable. output is always boolean. Permitted data types any basic data type, depending on target system and compiler version. some of the follwoing codesys comparison instrunction


EQUAL TO comparison instrunction : EQ

This block compare both inputs variable if both inputs variable are equal so Boolean output set to true otherwise false.

codesys EQUAL TO comparison instrunction : EQ

    when EN set to true and value1 is equal to value2 output out_eq set to true, otherwise output false.


NOT EQUAL comparison instrunction : NE

This block used for comparing of not equal inputs. if inputs variable are not equal then Boolean output set to true otherwise false.

codesys EQUAL TO comparison instrunction : EQ

    when EN set to true and value1 is not equal to value2 output out_ne set to true, otherwise output false.


less then : LT

in less then comparison block,if first input variable is less then that of second inputs variable than Boolean output set to true otherwise false.

codesys less then comparison instrunction

    when EN set to true and value1 less then that of value2 output out_lt set to true, otherwise output false.


less then or equal to comparison instrunction : LE

A Boolean operator that returns the value TRUE when the value of the first input variable is less then or equal to that of the second input variable. If the first operand is less then or equal to the second operand, then the Boolean output set to true otherwise false.

codesys less then or equal to comparison instrunction

    when EN set to true and value1 less then or equal to value2 output out_le set to true, otherwise output false.


Greater than : GT

A Boolean operator that returns the value TRUE when the value of the first input variable Greater than the second input variable. If the first operand is Greater than the second operand, then the Boolean output set to true otherwise false.

codesys Greater than comparison instrunction

    when EN set to true and value1 Greater than value2 output out_le set to true, otherwise output false.


Greater than or equal to GE

A Boolean operator that returns the value TRUE when the value of the first input variable Greater than or equal to the second input variable. If the first operand is Greater than or equal to the second operand, then the Boolean output set to true otherwise false.

    when EN set to true and value1 Greater than or equal to value2 output out_le set to true, otherwise output false.


 
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Suggested Post


 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

comment