Redundant instruction
This is a redundant instruction. It is replaced by: FP_DECODE
Decodes the contents of 16-bit data specified by s according to the contents of n if the trigger EN is in the ON-state. The decoded result is stored in the area starting with the 16-bit area specified by d.
Input
source 16-bit area or equivalent constant to be decoded
control data to specify the starting bit position and number of bits to be decoded
Output
starting 16-bit area for storing decoded data (destination)
Instead of using this F instruction, we recommend using the corresponding FP7 instruction: FP_DECODEFP_DECODE
n specifies the starting bit position and the number of bits to be decoded using hexadecimal data:
Bit No. 0 to 3: number of bits to be decoded
Bit No. 8 to 11: starting bit position to be decoded
(The bits No. 4 through No. 7 and No. 12 through No. 15 are invalid.)
e.g. when n = 16#0404, four bits beginning at bit position four are decoded.
Relationship between number of bits and occupied data area for decoded result:
Number of bits to be decoded |
Data area required for the result |
Valid bits in the area for the result |
---|---|---|
1 |
1-word |
2-bit* |
2 |
1-word |
4-bit* |
3 |
1-word |
8-bit* |
4 |
1-word |
16-bit |
5 |
2-word |
32-bit |
6 |
4-word |
64-bit |
7 |
8-word |
128-bit |
8 |
16-word |
256-bit |
*Invalid bits in the data area required for the result are set to 0.
The variables s, n and d have to be of the same data type.