Download Print this page

Calculating The Common Logarithm Of Single-Precision Real Number - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Calculating the common logarithm of single-precision real
number
LOG10(P)/DLOG10(P)
These instructions calculate the common logarithm (the logarithm whose base is 10) of a value specified by (s), and store the
operation result in the device specified by (d).
The LOG10(P) instructions can also be used as DLOG10(P).
Ladder diagram
(s)
(d)
FBD/LD
EN
ENO
s
d
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Data whose common logarithm is calculated or head device
number where the data is stored
(d)
Head device number for storing the operation result
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
Processing details
• These instructions calculate the common logarithm (the logarithm whose base is 10) of a value specified by (s), and store
the operation result in the device specified by (d).
log
(
(s)+1
(s)
)
10
Single-precision real number
• Only a positive value can be set in (s). (The common logarithm operation cannot be executed for a negative value).
• The table below shows the related devices.
Device
Name
SM700
Carry
SM8020
Zero
SM8021
Borrow
SM8022
Carry
Word
T, ST, C, D, W,
U\G
SD, SW, R
(d)+1
(d)
Single-precision real number
Description
Condition
The absolute value of the operation result  2
The operation result is true "0".
(The mantissa part is "0").
The absolute value of the operation result < 2
The absolute value of the operation result  2
Structured text
ENO:=LOG10(EN,s,d);
ENO:=LOG10P(EN,s,d);
Range
Data type
Single-precision real number
Single-precision real number
Bit
Bit
Double word Indirect
specification
Z
LC
LZ
Operation
128
The value of (d) is the maximum value (2
numbers and the carry flag SM700 turns on.
The zero flag SM8020 turns on.
-126
The value of (d) is the minimum value (2
numbers and the borrow flag SM8021 turns on.
128
The value of (d) is the maximum value (2
numbers and the carry flag SM8022 turns on.
Data type (label)
ANYREAL_32
ANYREAL_32
BOOL
BOOL
Constant
Others
K, H
E
$
128
) of 32-bit real
-126
) of 32-bit real
128
) of 32-bit real
8 APPLICATION INSTRUCTION
8.9 Real Number Instruction
8
539

Hide quick links:

Advertisement

loading