PLC FUNCTIONS Part-3
In This Article we are going to see PLC FUNCTIONS Part-3 ( Compare , Data Transition , Equal , File Bit Compare and Diagnostic Detect , LIMIT , Masked Equal )
No : 1
CMP : (Compare)
Description
- This function use a free form expression to compare the Two values.
- The Comparison values that are allowed include = , > , >= , <> , < , <= .
- The expression must not be more than 80 characters long.
Status Bits : None
Registers : None
Available on : PLC-5
No : 2
DTR : (Data Transition)
Description
- This Function will examine the source value and mask out bits using the mask.
- The value will be compared to the Reference value, and if the values agree, then the function will be ture for one scan, after that it will be false.
Status Bits : None
Registers : None
Available on : Micrologix , PLC-5
No : 3
EQU : (Equal)
Description
- The basic compare has six variations.
- Each of these will look at the values in source A and B and check for the comparison case.
- If the comparison case is ture , the output will be ture , The types are,
- EQU - Equals
- GWQ - Greater than or equal
- GRT- Greater than
- LEQ - Less than or equals
- LES - Less than
- NEQ - Not equal
Status Bits : None
Registers : None
Available on : Micrologix , PLC-5
No : 4
FBC : (File Bit Compare)
DDT : (Diagnostic Detect)
Description
- This instruction will compare the bits in two files and store the positions of differences in a file.
- In this example the files compared when 'A' goes ture.
- Both file start at "B3:0' and 'B9:0' and 10 bits are to be compared.
- When differences are found the bit numbers will be stored in a list starting at 'N10:0' the list can have up to three values (integer words).
- The 'cmp control' word is for the list of differences.
- The 'Result Control' word is for the list of differences.
- The manual recommends clearing 'S:24' before running this instruction to avoid a possible processor fault.
- The DDT instruction is the same as the FBC instruction , except that when a different bit is found the source bit overwrites the reference bit.
- It is useful for storing a reference pattern for later use by a FBC.
Status Bits :
EN (Cmp) : Enable - enable when the instruction input is active
DN (Cmp) : Done - enable when the operation is complete
ER (Cmp) : error - set if an error occurred during the operation
IN )Cmp) : Inhibit - set when mismatch found , must be cleared to continue the comparison.
FD (Cmp) : Found - set when a mismatch is found
DN (Result) : Done - set when the result list is full
ER (Result) : Error - set if an error occurred with the results list.
Registers : None
Available on : Micrologix , PLC-5
No : 5
LIM : (LIMIT)
Description
- This function will check to see if a value is between two limits.
- If the high limit is larger than the low limit and the test value is >= low limit (or) <= high limit, then the output is ture.
- If the low limit is higher than the high limit , then a value not between the low and high limits will be ture.
Status Bits : None
Registers : None
Available on : Micrologix , PLC-5
Comments
Post a Comment