Bitwise Boolean instructions
549
Part III FP Instructions
F94_DIST
16-bit data distribution
n specifies the number of data to be divided. The range of n is 0 to 4. When 0 is specified by n, this
instruction is not executed.
The programming example provided below can be envisioned thus:
·········
15
000
12
0
11
000
8
0
7
000
4
0
3
000
0
0
0000000000000001
·········
15
011
12
1
11
001
8
1
7
000
4
1
3
000
0
0
n: 4
00000000000000 1
0000000000000 1
1
11
Source
Destination
Bit position
Bit position
Value at s
Array[0] at d
X0: ON
Array[1] at d
Array[3] at d
Array[2] at d
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.
PLC types
Availability of F94_DIST (see page 1326)
Variable Data type Function
s WORD 16-bit area or equivalent constant to be divided (source)
n INT specifies number of data to be divided
d WORD starting 16-bit area for storing divided data (destination)
For Relay T/C Register Constant
s, n WX WY WR WL SV EV DT LD FL dec. or hex.
d - WY WR WL SV EV DT LD FL -
Description
Divides the 16-bit data specified by s into 4-bit units and distributes the divided data into the lower
4 bits (bit position 0 to 3) of 16-bit areas starting with d if the trigger EN is in the ON-state.
Data types
Operands