Panasonic FP7 Series Command Reference Manual page 681

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

● The maximum number of characters after conversion for a single datum is 32. An operation
error occurs when it exceeds 32 characters.
● To directly specify a character constant for the operand [S1], enter the constant in the
"Instruction list" dialog box in the FPWIN GR7 programming tool.
Setting the control string [S1]
Specifies the conversion data type, number of characters, precision, etc. using the string data of
the following formats. A variety of options (such as inserting a sign or spaces) can also be
selected depending on the type of data to be converted. For details, see below.
Option setting (1)
0 : Zero padding
+ : A sign is added (plus sign)
␣: A space is inserted
- : Left align (default is right align)
# : Characters are added according to the
conversion data
Number of characters after conversion and the precision
Specify the total number of characters (n) and the number of
characters of precision (m) with [n.m], [n], or [.m]. The
number of characters of precision (m) changes according to
the type of conversion data
Type of data to be
converted
d , i , u , x , X , b
f
g
Setting the conversion method [N]
Conversion method [N] should be specified in a Hex format in the 32-bit area.
[N] =
Amount of data to be converted
H1 to H FFFF (1 to 65535)
Convert the data to hexadecimal and specify it here
Storage starting position
H0 to H FF (Conversion)
Specify the header where the converted character string is stored
from the relative position of the low byte of [D]. The round
numbers in the following diagram indicate the relative position.
The character string is stored from relative position ① for H00
and from relative position ② for H01.
H
[D]
[D+1]
[D+2]
[D+3]
WUME-FP7CPUPGR-12
[S1] =
"
%
Number of characters of precision (m)
represents the number of characters in
numerical strings.
represents the number of characters after the
decimal point.
represents the number of significant figures.
H
L
14.9 BTOA (Conversion: BIN → ASCII)
+
12.5
d
,
Type of data to be converted
d: Signed integer
u: Unsigned integer
x: Unsigned integer
b: BDC integer
f: Floating point real number → Floating point ASCII
e: Floating point real number → Exponential notation ASCII
g: Floating point real number → Floating point ASCII or
2
00
01
Conversion direction
H00: Forward direction
H01: Reverse direction
Specify a conversion direction. Forward direction can only
be specified for hexadecimal data (control string %x) or BCD
data (control string %b). For all other data formats, reverse
direction is specified (fixed).
[S2]
"
Option setting (2)
, : A comma is added
BCD : Postfix characters are added
H: Postfix characters are added
→ Decimal ASCII
→ Decimal ASCII
→ Hexadecimal ASCII
→ Hexadecimal ASCII
exponential notation ASCII
H 1234
Forward direction
[D]
H31
[D+1]
H33
Reverse direction
H32
[D]
[D+1]
H34
(Characters)
1 2
H32
3 4
H34
(Characters)
2 1
H31
4 3
H33
14-31

Advertisement

Table of Contents
loading

Table of Contents