458
7 APPLICATION INSTRUCTION
7.7 Real Number Instruction
Calculating the exponentiation of single-precision real number
POW(P)
These instructions raise float (single precision) data stored in a device specified by (s1) by the single-precision real number
specified by (s2), and store the operation result in a device specified by (d).
■Descriptions, ranges, and data types
■Applicable devices
• These instructions raise float (single precision) data stored in a device specified by (s1) by the single-precision real number
specified by (s2), and store the operation result in a device specified by (d).
• Values in the devices specified (stored) by (s1) and (s2) should be 0 or 2
-126
|specified value (stored value)| <2
128
.
• When the operation result is -0 or underflow occurs, the operation result is regarded as 0.
• When the operation result is within the following range, the operation result is regarded as 2
128
, and the carry flag SM716
turns on.
• When an input value is set from the engineering tool, a rounding error may be occur.
Ladder diagram Structured text
ENO:=POW(EN,s1,s2,d);
ENO:=POWP(EN,s1,s2,d);
Operand Description Range Data type Data type (label)
(s1) Data to be raised, or head device number which stores such
data
0, 2
-126
|(s1)|<2
128
Single-precision real number Single-precision real number
(s2) Power data, or head device number which stores such data 0, 2
-126
|(s2)|<2
128
Single-precision real number Single-precision real number
(d) Head device number for storing the operation result Single-precision real number Single-precision real number
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s1)
(s2)
(d)
2
128
|operation result|
(s2)+1 (s2)
(s1)+1 (s1)
(s1)+1 (s1)
(d)+1 (d)
(s2)+1 (s2)
Single-precision real number
Single-precision real number
Data to be raised
Power data
to th power.The instruction raises