3. Instruction Set
The capture will be performed by the following rule:
‘a’
‘b’
‘c’
Hi-byte Lo-byte
‘A’
S+0
S+1
S+2
S+3
‘B’
‘C’
‘D’
0x00
S+4
S+5
S+6
S+7
‘a’
‘b’
‘c’
Hi-byte Lo-byte
0x00
D+0
D+1
D+2
D+3
n = k3
‘a’
‘b’
‘c’
Hi-byte Lo-byte
‘A’
S+0
S+1
S+2
S+3
‘B’
‘C’
‘D’
0x00
S+4
S+5
S+6
S+7
‘a’
‘b’
‘c’
Hi-byte Lo-byte
0x00
D+0
D+1
D+2
D+3
n = k3
K18: Convert data string to floating point value
Explanations:
The system converts n words (lower 8 bits) of the source data string (decimal point is not
included) to floating point value and stores the converted value in the destination device D. The
ending character 0x00 does not work in K18.
Points to note:
1. Operand n sets the number of total digits for the converted floating
value. Max 8 digits are applicable and the value over n digit will be
omitted. For example, n = K6, data string “123.45678” will be
converted to “123.456”.
2. When there are characters other than numbers 0~9 or the decimal
point in the source data string, the character before the decimal
point will be regarded as 0, and the value after the decimal point will
be regarded as the ETX. Thus if you put + or – before the number, it
will also be seen as 0.
3. If the source data string contains no decimal point, the converted
value will be displayed by a n-digit floating point value automatically.