7-300
LOG10(P)
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns on, and an
error code is stored into SD0.
• The value specified by is negative. (Error code: 4100)
• The value specified by is 0. (Error code: 4100)
• The value of the specified device is not in the following range. (Error code: 4140)
0,2
-126
| value of specified device | < 2
128
• The value specified by is 0. (Error code: 4140)
• The value resulted from the operation is within the range shown below.
(When an overflow occurs): (Error code: 4141)
2
128
| value of specified device |
Program Example
(1) The following program obtains the value for common logarithm of the 32-bit floating-point
data type real number specified by D600 or D601, when X10 is turned on. Then the program
stores the operation result into D123 or D124.
[Ladder Mode] [List Mode]
[Operation]
S
S
S
Step
Instruction
Device
Log10
D601 D600
2.806
D124 D123
0.448088