Comparison instructions
616
Part III FP Instructions
F373_DTR
16-bit data revision detection
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
PLC types
Availability of F373_DTR (see page 1325)
The status of the carry flag is updated at each execution of the instruction.
Therefore, programs that use the carry flag should utilize it immediately after
F373_DTR is executed.
Variable Data type Function
s 16-bit area for detecting data changes
d
ANY16
area where data of previous execution is stored.
For Relay T/C Register Constant
s WX WY WR WL SV EV DT LD FL -
d - WY WR WL SV EV DT LD FL -
No. IEC address Set If
R9009 %MX0.900.9 to TRUE the input value at s has changed in
comparison to the former value.
Description
The function detects changes in a value at input s by comparing it with its former value that is
stored at output d. If the new input value at s does not coincide with the old value, the function
assigns the new value to output d. To signal the change, the carry flag R9009 is set
simultaneously.
Data types
Operands
Error flags
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable start is set to TRUE, the function is carried out. If the input value present_value
has changed in comparison to the output value old_value the carry flag R9009 is set. The status of
the carry flag is then assigned to the variable changed_value.