
14-7
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
14.5 BCD to Double Integer
The BCD to Double Integer conversion instruction reads the contents
specified in the input parameter IN as a seven-digit number in binary coded
decimal format (BCD, " 9,999,999) and converts this number to a double
integer value. The output parameter OUT provides the result.
ENO and EN always have the same signal state.
If a place of a BCD number is in the invalid range of 10 to 15, a BCDF error
occurs during an attempted conversion.
S The CPU goes into the STOP mode. “BCD Conversion Error” is entered
in the diagnostic buffer with event ID number 2521.
S If OB121 is programmed, it is called. For more information on
programming OB121, see the Programming Manual /234/.
Certain restrictions apply to the placement of the BCD to Double Integer
conversion box (see Section 6.1).
Table 14-5 BCD to Double Integer Conversion Box and Parameters
LAD Box Parameter Data Type Memory Area Description
B
DDI
EN BOOL I, Q, M, D, L Enable input
_
EN ENO
ENO BOOL I, Q, M, D, L Enable output
IN OUT
IN DWORD I, Q, M, D, L Number in BCD format
OUT DINT I, Q, M, D, L Double integer value of BCD number
Status Word Bits
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
seven-digit number in BCD format and
converted to a double integer. The result is
stored in memory double word MD12. If the
conversion is not executed, the signal state
of output Q 4.0 is 1 (ENO = EN).
Q 4.0
BCD_DI
EN ENO
MD12INMD8
NOT
BR CC 1 CC 0 OV OS OR STA RLO FC
Write 1 – – – – 0 1 1 x
Function is executed (EN = 1):
OUT
Figure 14-5 BCD to Double Integer
Description
Move and Conversion Instructions
Kommentare zu diesen Handbüchern