Bitwise Boolean instructions
553
Part III FP Instructions
For Relay T/C Register Const.
s1 WX WY WR WL SV EV DT LD FL -
s2, s3 WX WY WR WL SV EV DT LD FL dec. or hex
d - WY WR WL SV EV DT LD FL -
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
The filter processing time specified by
s3_FilterTime is less than 0 or greater
than 30000.
Operands
Error flags
Example
In this example, the same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
In this example, the input variables wInputData, wInputMask and iFilterTime are declared.
However, for wInputMask and iFilterTime, you can write a constant directly at the input contact of
the function instead. Additionally, the variable bStart is declared to start the filter function and the
variable wOutputData is declared for storing the result.
Body
The filtered bits will only be written to wOutputData after the filter time has elapsed (see LD
example). See time charts (see page 550) for a detailed explanation. wOutp
utdata has the value
16#A9B0 for 100ms, when this time has been elapsed wOutputData has the value 16#A9BC.
LD
ST
When programming with structured text, enter the following:
IF bStart Then
F182_FILTER(wInputData, wInputMask, iFilterTime, wOutputData);
End_If;