Chapter 4. programming – IAI America S-SEL-E User Manual
Page 188
![background image](/manuals/350298/188/background.png)
Page 183
Chapter 4. Programming
[Function]
Converts the decimal data in the column in Operand 2 to a binary number and assigns this to the variable in
Operand 1.
The length set by the SLEN command will be converted.
[Example]
SCPY
10
' 1234'
SLEN
4
VAL
1
10
Set ' 1234' in column 10.
Set the length to 4 bytes.
' 1234' in column 10 is converted to the binary number 1234 and assigned to variable 1.
LET
1
100
LET
2
20
SCPY
20
' 1234'
SCPY
24
'. 567'
SLEN
8
VAL
*1
*2
Assign 100 to variable 1.
Assign 20 to variable 2
Copy ' 1234' to column 20.
Copy '. 567' to column 24.
Set the length to 8 bytes.
' 1234. 567' in column 20 (content of variable 2) will be converted to the binary number 1234. 567 and
assigned to variable 100 (content of variable 1).
VAL (Character String Change Data Decimal)
E x p a n s io n
c o n d itio n
(A N D · O R )
In p u t
c o n d itio n
(I/O · F la g )
C o m m a n d
P o s t
(O u tp u t p o rt · F la g )
C o m m a n d
O p e ra n d 1
O p e ra n d 2
O p tio n a l
O p tio n a l
VA L
Va ria b le n o .
C o lu m n n o .