LOG
LOG, LOGP
LOG instruction computes the log base 10 of the source and saves the result to the Destination.
(It supports only in XP and PLC-S CPU series)
| |
S | Source |
D | Destination |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
LOG LOGP | S | o | o | o | o | o | - | - | - | - | o | o | o | - | 3 | o | - | - |
D | o | - | o | o | o | - | - | - | - | o | o | o | - |
When enabled, the LOG instruction calculates the log base 10 of source and saves the result in Destination.
The source must be greater than zero.
Example)
If M00 is ON, MOV instruction copies 10 to D80.
The FLT instruction converts D80 to float value and saves its result to D90.
The LOG instruction calculates the log of D90 and saves its result in D80.