Disable/Enable Interrupt - Siemens SIMATIC S5 Manual

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

S5-115F Manual
Example
Increment the hexadecimal constant
1010
by 16 and store the result in
H
data word DW 8.
In addition, decrement the
incrementation result by 33 and
store the new result in data word
DW 9.
3.2.8

Disable/Enable Interrupt

The disable/enable interrupt operations affect interrupt and time driven program scanning. They
prevent process or time interrupts from interfering with the processing of a sequence of state-
ments or blocks. Table 3-18 lists the disable/enable interrupt operations. An example follows the
table.
Operation
Operand
AS
AF
Processing
Execution of the disable/enable interrupt operations does not depend on the RLO. These
operations do not affect the RLO or the condition codes. After the "IA" statement is processed, no
more interrupts are executed. The "RA" statement cancels the effect of "IA".
EWA 4NEB 811 6149-02
C
L
I
T
D
T
Table 3-18. Disable/Enable Interrupt Operations
Disable interrupt
Enable interrupt
STL
DB 6
Call data block DB 6.
KH 1010
Load hexadecimal constant
1010
into ACCUM 1.
H
16
Increment the low byte of
ACCUM 1 by 16. The result,
1020
, is located in ACCUM 1.
H
DW 8
Transfer the contents of
ACCUM 1 (1020
DW 8. Since the incrementation
result is still in ACCUM 1, you can
decrement by 33 directly. The
result would be 0FFF
33
since the high byte of ACCUM 1 is
not decremented along with the
low byte, the result in ACCUM 1
is 10FF
H
DW 9
The contents of ACCUM 1 are
transferred to DW 9 (10FF
Meaning
STEP 5 Operations
Explanation
) to data word
H
. However,
H
.
).
H
3-53

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents