Sie sind auf Seite 1von 11

support.industry.siemens.

com
https://support.industry.siemens.com/cs/document/42781105/how-do-you-proceed-when-peripheral-device-errors-are-detected-bythe-s7-1200?dti=0&lc=en-WW

How do you proceed when peripheral device errors are


detected by the S7-1200?
Description
With the S7-1200 you can detect peripheral device errors and report them to devices with diagnostics capability.
These errors are also known as diagnostics errors. The following diagnostics errors are supported:
No encoder or load power (on the signal module / signal board)
High limit exceeded (of the value at an analog input or output)
Low limit exceeded (of the value at an analog input or output)
Wire break (at an analog current output)
Short circuit (at an analog voltage output)
All diagnostic error events trigger the execution of the "Diagnostics error interrupt" organization block (OB82).
The "Diagnostics error interrupt" OB82 includes startup information that helps you determine the circumstances
of the error occurrence:
Which device and channel reported the error.
Whether the event is due to the occurrence or removal of an error.
You can program instructions in OB82 to examine these startup values and to take appropriate action.
Evaluating the diagnostics error events with the "Diagnostics error interrupt" organization block (OB82)
The occurrence or removal of any of several different diagnostics error conditions results in a diagnostics error
event if the following preconditions are met:
The program of the S7-1200 has an OB82.
The diagnostics error event has been enabled for this module.
If OB82 does not exist, then the CPU ignores the error.
The "Diagnostics error interrupt" block OB82 interrupts the normal cyclic program execution as soon as a
diagnostics-compatible module recognizes an error.
Note
No "Diagnostics error interrupt" OB82 is yet present when you create a new project.

No.

Evaluating the diagnostics error events with the "Diagnostic error interrupt" organization block
OB82

1/11

Add the "Diagnostics error interrupt" OB82


Browse the project tree for the "Add new block" item.
Then in the "Add new block" dialog that opens you click the "Organization block (OB)" button.
Select the "Diagnostic error interrupt" OB82 from the list.
Click on the "OK" button.
Note
You can use only one "Diagnostic error interrupt" OB in the program.

Fig. 01

2/11

Reading out the startup information of the "Diagnostic error interrupt" OB82.
Double-click the "Diagnostic error interrupt [OB82]" item of your S7-1200 PLC in the "Project
tree".
In the directory "Instructions > Basic instructions" you select the commands "Move operations >
MOVE".
Use drag-and-drop to move a "MOVE" instruction into the network of your OB82 "Diagnostic
error interrupt".
Move the value of the "IOstate" tag into a global tag ("`DB1`.w_IOstate", for example).
Program all the other tags you want to monitor in the same way. See the example in the figure
below.

Fig. 02

3/11

Evaluating the start information of the "Diagnostic error interrupt" OB82


The "Diagnostic error interrupt" OB82 has the following start information:
"IOstate" (WORD)
"IOstate" contains the IO status of the diagnostics-compatible module. More details on the "IOstate" tag
are given in Table 03.
"laddr" (HW ANY)
This is the hardware identifier.
The hardware identifier (HW ID) identifies modules or functional units of modules (for example outputs
and high speed counters). The hardware identifier consists of a whole number and is reported by the
system along with diagnostics alarms to allow the faulty module or functional unit to be localized.
You find the HW ID of a functional unit in the "Properties" tab of the "Device configuration". Select the
"HW identifier" item in the navigation area (see Fig. 03).
"Channel" (UINT)
The "Channel" contains the number of the channel being used on the signal module / signal board.
"multierror" (BOOL)
The "multierror" bit indicates that more than one error has occurred.

Fig. 03

Table 01
Enabling and understanding the different diagnostic error events
The operating system monitors the diagnostics-compatible devices for the diagnostic errors mentioned above.
Diagnostic error events are indicated by flashing red LEDs. The table below shows additional information about
the different diagnostic error events, how to enable them, and the indicating LEDs.

No.

Understanding the different diagnostic error events

4/11

"No encoder or load power"


The power supply is insufficient or missing.
The following S7-1200 LEDs start to flash (LED color: red).
The "ERROR" LED on the CPU.
All LEDs of the signal module / signal board.
"Enable power diagnostics"
Select your S7-1200 in the "Project tree" under "Device configuration".
Click your signal module in the "Device configuration" window.
Select the "Properties" tab and click the "AI4/AO2" item in the "General" directory.
Check the "Enable power diagnostics" check box.

