Description
Use the instruction "Scan RLO for negative signal edge" to query a "1" to "0" change in the signal state of the result of logic operation (RLO). The instruction compares the current signal state of the RLO with the signal state of the previous query saved in the edge memory bit (<Operand>). If the instruction detects a change in the RLO from "1" to "0", there is a negative signal edge.
The negative signal edge is queried each time the instruction executes. As soon as a negative single edge is detected, the output Q of the instruction returns the signal state "1" for the length of a program cycle. In all other cases, the signal state at the output of the instruction is "0".
|
Note Modification of the address of the edge memory bit The address of the edge memory bit must not be used more than once in the program, otherwise the bit memory is overwritten. This would influence edge evaluation and the result would no longer be unequivocal. The memory area of the edge memory bit has to be located in a DB (static area for FB) or in the bit memory area. |
Parameters
The following table shows the parameters of the "Scan RLO for negative signal edge" instruction:
|
Parameter |
Declaration |
Data type |
Memory area |
Description |
|---|---|---|---|---|
|
CLK |
Input |
BOOL |
I, Q, M, D, L |
Current RLO |
|
<Operand> |
InOut |
BOOL |
M, D |
Edge memory bit in which the RLO of the previous query is saved. |
|
Q |
Output |
BOOL |
I, Q, M, D, L |
Result of edge evaluation |
Example
The following example shows how the instruction works:
The RLO of the preceding bit logic operation is saved in the edge memory bit "Tag_M". If a "1" to "0" change is detected in the signal state of the RLO, the program jumps to jump label CAS1.