Instructions The system functions below are available for displaying block-specific messages on a WinCC flexible operator panel:
- SFC 17 (ALARM_SQ)
- SFC 18 (ALARM_S)
- SFC 19 (ALARM_SC)
- SFC 107 (ALARM_DQ)
- SFC 108 (ALARM_D)
The system functions SFC 17(ALARM_SQ), SFC 18(ALARM_S), SFC 107 (ALARM_DQ) and SFC 108 (ALARM_D) generate for each call a block-specific message that can be displayed on the operator panel.
The messages of SFC 17 and SFC 107 can be acknowledged. The messages of SFC 18 and SFC 108 cannot be acknowledged. With SFC 19 (ALARM_SC) you can read the status of the message-triggering signal and the acknowledge status of SFCs 17/18.
Configuration of SFC 17/SFC 18 and SFC 107/ SFC 108 is very similar. The only difference between the Alarm_D block and the Alarm_S block is an additional parameter ("CMP_ID") in Alarm_D. With the "CMP_ID" parameter you can specify an ID for identifying the subsystem to which the associated message is assigned.
The steps below describe how to configure Alarm_D messages with STEP 7 V5.3 and higher and WinCC flexible 2004. The configuration of Alarm_S messages is identical. At the end of the entry there is an example of ALARM_S messages (SFC 17 / SFC 18) and an example of ALARM_D messages.
Operator panels
All operator panels which support the "message alarm process" or "event-controlled alarm process" can display ALARM_S or ALARM_D messages.
The following devices support the "message alarm process" or "event-controlled alarm process".
| OP |
TP |
MP |
Mobile Panel |
C7 devices |
PC system |
| OP 77B |
TP 170B |
MP 177 |
Mobile Panel 170 |
C7 635 |
RT systems |
| OP 170B |
TP 177B |
MP 270B |
Mobile Panel 177 |
C7 636 |
|
| OP 177B |
TP 270 |
MP 277 |
Mobile Panel 277 |
|
|
| OP 270 |
TP 277 |
MP 370 |
|
|
|
| OP 277 |
|
MP 377 |
|
|
|
Note
All S7-400 CPUs support the ALARM D alarm numbering procedure.
Furthermore, all S7-300 CPUs with firmware version V2.5.0 and onwards support the
ALARM D alarm numbering procedure.
Create STEP 7 project and set the Hardware Configuration
- Create a STEP 7 project.
- Create an S7-400 station and configure it with your modules in the Hardware Configuration.
- Connect the CPU to a network (MPI or PROFIBUS).
Create an S7 program
1. Program function block
- Add a function block (FB) to the block container of your CPU and open it with a double-click.
- In the declaration part, create an IN parameter of the double-word type (DWORD) for each message.
  Fig. 01
  Fig. 02
- You create the associated values for the messages as static variables in the declaration part of the FB.
  Fig. 03
- Assign values to the static variables (absolute address) that are then to be output in the message.
- Call the SFC (e.g. SFC 108) in the statement part of the FB.
| SIG: |
message-triggering signal, e.g. M10.0 |
| ID: |
data channel for messages: W#16#EEEE |
| EV_ID: |
automatically generated message number (IN parameter of FB) |
| CMP_ID: |
ID for identifying the subsystem to which the associated message is assigned (for Alarm_D only) |
| SD: |
associated value, maximum length: 12 bytes - absolute specification |
| RET_VAL: |
error information of block |
  Fig. 04
- Save the function block created.
2. Create instance DB
- You create the instance DB by calling the FB in the program (e.g. OB1).
- The message types of the FB are entered automatically into the DB and the message numbers are assigned.
3. Create message texts
- Now you can configure the message texts. For this you open the message configuration of the FB or of the instance DB with a right-click (Special Object Properties > Message...).
Note The dialogs of the message configuration differ for the project-wide unique alarm numbering procedure and the CPU-wide unique alarm numbering procedure. Below we show the dialog of the CPU-wide unique alarm numbering procedure.
- You can assign a text (message text with associated value) and other attributes to each message number.
WARNING
The messages that you configure in the DB are properties of the instance DB. They are lost when you delete the instance DB.
  Fig. 05
