日志搜索
用户登录
数据载入中,请稍等...
用户公告
数据载入中,请稍等...
时间记忆
数据载入中,请稍等...
最新日志
数据载入中,请稍等...
最新回复
数据载入中,请稍等...
最新留言
数据载入中,请稍等...
统计信息
数据载入中,请稍等...
peripheral device errors detected by the S7-1200

Description
The S7-1200 PLC can detect and report peripheral device errors for diagnostics-capable devices. These errors are called diagnostic errors. The following diagnostic errors are supported:

  • No user power (on the signal module / board)
  • High limit exceeded (of the value on an analog input or output)
  • Low limit exceeded (of the value on an analog input or output)
  • Wire break (on an analog Current output)
  • Short circuit (on an analog Voltage output)

All diagnostic error events trigger the execution of the "Diagnostic error interrupt" organization block (OB82).
The "Diagnostic 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 inside OB82 to examine these startup values and to take appropriate action.

Evaluating the diagnostic error events with the "Diagnostic error interrupt" organization block (OB82)
The occurrence or removal of any of several different diagnostic error conditions results in a diagnostic error event if the following preconditions are met:

  • The OB82 has been added to the program of your S7-1200 PLC.
  • The diagnostic error event has been enabled for the module.

If OB82 does not exist, then the CPU ignores the error.
The "Diagnostic error interrupt" OB82 interrupts the normal cyclic program execution if a diagnostics-capable module recognizes an error.

Note
No "Diagnostic error interrupt" OB82 is present when you create a new project.
 
No. Evaluating the diagnostic error events with the "Diagnostic error interrupt" organization block OB82
1 Add the "Diagnostic error interrupt" OB82
  • Browse the project tree for the "Add new block" item.
  • In the "Add new block" window, click the "Organization block" button.
  • Select the "Diagnostic error interrupt" OB82 from the list.
  • Click the "OK" button.

Note
You can have only one "Diagnostic error interrupt" OB in your program.


Fig. 01

2 Reading out the start information of the "Diagnostic error interrupt" OB82
  • Double-click the "Diagnostic error interrupt" OB82 of your S7-1200 PLC in the "Project tree".
  • Browse the instructions pane for "Instructions > Move > MOVE".
  • Drag and Drop a "MOVE" instruction into a network of your "Diagnostic error interrupt" OB82.
  • Move the value of the "IOstate" tag into a global tag (for example "`DB1`.w_IOstate").
  • Program the other tags you want to monitor in the same way. Please find an example in the figure below.

Fig. 02
 3 Evaluating the start information of the "Diagnostic error interrupt" OB82
The "Diagnostic error interrupt" OB82 has the following start information:

"IOstate" (WORD)
The "IOstate" contains the I/O status of the diagnostics-capable module. Please find details on the "IOstate" tag in Table no. 3.

"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 counter). 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". Browse the navigation area for the item "IO addresses/HW identifier" (see figure below).

"Channel" (UINT)
The "Channel" contains the number of the output channel being used on the signal module / 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-capable devices for the diagnostic errors mentioned above. Diagnostic error events will be indicated by red blinking LEDs. The following table shows additional information on the different diagnostic error events, how to enable them, and the indicating LEDs.
 
No. Understanding the different diagnostic error events
1 "No user power"
The power supply is insufficient or missing.

The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):

  • The "ERROR" LED on the CPU.
  • All LEDs of the signal module / board.

"Enable power diagnostics"

  • Browse the "Project tree" for the "Device configuration" of your S7-1200 PLC.
  • Click your signal module in the "Device configuration" window.
  • Select the "Properties" tab and click the "AI4/AO2" item from the navigation area.
  • Click the "Enable power diagnostics" checkbox.


Fig 04

2 "High limit exceeded"
The high limit of an analog input / output has been exceeded (output value greater than "+32511").

The following S7-1200 PLC LEDs will blink (color of blinking LEDs: 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"

  • Browse the "Project tree" for the "Device configuration" of your S7-1200 PLC.
  • Click your signal module in the "Device configuration" window.
  • Select the "Properties" tab and click the "AI4/AO2" item from the navigation area.
  • Scroll down to the channel you want to monitor.
  • Click the "Enable overflow diagnostics" checkbox.


Fig 05

 3 "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 PLC LEDs will blink (color of blinking LEDs: 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"

  • Browse the "Project tree" for the "Device configuration" of your S7-1200 PLC.
  • Click your signal module in the "Device configuration" window.
  • Select the "Properties" tab and click the "AI4/AO2" item from the navigation area.
  • Scroll down to the channel you want to monitor.
  • Click the "Enable underflow diagnostics" checkbox.

Please see figure above for details.

4 "Wire break"
The power circuit of an analog Current output is not closed.

The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):

  • The "ERROR" LED on the CPU.
  • The "DIAG" LED, if it is a signal module.
  • The LED of the associated channel.

"Enable wire break diagnostics"

  • Browse the "Project tree" for the "Device configuration" of your S7-1200 PLC.
  • Click your signal module in the "Device configuration" window.
  • Select the "Properties" tab and click the "AI4/AO2" item from the navigation area.
  • Scroll down to the channel you want to monitor.
  • Choose the "Current" analog output type.
  • Click the "Enable wire break diagnostics" checkbox.


Fig 06

5 "Short circuit"
The contacts of an analog Voltage output are short-circuited.

The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):

  • The "ERROR" LED on the CPU.
  • The "DIAG" LED, if it is a signal module.
  • The LED of the associated channel. 

"Enable short circuit diagnostics"

  • Browse the "Project tree" for the "Device configuration" of your S7-1200 PLC.
  • Click your signal module in the "Device configuration" window.
  • Select the "Properties" tab and click the "AI4/AO2" item from the navigation area.
  • Scroll down to the channel you want to monitor.
  • Choose the "Voltage" analog output type.
  • Click the "Enable short circuit diagnostics" checkbox.


Fig 07

 Table 02

Online diagnostics with STEP 7 Basic
When 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 PLC.
  • Browse the "Project tree" for the entry "Online & diagnostics".
  • Browse the navigation area of the "Online Access" window for the entry "Diagnostics buffer".
  • Select a diagnostic error event from the "Events" table.
  • Beneath the "Events" table, details on the selected event are displayed. Here, you will find the HW-ID, the channel number, and the event type.

Note
An "Incoming event" shows the beginning of an event.
An "Outgoing event" shows the end of an event.


Fig. 08

"IOstate" tag
The following table shows the possible I/O 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
Bit 5 Configuration not correct:
  • 1, if the configuration is not correct
  • 0, if the configuration is once again correct
Bit 6 I/O cannot be accessed:
  • 1, if an I/O access error has occurred.
    In this case, the "laddr" tag contains the hardware identifier of the I/O with the access error.
  • 0, if the I/O can be accessed once again
 Table 03

Requirements

  • S7-1200 PLC
  • Ethernet cable
  • PG / PC
  • STEP 7 Basic V10.5
  • Diagnostics-capable signal module / board
  • 标签:S7-1200 
  • 发表评论:
    数据载入中,请稍等...
    Copyright © 超音速工作室                                 生活因感动而精彩,理想在创造中放飞
    Powered by Oblog.