Arithmetic instructions
407
Part III FP Instructions
Variable Data type Function
s1 WORD dividend, 16-bit area for BCD data or 4-digit BCD equivalent
constant
s2 WORD divisor, 16-bit area for BCD data or 4-digit BCD equivalent constant
d WORD quotient, 16-bit area for BCD data (remainder stored in special data
register DT9015/DT90015)
For Relay T/C Register Constant
s1, s2 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
R900B %MX0.900.11 for an instant the result calculated is 0.
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.
LD
ST
IF start THEN
F52_BDIV(dividend, divisor, output_value);
END_IF;