User guide
Page 226
Chapter 5. Option
[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
VA L 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
VA L * 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)
Expansion
condition
(AND · OR)
Input
condition
(I/O · Flag)
Command
Post
(Output port · Flag)
Command Operand 1 Operand 2
Optional Optional VAL Variable no. Column no.