show the entry list

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? 

With the S7-1200, why do you get the message indicating that the signal board is not available because of an incorrect type?Go to beginning
Part number:

Description
You get this message because there is a difference between the version of the signal board integrated in the CPU and the version of the signal module configured in the device configuration. There are currently two versions of the S7-1200 analog input board, V1.0 and V2.0. If you configure the signal board version V2.0 in the device configuration, but have slotted the same type but version V1.0 in the CPU, you get this message in the diagnostics buffer: "Hardware component not available because of incorrect type". The signal boards with the following order numbers are concerned.

  • SB1231 AI1 x 12Bit 6ES7231-4HA30-0XB0
  • SB1231 AI1 x RTD 6ES7231-5PA30-0XB0
  • SB1231 AI1 x TC 6ES7231-5QA30-0XB0

Remedy
Ensure that the signal board in the device configuration and the signal board slotted in the CPU of the plant are of the same firmware version. Either you use the signal board with firmware version V2.0 for your CPU in the plant or you change the version of the signal board in the device configuration from V2.0 to V1.0. In this case, proceed as follows.

  1. Change the version of the selected signal board from V2.0 to V1.0.
  2. Drag-and-drop the module to the slot of the S7-1200 CPU.


Fig. 01

  1. The "Change device - AI1 Signal board" dialog opens with a comparison of the two modules with different versions (current device and new device). Click "OK" to replace the module automatically.
  2. Then you have to save and compile your project again.
  3. Load your program into the CPU.

Note
The change of version described above is possible only with STEP 7 (TIA Portal) V12 onwards. If you have created your project in an earlier version, you must first upgrade the project to the current version. For this you use the menu command "Project > Upgrade".

Creation environment
The screen in this FAQ response was created with STEP 7 (TIA Portal) V12+SP1+Update 2.

How do you proceed when peripheral device errors are detected by the S7-1200?Go to beginning
Part number:

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 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 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 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
1 "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

2 "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

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

4 "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

5 "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.
  • 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

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
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).

How can you use an analog current output with wire break diagnostics on your S7-1200 PLC?Go to beginning
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

How can you use analog 0-20 mA signal modules and signal boards with 4-20 mA signals?Go to beginning
Part number:

Description
You can use analog 4-20 mA input and output signals with the analog 0-20 mA signal modules and signal boards. You can scale the signal range of the analog inputs and outputs using the "Scale_current_input" and "Scale_current_output" predefined functions (FCs), which you can find attached to this FAQ.

Adding the "Scale_current" Global library

  1. Download the attached library, and unzip it. Open the "Libraries" task card.
  2. Click the "Open global library" button. The "Open global library" dialog window opens.
  3. Browse for the "Scale_current" library folder, and open the "Scale_current.al10" file. Now, the library is displayed in the "Global libraries" pane in the "Libraries" task card.


Fig. 01

Scaling of the analog input  
The range of 0-20 mA without the "Scale_current_input" instruction corresponds to the PLC’s internal signal range of 0-27648. The "Scale_current_input" instruction adapts this internal range to 4-20 mA linearly, starting with "0" for 4 mA and ending up with "27648" for 20 mA. A limit for wire break monitoring can be chosen by hand.


Fig. 02
 
No. Scaling of the analog input
1. Insert the "Scale_Current_input" instruction into a network
Browse the Global libraries tree for the "Scale_current_input" FC. Drag and drop this FC into a network of your S7-1200 PLC program.


Fig. 03

2. Scaling the analog input signal
Connect the contact "w_input_0-20mA" (2) to your analog hardware input (for example, IW96). You receive the scaled value at the contact "r_input_4-20mA" (4).

Note
For any input value lower than 4 mA the signal at "r_input_4-20mA" (4) will be set to "0". Accordingly, any input values higher than 20 mA will not exceed the maximum of "27648".


Fig. 04

3. Wire break monitoring
At the contact "r_wire_break_limit" (1), enter the limit for the wire break monitoring. The value "2764.8" for example will set the wire break limit to 2 mA. This means, if your input current is lower than 2 mA, the contact "b_wire_break" (3) will be set to "1".
Table 01

Scaling of the analog output   
The range of 0-20 mA without the "Scale_current_input" instruction corresponds to the PLC´1 internal signal range of 0-27648.
The Scale_current_output" instruction adapts this internal range to 4-20 mA linearly, starting with 4 mA for "0" and ending up with 20 mA for "27648".

Fig. 05
 
No. Scaling of the analog output
1. Insert the "Scale_current_output" instruction into a network
Browse the Global libraries tree for the "Scale_current_output" FC. Drag and drop this FC into a network of your S7-1200 PLC program.


Fig. 06

2. Scaling the analog input signal
Connect the contact "r_output_4-20mA" (1) to your software value. You receive the scaled value at the contact "w_output_0-20mA" (2) to send it to your analog hardware output (for example, QW96).

Note
For any input value lower than "0", the signal at "w_output_0-20mA" will be set to 4mA.
Accordingly, any input values higher than "27648"will not exceed the maximum of 20mA.


Fig. 07

Table 02

Requirements

  • S7-1200 PLC
  • Ethernet cable
  • signal board / signal module for analog output / input
  • STEP 7 Basic V10.5

   S7-1200_Scale_current.zip ( 348 KB )  

 Entry ID:42261900   Date:2014-01-10 
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 
Help
Online Help
Guided Tour