Siemens NAN 67 Series Manual de servicio Pagina 182

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 318
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 181
14-4
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
14.2 BCD to Integer
The BCD to Integer conversion instruction reads the contents specified in the
input parameter IN as a three-digit number in binary coded decimal format
(BCD, " 999) and converts this number to an 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 Integer conversion
box (see Section 6.1).
Table 14-2 BCD to Integer Conversion Box and Parameters
LAD Box Parameter Data Type Memory Area Description
BCD I
EN BOOL I, Q, M, D, L Enable input
BCD
_
I
EN ENO
ENO BOOL I, Q, M, D, L Enable output
EN
IN OUT
ENO
IN WORD I, Q, M, D, L Number in BCD format
OUT INT I, Q, M, D, L Integer value of BCD number
Status Word Bits
BR CC 1 CC 0 OV OS OR STA RLO FC
Write 1 0 1 1 x
I 0.0
If the signal state of input I 0.0 is 1, the
conversion is executed. The contents of
memory word MW10 is read as a
three-digit number in BCD format and
converted to an integer. The result is
stored in memory word MW12. If the
conversion is not executed, the signal
state of output Q 4.0 is 1 (ENO = EN).
Q 4.0
BCD_I
EN ENO
MW12INMW10
NOT
Function is executed (EN = 1):
OUT
Figure 14-2 BCD to Integer
Description
Move and Conversion Instructions
Vista de pagina 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 317 318

Comentarios a estos manuales

Sin comentarios