F94_DIST

Redundant instruction

NOTE

This is a redundant instruction. It is replaced by: FP_DIVIDE_DIGITS

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.

Parameters

Input

s (WORD)

16-bit area or equivalent constant to be divided (source)

n (INT)

Specifies number of data to be divided

Output

d (WORD)

Starting 16-bit area for storing divided data (destination)

Remarks

Instead of using this F instruction, we recommend using the corresponding FP7 instruction: FP_DIVIDE_DIGITS

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:

  1.  (1) Source
  2.  (2) n: 4
  3.  (3) Bit position
  4.  (4) Value at s
  5.  (5) Destination
  6.  (6) Array [0] at d
  7.  (7) Array [1] at d
  8.  (8) Array [2] at d
  9.  (9) Array [3] at d
  10. (10) X0: ON

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if the area specified using the index modifier exceeds the limit

  • if the value at n³ 5 the last area for the result exceeds the limit

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if the area specified using the index modifier exceeds the limit

  • if the value at n³ 5 the last area for the result exceeds the limit

Related topics:

Modified on: 2019-01-24Feedback on this pagePanasonic hotline