×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 23872245, Entry date: 09/11/2006
(1)
Rate

How can I display Alarm_S and Alarm_D messages with process values (so-called associated values) on an Operator Panel ?

  • Entry
  • Associated product(s)

Guidance:
The system functions SFC 17(ALARM_SQ), SFC 18(ALARM_S), SFC 19(ALARM_SC), SFC 107 (ALARM_DQ) and SFC 108 (ALARM_D) are available for display block-specific messages on an Operator Panel (OP).
For each call, system functions SFC 17(ALARM_SQ), SFC 18(ALARM_S), SFC 107 (ALARM_DQ) and SFC 108 (ALARM_D) generate a block-specific message that can be displayed on the OP. The messages of SFC 17 and SFC 107 can be acknowledged. The messages 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 parameter "CMP_ID" you can specify an ID for identifying the subsystem to which the associated message is assigned.

Operator panels:
All operator panels which support the "message alarm process" or "event-controlled alarm process" can display ALARM_S or ALARM_D messages (e.g. mobile panel 170, TP/OP 170B, TP/OP 270, MP 270B, MP370; RT systems). 

The following steps describe the configuration of ALARM_D messages with STEP 7 from V5.2 and ProTool Pro CS V6.0 SP2. ALARM_S messages are configured in the same way. At the end of the entry there is a example of ALARM_S messages (SFC 17/ SFC 18) and an example of ALARM_D messages.

Note:
The system function for generating Alarm D messages is provided only by the operating systems of the S7-400 CPUs and the CPU 319.

Create 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 S7 program

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


Fig. 1

 
  • Right-click to open the Properties of the parameters inserted.

  • Enter the following values in the "Attributes".
    S7_server = alarm_archiv
    S7_a_type = alarm_s


Fig. 2

 
  • You create the associated values for the messages as static variables in the declaration part of the FB.


Fig. 3

 
  • Assign values to the static variables (absolute address) that are then to be output in the message.
  • Call the FB (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. 4

 
  • Save the function block created.

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.

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 message number procedure and the CPU-wide unique message number procedure. Below we show the dialog of the CPU-wide unique message number 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. 5

 

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 format string    
Pwn Process value number (optional) 1-4 1
Typ Type of process value (optional) See Table 2 I
%width Width of the display field on the OP    
.precision Number of decimal places (optional for format = "f" )    
format Display of the process value See Table 3  
@ End format string    
Table 1: Elements of associated values

The following values are permitted for "Typ":
 

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 2: Type

The following values are permitted for "Format":
 

Format Display
"d" Decimal with sign
"u" Decimal without sign
"X" Hexadecimal
"f" Fixed-point number with sign
"b" Binary
"s" Character string (ANSI string)
Table 3: Format

Assign message numbers

The messages are identified by a CPU-wide or project-wide unique number. This number is automatically assigned by STEP 7 to the parameter on the FB when the instance DB is created. Via this number the OP sets up the connection to the message text. Therefore you should also make sure that after creating the instance DB you always load the configuration of the OP and the instance DB itself.

Note:
When copying a program with assign message numbers it might happen that the message number is already assigned and the program has to be assigned a different number. In this case STEP 7 automatically opens a dialog field in which you can specify the new number range.

Install OP in ProTool Pro CS (ProTool Pro CS has to be integrated in STEP 7)

  • Create an OP in the SIMATIC Manager and open it with a double-click.
  • ProTool and the "New Project" wizard open.
  • Select the OP you are using.
  • In the "Select Controller" dialog you link the OP to your CPU ( "Parameter...").


Fig. 6

 
  • Create the project using the wizard.

Activate Alarm_S or Alarm_D messages in the OP

  • Open the "Message Settings" dialog (menu: PLC > Messages > Settings...).
  • Enable the Alarm_S message procedure by entering a check mark for "Alarm_S".
  • You select Alarm S event classes here via the "Alarm_S ..." button.

Note:
You activate the Alarm_D message procedure also by entering a check mark for "Alarm_S"!


Fig. 7

 

Download:

Alarm_S:
"Alarm_s.zip" contains a project STEP 7 V5.2 with a CPU 316-2 DP and a touch panel TP 170Bcolor. It was created with STEP 7 V5.2 SP1 and ProTool Pro CS V6.0 SP2.
The program includes a FB with the calls of SFC 17 (ALARM_SQ) and SFC 18 (ALARM_S). As accompanying values for the messages,  decimal, hexadecimal, floating point as well as string values are made use of. Messages can be triggered via the tag table. You can  freely adapt the function block to your requirements.

Alarm_s.zip ( 364 KB )

 Alarm_D:
"Alarm_d.zip" contains a STEP 7 V5.2 project with a CPU 416-2 DP and a touch panel TP 170Bcolor. It was created with STEP 7 V5.2 SP1 and ProTool/Pro CS V6.0 SP2.
The program includes a FB with the calls of SFC 107 (ALARM_DQ) and SFC 108 (ALARM_D). As accompanying values for the messages, decimal-, hexadecimal-, floating point- and string- values were made use of. The messages can be triggered via the tag table. You can freely adapt the function block to your requirements.

Alarm_d.zip ( 242 KB )

Copy the file "Alarm._s.zip" or "Alarm_d.zip" into a separate directory and start the file per doubleclick.  The STEP 7 project is then unpacked automatically including its subdirectories as well as the the ProTool/Pro configuration. Finally, you can open and edit the unpacked project with the SIMATIC Manager and ProoTool / Pro.

Key Words:
Associated Texts, Alarm Values

 

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit
Related links