241
4
4 Instructions 4.6.4 Matrix Rotation and Shift
●
Elements from head address [D] for string storage are out of range. (Error code: K6705)
◆
Application
When M0 = ON, the 16-bit BIN number in D10 is converted to a string by inserting a decimal point at the
position collectively specied by D0 and D1. The result is stored in D20 to D23.
Data to be converted
D10
125
Total number of characters
D0
6
Number of characters
in the fractional part
D1
2
20H (space)
2EH (.)
35H (5)
D20
D21
D22
b7-----b0
31H (1)
32H (2)
0000H
D23
b15-----b8
20H (space)
"
ƶƶ
1.25"
VAL: Conversion from string to BIN format
◆
Overview
The VAL instruction converts ASCII-encoded strings to BIN numbers.
VAL S D1 D2
Conversion from
string to BIN format
Applicable model:
H3U
S
Converted
data
Start number of elements that store the string to be
converted
16-bit instruction (7
steps)
VAL: Continuous
execution
VALP: Pulse
execution
32-bit instruction
(13 steps)
DVAL: Continuous
execution
DVALP: Pulse
execution
D1
Character
count
Start number of elements that indicate the total
number of characters contained in the string, as well
as the number of characters in the fractional part
D2 Output
Number of the element that stores the BIN number
after conversion
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D2 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.