
14-8
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
14.6 Double Integer to BCD
The Double Integer to BCD conversion instruction reads the contents
specified in the input parameter IN as a double integer value and converts
this value to a seven-digit number in BCD format (" 9,999,999). The output
parameter OUT provides the result. If an overflow occurs, ENO is 0.
Certain restrictions apply to the placement of the Double Integer to BCD
conversion box (see Section 6.1).
Table 14-6 Double Integer to BCD Conversion Box and Parameters
LAD Box
Parameter Data Type Memory Area Description
DI B
D
EN BOOL I, Q, M, D, L Enable input
_
EN ENO
ENO BOOL I, Q, M, D, L Enable output
IN OUT
IN DINT I, Q, M, D, L Double integer number
OUT DWORD I, Q, M, D, L Result in BCD format
Status Word Bits
BR CC 1 CC 0 OV OS OR STA RLO FC
Write x – – x x x 1 x x
I 0.0
If the signal state of input I 0.0 is 1, the
conversion is executed. The contents of
memory double word MD8 is read as a
double integer and converted to a
seven-digit number in BCD format. The
result is stored in memory double word
MD12. If an overflow occurred, the signal
state of output Q 4.0 is 1. If the signal state
at input EN is 0 (that is, if the conversion is
not executed), the signal state of output
Q 4.0 is also 1.
Q 4.0
DI_BCD
IN
EN ENO
MD8 MD12
Function is executed (EN = 1):
NOT
OUT
Figure 14-6 Double Integer to BCD
Description
Move and Conversion Instructions
Comentarios a estos manuales