247
4
4 Instructions 4.6.4 Matrix Rotation and Shift
●
The total number of characters (max.: 24) is specied in [S2+1] based on the following rules:
Total number of characters ≥ 6 when the number of characters in the fractional part is equal to 0
Total number of characters ≥ Number of characters in the fractional part + 7 when the number of characters
in the fractional part is not 0
●
The number of characters in the fractional part specied in [S2+2] ranges from 0 to 7. Ensure that the
number of characters in the fractional part is not greater than the total number of characters minus 7.
◆
Errors
An operation error occurs in the following conditions. The error ag M8067 is set to ON to identify this error
and the error code is stored in D8067.
●
The value in [S1] is out of range. (Error code: K6706)
●
The value in [S2] is neither 0 nor 1. (Error code: K6706)
●
The total number of characters specied in [S2+1] is out of range. (Error code: K6706)
●
Decimal form
Total number of characters ≥ 2 when the number of characters in the fractional part is equal to 0
Total number of characters ≥ Number of characters in the fractional part + 3 when the number of characters
in the fractional part is not 0
●
Exponential form
Total number of characters ≥ 6 when the number of characters in the fractional part is equal to 0
Total number of characters ≥ Number of characters in the fractional part +7 when the number of characters
in the fractional part is not 0
●
The number of characters in the fractional part specied in [S2+2] is out of range. (Error code: K6706)
Decimal form: Number of characters in the fractional part ≤ Total number of characters – 3
Exponential form: Number of characters in the fractional part ≤ Total number of characters – 7
●
The elements from head address [D] for string storage are out of range. (Error code: K6705)
●
The number of characters contained in the conversion result exceeds the designated total number of
characters. (Error code: K6705)
◆
Application
When M100 = ON, the binary oating-point number in D0 and D1 is converted based on the content (decimal
form) of D10 to D12.The result is stored in elements from head address D20.
●
Before execution of the instruction
0
7
3
D10
D11
D12
Conversion form
D1 D0
0.032745
Total number of characters
Total number
of characters
0 .0 3 3
Number of characters
in the fractional part
Number of
characters in the
fractional part
20H (
space
)
2EH(.)
33H(3)
D20
D21
D22
b7-----b0
00H
D23
20H (
space
)
30H(0)
30H(0)
33H(3)
b15-----b8