Process Alarm Processing - Siemens SIMATIC S5 Equipment Manual

Digital position decoder ip 241 with fb 156/1 57 158
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

R 02/92

9.5.14 Process Alarm Processing

The interrupt processing for this example is programmed in organization block062.
Depending on the type of programmable controller used, the process interrupts are acquired via
the input byte 160 (with S5–150U/S, S5–155U in S5–150U mode) or via an interrupt line (with
S5–115U, S5–135U, and S5–155U in S5–155U mode).
At the start of an interrupt block, the scratchpad flags must be saved and reloaded prior to leaving
the block. With the S5– 155U this is accomplished with the standard function blocks FB 38 and FB
39. These function blocks are part of the standard function block package "basic functions".
Saving and reloading of the scratchpad flags must be performed for all types of interrupt–con-
trolled program processing (also in the organization blocks for restart and error evaluation). In
each case a different data area must be used. (This is taken into consideration in the example.)
Exception PLCS5-155U:
Function blocks FB 38 and FB 39 establish a stack in the data block, where the status of the
scratchpad flags and some system data words are stored. (Also stored are the system data RS 60
to RS 63, enabled for the user.) The data block can be set up to data wordDW816. Function blocks
FB 38 and FB 39 must be used in pairs under all circumstances (i.e., an organization block pro-
grammed with these blocks may not be left prematurely with the conditional block end BEC).
In interrupt processing organization block062, function block FB 12 (call FB 158) is activated for
indirect parameterization and program block PB 12 (call FB 157) for direct parameterization. The
track identifier bits are updated in both blocks with the "KB" command. Input bit 15.6 can be used
to choose between indirect (1 5.6 = "O") and direct parameterization (1 5.6 = "1 ").
Interrupt for end setpoint of track 4
The end setpoint of track 4 is supplied with an interrupt identifier. For this purpose the value of the
right data byte DR 30 in user data block DB 156 must be other than zero. This can be performed
with the programmer function "control variable". After parameterization via input 14.4, the screen
display appears as follows:
Direct parameterization (PB 12)
FD 134
KH – 00000572
KM – 0000000000000000
FW 132
FD 138
KH – 00000250
FD 142
KH – 00400350
@.SiemensA(31989, Order No.: 6ES5998-0KD21
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Programming Instructions
(Actual value)
(Track identifier bits)
(Initial setpoint track 4)
(End setpoint track 4)
9 – 57

Advertisement

Table of Contents
loading

Table of Contents