IEC 1131-3 Instructions
10-21
S7-200 Programmable Controller System Manual
A5E00066097-02
10.6 IEC Numerical Functions Instructions
Table 10-5 gives page references for the non-standard IEC Numerical Functions
instructions.
Table 10-5 Non-Standard IEC Numerical Functions Instructions
Description
Page
PID Instruction 9-87
Square Root
The Square Root instruction takes the square root of a
value provided by IN and places the result in OUT.
Error conditions that set ENO = 0: SM1.1 (overflow),
SM4.3 (run-time), 0006 (indirect address)
This function affects the following Special Memory bits:
SM1.0 (zero); SM1.1 (overflow); SM1.2 (negative)
If SM1.1 (overflow bit) is set, then the other math status
bits are cleared and the output operand is not altered.
Inputs/Outputs Operands Data Types
IN VD, ID, QD, MD, SMD, SD, LD, AC, Constant, *VD, *AC, *LD REAL
OUT VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *AC, *LD REAL
Natural Logarithm
The Natural Logarithm instruction performs the natural
logarithm of the value in IN and places the result in OUT.
Error conditions that set ENO = 0: SM1.1 (overflow),
0006 (indirect address)
This instruction affects the following Special Memory bits:
SM1.0 (zero); SM1.1 (overflow); SM1.2 (negative).
Inputs/Outputs Operands Data Types
IN VD, ID, QD, MD, SMD, SD, LD, AC, Constant, *VD, *AC, *LD REAL
OUT VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *AC, *LD REAL
L
A
D
F
B
D
SQRT
EN
IN OUT
ENO
222 224
✓✓✓
221 226
✓
L
A
D
LN
EN
IN OUT
ENO
F
B
D
L
A
D
224 226
✓✓
222221