eBook: Integration and Automation of Manufacturing Systems
   



TOC PREV NEXT

10.15 LOGICAL FUNCTIONS


10.15.1 Comparison of Values

These functions act like input contacts. The equivalent to these functions are if-then statements in traditional programming languages.

Basic comparison functions in a PLC-5 include,

CMP(expression) - compares two values for equality
EQU(value,value) - equal
NEQ(value,value) - not equal
LES(value,value) - less than
LEQ(value,value) - less than or equal
GRT(value,value) - greater than
GEQ(value,value) - greater than or equal

The comparison function below compares values at locations A and B. If they are not equal, the output is true. The use of the other comparison functions is identical.



More advanced comparison functions in a PLC-5 include,

MEQ(value,mask,threshold) - compare for equality using a mask
LIM(low limit,value,high limit) - check for a value between limits

Examples of these functions are shown below.



TOC PREV NEXT

Search for More:

Custom Search