Redundant instruction
This is a redundant instruction. It is replaced by: FP_ENCODE
Encodes the contents of data specified by s according to the contents of n if the trigger EN is in the ON-state. The encoded result is stored in the 16-bit area specified by d starting with the specified bit position. Invalid bits in the area specified for the encoded result are set to 0.
Input
starting 16-bit area to be encoded (source)
control data to specify the starting bit position and number of bits to be encoded
Output
16-bit area for storing encoded data (destination)
Instead of using this F instruction, we recommend using the corresponding FP7 instruction: FP_ENCODEFP_ENCODE
n specifies the starting bit position of destination data d and the number of bits to be encoded using hexadecimal data:
Bit No. 0 to 3 |
number of bits to be encoded |
Bit No. 8 to 11 |
starting bit position of destination data to be encoded |
(The bits No. 4 through No. 7 and No. 12 through No. 15 are invalid.) |
The variables s, n and d have to be of the same data type.
Put at least one bit into the area to be checked to avoid an error message from the PLC.
When several bits are set, the uppermost bit is evaluated.