Chapter 4. programming – IAI America S-SEL-E User Manual
Page 189
![background image](/manuals/350298/189/background.png)
Page 184
[Function]
Sets the length for the string command.
The length must be set prior to using any of the following commands.
SCMP
· · ·
Decimals Invalid
SCPY
· · ·
Decimals Invalid
IS
XX
· · ·
Decimals Invalid
STRH
· · ·
Decimals Invalid
VAL, VALH
· · ·
Decimals Invalid
STR
· · ·
Decimals Valid
[Example]
Refer to each of the commands above.
SLEN (Set Length)
Chapter 4. Programming
[Function]
Converts the hexadecimal 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. Only the integers will be converted and the decimal
places will be disregarded.
[Example]
SCPY
10
' 1234'
SLEN
4
VAL
1
10
Set ' 1234' in column 10.
Set the length to 4 bytes.
The hexadecimal number ' 1234' in column 10 is converted to the binary number 4660 and assigned
to variable 1.
LET
1
100
LET
2
20
SCPY
20
' ABCD'
SLEN
4
VALH
*1
*2
Assign 100 to variable 1.
Assign 20 to variable 2
Copy ' ABCD' to column 20.
Set the length to 4 bytes.
The hexadecimal ' ABCD' in column 20 (content of variable 2) will be converted to the binary number
43982 and assigned to variable 100 (content of variable 1).
VALH (Character String Data Change Hexadecimal)
E x p a n s i o n
c o n d i t i o n
( A N D · O R )
I n p u t
c o n d i t i o n
( I / O · F l a g )
C o m m a n d
P o s t
( O u t p u t p o r t · F l a g )
C o m m a n d
O p e r a n d 1
O p e r a n d 2
O p t i o n a l
O p t i o n a l
S L E N
L e n g t h
E x p a n s io n
c o n d it i o n
( A N D · O R )
I n p u t
c o n d it i o n
( I / O · F l a g )
C o m m a n d
P o s t
( O u t p u t p o r t · F l a g )
C o m m a n d
O p e r a n d 1
O p e r a n d 2
O p ti o n a l
O p ti o n a l
V A L H
V a r ia b le n o .
C o l u m n n o .