4. Configure associated values
You can transfer a process value (associated value) with the SD parameter. You can display this in the OP via the following string:
@Pwn Typ %width[.precision]format@
| Symbol |
Meaning |
Value range |
Default |
| @ |
Start of the format string |
|
|
| Pvn |
Process value number |
1-4 |
1 |
| Type |
Type of process value |
See Table 2 |
I |
| %width |
Width of the display field on the OP |
|
|
| .precision |
Number of decimal places (optional for format = "f") |
|
|
| format |
Process value display mode |
See Table 3 |
|
| @ |
End of the format string |
|
|
Table 01 - Composition of the associated values
Permissible values for "Type":
| Type |
Meaning |
| "b" or "B" |
BOOL |
| "y" or "Y" |
BYTE |
| "c" or "C" |
CHARACTER |
| "w" or "W" |
WORD |
| "i" or "I" |
INTEGER |
| "x" or "X" |
DWORD |
| "d" or "D" |
DINT |
| "r" or "R" |
REAL |
Table 02 - Type
Permissible values for "Format":
| Format |
Display |
| "d" |
Decimal with a sign |
| "u" |
Decimal without a sign |
| "X" |
Hexadecimal |
| "f" |
Fixed point number with a sign |
| "b" |
Binary |
| "s" |
Character string (ANSI string) |
Table 03 - Format
Note The extended associated value transfer is not supported by the current versions of WinCC.
5. Assign alarm numbers The alarms are identified by a CPU-wide or project-wide unique number. STEP 7 automatically assigns this number to the parameter on the FB when the instance DB is created. The OP sets up the connection to the alarm text via this number. Therefore you should also make sure that after creating the instance DB you always load the configuration of the operator panel and the instance DB itself.
Note
When copying a program with assigned alarm numbers, it might happen that the message number is already assigned and the program has to be assigned a different number range. In this case, STEP 7 automatically opens a dialog field in which you can specify the new number range.
6. Configure operator panel with WinCC flexible ES
- In the SIMATIC Manager, add a SIMATIC HMI station via "Add > Station".
- Select the operator panel to be configured, e.g. TP170Bcolor.
- Open the configuration of the SIMATIC HMI station by double-clicking on "Configuration".
- Double-click on "HMI MPI/DP" and network the interface with the system bus (e.g. MPI) of the S7-400 station.
- Save and compile the configuration.
- Close the hardware configuration.
  Fig. 06
- Start WinCC flexible ES by "right-click on WinCC flexible RT > Open Object".
- Under "Communication > Connections" you activate the connection already created.
  Fig. 07
7. Activate ALARM_S or ALARM_D messages in WinCC flexible
- Open the dialog "Messages > Settings > Alarm Settings".
- Activate the Alarm_S alarm procedure by selecting the display classes.
Note:
You can also activate the Alarm_S alarm procedure by entering a check mark for "Alarm_S".
  Fig. 08
8. Parameterize message window or message display
- To have the messages displayed in the message window or message display, go to "Properties > General" and under "Display" you check the option "Alarm events" and under "Alarm classes" you check the options for Alarm_S and Alarm_D.
The alarm classes for Alarm_S and Alarm_D are generated automatically by activating the Alarm_S alarm procedure and subsequent generation of the project.

Fig. 09
Assignment of STEP 7 alarm classes to WinCC flexible
"CPU-wide unique alarm numbers" alarm procedure
| STEP 7 alarm class |
WinCC flexible alarm class |
| Alarm - high |
S7 messages |
| Alarm - low |
S7 messages |
| Warning - high |
S7 warning |
| Warning - low |
S7 warning |
| Tolerance - high |
S7 tolerance |
| Tolerance - low |
S7 tolerance |
| PLC Process Control Message - Failure |
S7 controller process control message |
| PLC Process Control Message - Error |
S7 controller process control message |
| OS Process Control Message - Failure |
S7 OS process control message |
| Preventive maintenance - general |
S7 preventive maintenance |
| Process message - with acknowledgment |
S7 process message |
| Operator message - without acknowledgment |
S7 event message |
| Operator request - general |
S7 operator request |
| Operator message - general |
S7 operator input message |
| Status message - PLC |
S7 status message |
| Status message - OS |
S7 status message |
"Project-wide unique alarm numbers" alarm procedure
| STEP 7 alarm class |
WinCC flexible alarm class |
| Operator message |
S7 warning |
| Error message |
S7 message |
Download:
ALARM_S "Alarm_s_flex.zip" contains a STEP 7 V5.3 project with a CPU 316-2 DP and a Touch Panel TP 170Bcolor. It was created with STEP 7 V5.3 and WinCC flexible 2004.
The program includes an FB with the calls of SFC 17 (ALARM_SQ) and SFC 18 (ALARM_S). Decimal, hexadecimal, floating-point and string values have been set as associated values for the messages. The messages can be triggered via the variables table. You can change the function block as you wish to suit your requirements.
Alarm_s_flex.zip ( 2494 KB )
ALARM_D "Alarm_d_flex.zip" contains a STEP 7 V5.3 project with a CPU 416-2 DP and a Touch Panel TP 170Bcolor. It was created with STEP 7 V5.3 and WinCC flexible 2004.
The program includes an FB with the calls of SFC 107 (ALARM_DQ) and SFC 108 (ALARM_D). Decimal, hexadecimal, floating-point and string values have been set as associated values for the messages. The messages can be triggered via the variables table. You can change the function block as you wish to suit your requirements.
Alarm_d_flex.zip ( 2488 KB )
Copy the "Alarm_s_flex.zip" or "Alarm_d_flex.zip" file into a separate folder and then start the file with a double-click. The STEP 7 project is automatically unpacked with all its subdirectories as well as the WinCC flexible configuration. You can then use the SIMATIC Manager and WinCC flexible to open and process the extracted project.
More information on the alarm numbering procedure is available in Entry ID: 841294 and in the WinCC flexible manual in Entry ID: 18796010 in section 6.3.2 "Integrating alarms with the alarm numbering procedure".
Keywords Accompanying texts, Alarm values, Alarm numbering procedure
|