show the entry list
S7-1200 Digital/analog signal modules -- Setting up and parameterizing hardware -- Initializing and parameterizing modules
How do you standardize and destandardize analog values with STEP 7 (TIA Portal)?
How can you determine the coordinates and synchronize the system time of the S7-1200 using a commercially available GPS receiver?
How do you proceed when peripheral device errors are detected by the S7-1200?
How can you use an analog current output with wire break diagnostics on your S7-1200 PLC?
How can you use analog 0-20 mA signal modules and signal boards with 4-20 mA signals?
S7-1200 Signal boards -- Setting up and parameterizing hardware -- Initializing and parameterizing modules
With the S7-1200, why do you get the message indicating that the signal board is not available because of an incorrect type?
How do you proceed when peripheral device errors are detected by the S7-1200?
How can you use an analog current output with wire break diagnostics on your S7-1200 PLC?
How can you use analog 0-20 mA signal modules and signal boards with 4-20 mA signals?
How can you use an analog current output with wire break diagnostics on your S7-1200 PLC?
Part number:

Description
You can detect a wire break event at an analog current output with the wire break function of STEP 7 Basic. You evaluate a wire break event using the "Diagnostic error interrupt" organization block (OB82).
In this description, the signal module SM1234 is used. You can use other signal modules or signal boards with an analog current output instead.

Adding a signal module with an analog current output to the S7-1200 PLC and enabling the wire break diagnostics
 
No.

Adding a signal module with an analog current output to the S7-1200 PLC and enabling the wire break diagnostics

1. Add the signal module to the S7-1200 PLC
You will find a description on how to install a signal module or a signal board in Chapter 2, "Installation", in the S7-1200 System Manual.


Fig. 01

Note
Please find  the S7-1200 System Manual in entry ID 36932465.

2. Add the signal module to the device configuration
Browse the hardware catalog for the signal module. Drag and drop it into the S7-1200 rack in the device configuration.


Fig. 02

 3.

Configure the analog output channel and enable the wire break diagnostics

  • Open the "Device configuration" in the "Project tree".
  • In the "Device view", select the analog signal module.
  • Browse the "Properties" of the analog signal module for "Analog outputs" > "Channel 0".
  • Select "Current" as the analog output type.
  • Click the "Enable wire break diagnostics" checkbox.


Fig.03

Note
The range of the substitute values is [0...32511]. For a current output of 20mA, the equivalent substitute value is 27648.

Table 01

Evaluating the wire break event using the "Diagnostic error interrupt" OB
The "Diagnostic error interrupt" OB is called when a module detects an error.
The "Diagnostic error interrupt" OB will interrupt the cyclic program execution if a diagnostics-capable module, for which the diagnostic error interrupt has been enabled, detects an error.
The signal module will blink the "DIAG" light and the light of the concerned channel.
 
No. Evaluating the wire break event using the "Diagnostic error interrupt" OB
1.

Add "Diagnostic error interrupt" organization block OB82

  • Browse the project tree for the item "Add new block".
  • In the "Add new block" window, click the "Organization block (OB)" button.
  • Select the "Diagnostic error interrupt" OB.
  • Click the "OK" button.

Note
You can use only one diagnostic error interrupt OB in your program.


Fig. 04

2.

Read-out the start information of the "Diagnostics error interrupt" OB

  • Browse the instructions pane for "Instructions" > "Move".
  • Drag and Drop a move instruction into a network of your "Diagnostic error interrupt" OB.
  • Move the value of the tag "IOstate" 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 Fig. 05.

 
Fig. 05

3.

Evaluate the start information of the "Diagnostics error interrupt" OB
The "Diagnostic error interrupt" OB 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 (see Fig. 07 for details).

To identify the functional unit belonging to the HW-ID, browse the "Project tree" for the "PLC tags" item. Select the "Constants" tab from the "PLC tags" window. The "Value" column holds a list of the used HW-IDs (Fig. 06).

"Channel" (UINT)
The "Channel" contains the number of the output channel being used on the signal module.

"multierror" (BOOL)
The "multierror" bit indicates that more than one error has occurred.


Fig. 06

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 diagnostics function.

  • Go online to your S7-1200 PLC. The wrench symbol beside your PLC indicates a diagnostic error (Fig. 07, blue circle).
  • Browse the "Project tree" for the entry "Online & diagnostics".
  • Browse the navigation area of the "Online Access" window for the entry "Diagnostics buffer".
  • Select the wire break 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 type event.

Note
An "incoming event" shows the beginning of an event, in this case a wire break.
An "Outgoing event" shows the end of an event.
The signal module will blink the "DIAG" light and the light of the concerned channel.


Fig. 07

"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
  • Signal module / board with analog current output

 Entry ID:42320122   Date:2010-06-08 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Topics
Help
Online Help
Guided Tour