EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #479 background imageLoading...
Page #479 background image
2-431
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Conversion Instructions
2
StringToFixNum
The format of the text sting in In is given below.
Example 1: The following example uses the sign, decimal point, and fractional part, but does not
use an exponent.
In = abc Out = def
‘83.5’ 16#0001462C
(10#83500)
‘334.5’ 16#00051AA4
(10#334500)
‘245.5’ 16#0003BEFC
(10#245500)
Name Format
Sign • Any consecutive blank characters (16#20) at the beginning of the text string are ignored. Any sin-
gle plus or minus sign that follows is treated as the sign.
• The sign can be omitted.
• Any consecutive blank characters after the sign are ignored.
Integer
part
• Consecutive numbers (‘0’ to ‘9’) after the sign and up to the decimal point are taken as the integer
part. The sign may sometimes be omitted. There may be blank characters between the sign and
the integer part.
• If the decimal point and fractional part are omitted, the characters up to the exponent are taken
as the integer part.
• If the decimal point, fractional part, and exponent are omitted, the characters up to the end of the
text string are taken as the integer part.
• The integer part cannot be omitted.
• The maximum number of digits in the integer part is the maximum text string length of 1986
minus the total number of bytes in the following: the sign, decimal point, fractional part, exponent,
and blank characters before and after the sign.
Decimal
point
• A single dot (‘.’) following the integer part is taken as the decimal point.
• Omit the decimal point if there is no fractional part.
Fractional
part
• Consecutive numbers (‘0’ to ‘9’) after the decimal point and up to the exponent are taken as the
fractional part.
• If the exponent is omitted, the characters up to the end of the text string are taken as the frac-
tional part.
• The fractional part can be omitted. If there is no decimal point, then there is no fractional part.
• The fractional part can consist of a maximum of 15 digits.
Exponent • The exponent consists of a single ‘e’ or ‘E’ after the fractional part, a following single plus or
minus sign, and the remaining continuous numbers (‘0’ to ‘9’) to the end of the text string.
• If there is no fractional part, then the above text string after the decimal point is taken as the expo-
nent.
• If there is no decimal point or fractional part, then the above text string after the integer part is
taken as the exponent.
• The exponent can be omitted.
• The numeric part of the exponent can consist of a maximum of three digits.
(Blank)
Exponent
Fractional part
Sign
Integer
part
(Blank)
- i i i i . f f f f f f f f e + n n
Decimal point
0001E240
In Out
+ 1 2 3 . 4 5 6 7
‘ ’

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals