How do you implement chronological messaging with S7-300 CPUs and WinCC?
Chronological messaging means that the messages are sent from the PLC to the WinCC station. When they are created in the PLC, the messages are given a time stamp and sent to the WinCC station. The WinCC station does not need to poll the PLC. This significantly reduces the bus load. There are basically two types of message in STEP 7:
- Symbol-related messages
- Block-related messages
You can configure only block-related messages for an S7-300 CPU. These block-related messages are created by the STEP 7 program with the aid of the system message blocks. The message is sent as soon as the STEP 7 program calls a system message block and the conditions for sending a message are fulfilled. The messages are triggered synchronously to the program. The system message blocks SFC17 (ALARM_SQ), SFC18 (ALARM_S), SFC107 (ALARM_DQ) and SFC108 (ALARM_D) can be used in an S7-300 CPU (CPU 314 onwards) for block-related messages. In contrast to ALARM_S/SQ, ALARM_D/DQ offers possibilities for managing your system resources; otherwise, they are identical. The S7-312 and S7-313 CPUs do not support these system message blocks!
- Manual "SIMATIC S7-300 CPU 31xC and CPU 31x, Technical Data"
This provides detailed information about the performance data of the available alarm processes of a CPU - Entry ID 12996906
- Manual "Operation List CPU 31xC, CPU 31x, IM 151-7 CPU, IM 154-8 CPU, BM 147-1 CPU, BM 147-2 CPU"
This provides detailed information about available system functions and system function blocks for creating CPU messages - Entry ID 13206730.
- STEP 7 Online Help
You can find detailed information about alarm processes, alarm types and system alarm blocks in the STEP 7 Online Help under "Configuring Messages". You can obtain detailed information if you install the block in the program and press F1.
- The WinCC component "AS-OS Engineering" is installed.
You can select this component when doing a user-defined setup of WinCC. Please use the following installation sequence:
- STEP 7
- WinCC with the "AS-OS Engineering" component
Entry ID 22272911 includes a description of how to retro-install the "AS-OS Engineering" component.
- The WinCC project is integrated in the STEP 7 project.
Entry ID 11841504 contains information on how to integrate a WinCC project in STEP 7.
- The "Alarm Logging Runtime" is enabled in the startup list in the "Computer Properties" dialog of the WinCC project.
Below is a description of how to configure block-related messaging.
Configuring block-related messages
Here we present block-related messaging using the system message block SFC17 (ALARM_SQ). The procedure using the system message block SFC18 is essentially identical. Two messages are configured in one function block.
|1||Copy SFC17 (ALARM_SQ) into the current project|
In the SIMATIC Manager you select "File > Open... > Libraries" and open the Standard Library. Select the system message block SFC17 (ALARM_SQ). It is located in the directory "Standard Library > System Function Blocks > Blocks". Copy the system message block SFC17 into the project.
|2||Create a message-compatible block |
|3||Configure standard messages|
Select function block "FB1" in the SIMATIC Manager. In the pop-up menu you call the command "Special Object Properties > Messages...".
The Message Configuration dialog opens.
Specify the message text for the messages EV_ID1 and EV_ID2.
|4||Call message-compatible block in the program|
Call message-compatible block in the program. For this you open the organization block OB1 and enter the following code:
Save the organization block OB1 and close the editor.
|5||Configure block-related messages|
After incorporating the message-compatible block you can change the message texts. For example, you can extend the message text by adding the actual name of the measuring point. For this you mark the instance data block in the SIMATIC Manager, "DB1", for example. In the pop-up menu you call the command "Special Object Properties > Messages...".
The Message Configuration dialog opens. Change the message text accordingly for each relevant language.
|6|| Download program in PLC|
Download the program into the PLC.
"OS Compile" creates the messages in WinCC. In earlier versions the procedure was also done with "Mapping" or "Transfer PLC/OS Connection Data".
A wizard takes you through multiple dialogs. Here you can make various settings for compiling the OS. You must select which PLC program is assigned to which OS and which connection is to be used.
Using the "Back" and "Next" buttons you can navigate in the wizard's settings mask. With the "Finish" button you get a summary of the compilation procedure displayed. Start compilation with the "Compile" button.
Download the program into the OS.
|9||Test the messages at WinCC Runtime|
Start WinCC Runtime. Trigger the messages using the variable table. The messages are displayed in the alarm window of WinCC and can be acknowledged where necessary. You can diagnose the messages alternatively with the STEP 7 program "CPU Messaging".
This entry has been created with WinCC V6.0 SP4 and STEP 7 V5.3 SP2.