Fval - Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual

Table of Contents

Advertisement

3. Instructions

FVAL

Instruction
ASCII TO FLOATING-POINT
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
S
First source word
D
First destination word
Operand Specifications
Word addresses
Area
CIO
WR
HR
S
OK
OK
OK
D
Flags
Name
Error Flag
Equals Flag
Function
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
508
Mnemonic
Variations
FVAL
@FVAL
FVAL(449)
Block program areas
Step program areas
OK
OK
Description
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
P_ER
• ON if the digits (integer and fractional parts) in the source data starting at S are not 30 to 39 hex (0 to
9).
• ON if the first two digits of the exponential part do not contain 45 and 2B hex (E+) or 45 and 2D hex
(E-). in the source data starting at S are not 30 to 39 hex (0 to 9).
• ON if there are two or more exponential parts in the source data.
• ON if the data is +o or -o after conversion.
• ON if there are 0 characters in the text data.
• ON if a byte containing 00 hex is not found within the first 25 characters.
• OFF in all other cases.
P_EQ
• ON if the conversion result is 0.
• OFF in all other cases.
Function
code
Converts a number expressed in ASCII text (deci-
mal or scientific notation) to a 32-bit floating-point
449
value (IEEE754-format) and outputs the floating-
point value to the specified words.
FVAL
S
S: First source word
D
D: First destination word
Subroutines
OK
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
---
---
Operation
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
SFC action or
Interrupt tasks
transition programs
OK
OK
Data type
Size
UINT
Variable
REAL
2
Registers
Pulse
TK
CF
bits
Indirect
IR
using IR
---
OK
---
---
TR
bits
---
---

Advertisement

Table of Contents
loading

Table of Contents