Floating-point Math Instructions
Ladder Symbol
Variations
Applicable Program Areas
Operand Specifications
Description
FVAL(449)
S: First source word
S
D: First destination word
D
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Block program areas
OK
OK
FVAL(449) converts the specified ASCII text number (starting at word S) to a
32-bit floating-point number (IEEE754-format) and outputs the result to the
destination words starting at D.
FVAL(449) can convert ASCII text in decimal or scientific notation if it meets
the following conditions:
Up to 6 characters are valid, excluding the sign, decimal point, and exponent.
Any characters beyond the 6th character will be ignored.
• Decimal Notation
Real numbers expressed with an integer and fractional part.
Example: 124.56
• Scientific Notation
Real numbers expressed as an integer part, fractional part, and exponent
part.
Example: 1.2456E-2 (1.2456 10
The data format (decimal or scientific notation) is detected automatically.
The ASCII text must be stored in S and subsequent words in the following
order: leftmost byte of S, rightmost byte of S, leftmost byte of S+1, rightmost
byte of S+1, etc.
Decimal notation
Conversion of ASCII text number to
15
87
0
32-bit floating-point data
2D
20
20
31
32
33
2E
34
35
36
37
38
00
00
SP SP 1
2 3 . 4 5 6 7 8
(2D)(20)(20)(31)(32)(33)(2E)(34)(35)(36)(37)(38)
If there are more than 6 digits, the 7th
Spaces are
and higher digits are ignored.
ignored during
(Digits do not include the sign, decimal
conversion
point, and exponent characters.)
Step program areas
Subroutines
OK
-2
)
32-bit floating-point data
1 1 1 0 1 0 0 1 0 1 1 1 1 0 0 1
123.456
1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0
Sign
Exponent
15
D
1 1 1 0 1 0 0 1 0 1 1 1 1 0 0 1
D+1
1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0
Section 3-15
FVAL(449)
@FVAL(449)
Not supported.
Interrupt tasks
OK
Stored in D and D+1.
0
647
Need help?
Do you have a question about the SYSMAC CJ - REFERENCE MANUAL 01-2008 and is the answer not in the manual?
Questions and answers