Panasonic FP Series Programming Manual page 658

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

F90_DECO
Decodes the contents of 16-bit data specified by s according to the contents of n if the trigger EN is
Description
in the ON-state. The decoded result is stored in the area starting with the 16-bit area specified by
d.
n specifies the starting bit position and the number of bits to be decoded using hexadecimal data:
Bit No. 0 to 3:
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
1
2
3
4
5
6
7
8
*Invalid bits in the data area required for the result are set to 0.
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
Availability of F90_DECO (see page 1326)
PLC types
Data types
Variable
Data type
s
n
ANY16
d
The variables s, n and d have to be of the same data type.
Decode hexadecimal -> bit state
number of bits to be decoded
Data area required for
the result
1-word
1-word
1-word
1-word
2-word
4-word
8-word
16-word
Function
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
starting 16-bit area for storing decoded data (destination)
Valid bits in the area for
the result
2-bit*
4-bit*
8-bit*
16-bit
32-bit
64-bit
128-bit
256-bit
Conversion instructions
657

Advertisement

Table of Contents
loading

Table of Contents