Siemens NAN 67 Series Manual de servicio Pagina 193

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 318
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 192
14-15
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
14.13 Round to Double Integer
The Round to Double Integer conversion instruction reads the contents
specified in the input parameter IN as a real number and converts this
number to a double integer, by rounding it to the nearest whole number. The
result is the nearest integer component (that is, the nearest whole number).
The output parameter OUT provides the result. If an overflow occurs, ENO
is 0.
Certain restrictions apply to the placement of the Round to Double Integer
conversion box (see Section 6.1).
Table 14-13 Round to Double Integer Box and Parameters
LAD Box Parameter Data Type Memory Area Description
R
OU
ND
EN BOOL I, Q, M, D, L Enable input
ROUND
EN ENO
ENO BOOL I, Q, M, D, L Enable output
IN OUT
IN REAL I, Q, M, D, L Value to round
OUT DINT I, Q, M, D, L IN rounded to nearest whole number
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 real
number and converted to a double integer.
The result of this round-to-nearest function 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
ROUND
IN
EN ENO
MD8 MD12
Function is executed (EN = 1):
NOT
OUT
Figure 14-13 Round to Double Integer
Description
Move and Conversion Instructions
Vista de pagina 192
1 2 ... 188 189 190 191 192 193 194 195 196 197 198 ... 317 318

Comentarios a estos manuales

Sin comentarios