
11-2
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
11.1 Add Integer
A signal state of 1 at the Enable (EN) input activates the Add Integer
instruction. This instruction adds inputs IN1 and IN2. The result can be
scanned at OUT. If the result is outside the permissible range for an integer,
the OV and OS bit of the status word are 1 and the ENO is 0.
Certain restrictions apply to the placement of integer math boxes (see
Section 6.1).
Table 11-1 Add Integer Box and Parameters
LAD Box Parameter Data Type Memory Area Description
EN BOOL I, Q, M, D, L Enable input
ADD_I
ENO BOOL I, Q, M, D, L Enable output
IN1 INT I, Q, M, D, L First value for addition
IN2 INT I, Q, M, D, L Second value for addition
OUT INT I, Q, M, D, L Result of addition
Status Word Bits
BR CC 1 CC 0 OV OS OR STA RLO FC
Write x x x x x x 1 x x
I 0.0
A signal state of 1 at input I 0.0 activates
the ADD_I box. The result of the addition
MW0 + MW2 is put into memory word
MW10. If the result is outside the
permissible range for an integer or the
signal state of input I 0.0 is 0, output Q 4.0
is set.
Q 4.0
ADD_I
IN2
EN ENO
MW2 MW10
IN1MW0
S
Function is executed (EN = 1):
NOT
OUT
Figure 11-1 Add Integer
Description
Integer Math Instructions
Kommentare zu diesen Handbüchern