EasyManuals Logo

Siemens Simatic SM331 User Manual

Siemens Simatic SM331
78 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #43 background imageLoading...
Page #43 background image
Configuration of the SIMATIC Manager
6.3 STEP 7 user program
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
6-3
6.3 STEP 7 user program
6.3.1 Tasks of the user program
Overview
In our example, the sensor values are stored in a data block. Also, the hardware interrupt
status should be stored in a marker word. It should be possible to acknowledge the status
information by means of a bit.
Furthermore, the channel values (values of the input words) should be stored in another data
block.
The following tasks have to be performed in the user program:
Cyclical storage of the analog input values in a data block (DB1)
Cyclical conversion of the analog input values in floating point values (FC1) and storage
in a data block (DB2)
Acknowledgement of the hardware interrupt status when the acknowledge marker
(M200.0) is TRUE.
Save the status in a marker word (MW100) when a hardware interrupt occurs.
The structure of the user program is depicted in the following table:
Call type Responsible
organization block
Task to be programmed Used block or marker
Cyclic
execution
OB1 Save analog input
values
DB1
Convert and store the
sensor values
FC1, DB2
Acknowledge hardware
interrupt
M200.0
Hardware
interrupt
triggered call
OB40 Save status MW100
Diagnostic
interrupt
triggered call
OB82 Has to be implemented
because a module with
diagnostic capabilities
is used
---
About OB82
OB82 is used for modules with diagnostic capabilities. If the diagnostic alarm is enabled for
such modules, OB82 requests for diagnoses when a failure is detected (incoming and
outgoing events). The operating system then calls OB 82.
In our example, we use OB82 to prevent the CPU from changing to STOP mode. You can
program reactions to diagnostic interrupts in OB82.

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic SM331 and is the answer not in the manual?

Siemens Simatic SM331 Specifications

General IconGeneral
BrandSiemens
ModelSimatic SM331
CategoryControl Unit
LanguageEnglish

Related product manuals