F80_BCD

Redundant instruction

NOTE

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

Converts the 16-bit binary data specified by s to the BCD code that expresses 4-digit decimals if the trigger EN is in the ON-state. The converted data is stored in d. The binary data that can be converted to BCD code are in the range of 0 (0 hex) to 9999 (270F hex).

Example

  1.  (1) Source [s]: 16
  2.  (2) Bit position
  3.  (3) Binary data
  4.  (4) Decimal
  5.  (5) Conversion (to BCD code)
  6.  (6) Destination [d]: 16#16 (BCD)
  7.  (7) BCD Hex code

Parameters

Input

s (WORD, INT, UINT)

binary data (source), range: 0 to 9999

Output

d (WORD)

16-bit area for 4-digit BCD code (destination)

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if 16-bit binary data outside the range of 0 (16#0) to 9999 (16#270F) is converted

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if 16-bit binary data outside the range of 0 (16#0) to 9999 (16#270F) is converted

Related topics:

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