Fig. 04

5/11

"High limit exceeded"


The high limit of an analog input / output has been exceeded (output value greater than "+32511").
The following S7-1200 LEDs start to flash (LED color: red).
The "ERROR" LED on the CPU.
The "DIAG" LED if it is a signal module.
The LED of the associated channel.
"Enable overflow diagnostics"
Select your S7-1200 in the "Project tree" under "Device configuration".
Click your signal module in the "Device configuration" window.
Select the "Properties" tab and click the "AI4/AO2" item in the "General" directory.
Scroll down to the channel you want to monitor.
Check the "Enable overflow diagnostics" check box.

Fig. 05

6/11

"Low limit exceeded"


The low limit of an analog input / output has been exceeded (output value less than "0" for Current, less
than "-32512" for Voltage).
The following S7-1200 LEDs start to flash (LED color: red).
The "ERROR" LED on the CPU.
The "DIAG" LED if it is a signal module.
The LED of the associated channel.
"Enable underflow diagnostics"
Select your S7-1200 in the "Project tree" under "Device configuration".
Click your signal module in the "Device configuration" window.
Select the "Properties" tab and click the "AI4/AO2" item in the "General" directory.
Scroll down to the channel you want to monitor.
Check the "Enable underflow diagnostics" check box.
See Fig. 05 for more details.

7/11

"Wire break"
The circuit of an analog Current output is not closed.
The following S7-1200 LEDs start to flash (LED color: red).
The "ERROR" LED on the CPU.
The "DIAG" LED if it is a signal module.
The LED of the associated channel.
"Enable broken wire diagnostics"
Select your S7-1200 in the "Project tree" under "Device configuration".
Click your signal module in the "Device configuration" window.
Select the "Properties" tab and click the "AI4/AO2" item in the "General" directory.
Scroll down to the channel you want to monitor.
Choose the "Current" analog output type.
Check the "Enable broken wire diagnostics" check box.

Fig. 06

"Short circuit"
The contacts of an analog Voltage output are short-circuited.
The following S7-1200 LEDs start to flash (LED color: red).
The "ERROR" LED on the CPU.

8/11

The "DIAG" LED if it is a signal module.


The LED of the associated channel.
"Enable short-circuit diagnostics"
Select your S7-1200 in the "Project tree" under "Device configuration".
Click your signal module in the "Device configuration" window.
Select the "Properties" tab and click the "AI4/AO2" item in the "General" directory.
Scroll down to the channel you want to monitor.
Choose the "Voltage" analog output type.
Check the "Enable short-circuit diagnostics" check box.

Fig. 07

9/11

Table 02
Online diagnostics with STEP 7 Basic
If you have online access to your S7-1200 PLC with STEP 7 Basic, you can use the "Online & diagnostics"
function.
Go online to your S7-1200.
Browse the "Project tree" for the entry "Online & diagnostics".
Mark the "Diagnostics buffer" item in the "Online access" area.
Select a diagnostic error event in the "Events" table.
Details of the selected event are shown under the "Events" table. The hardware identification (HW ID), the
channel number and the event type are displayed here.
Note
"Incoming event" indicates the beginning of an event.
"Outgoing event" indicates the end of an event.

Fig. 08
"IOstate"
tag
The table
below shows
the possible
IO states of
the "IOstate"
tag.

IO state

Description

Bit 0

Configuration correct:
1 if the configuration is correct
0 if the configuration is no longer correct

Bit 4

Error:
1 if an error is present (for example a wire break)
0 if the error is no longer present

10/11

Bit 5

Configuration not correct:


1 if the configuration is not correct
0 if the configuration is correct again

Bit 6

IO cannot be accessed:
1 if an IO access error has occurred.
In this case, the "laddr" tag contains the hardware identifier of the IO with the access error.
0 if the I/O can be accessed again

Table 03
Creation environment
The screens in this FAQ were created with STEP 7 Basic V11.
Requirements
S7-1200
Ethernet cable
PG/PC
STEP 7 (TIA Portal)
Diagnostics-compatible signal module / signal board
Additional Information
More information about diagnostics-compatible analog signal modules (SM) and signal boards (SB) is available
in the SIMATIC S7-1200 Automation System manual (Entry ID: 36932465).

11/11

Das könnte Ihnen auch gefallen