Technical data

Configuring Messages
16.3 CPU-Oriented Message Configuration
Programming with STEP 7
356 Manual, 05/2010, A5E02789666-01
Programming Message-Type Blocks (FB)
1. In SIMATIC Manager, select the function block (FB) for which you want to generate a
block-related message and double-click to open it.
Result: The selected block is opened and displayed in the "LAD/STL/FBD" window.
2. Fill out the variable declaration table. You must declare the corresponding variables in the
calling function block for every message block that is called in the function block.
Enter the following variables in the variable overview column:
- For the parameter "IN" enter a symbolic name for the message block input, for example,
"Meld01" (for message input 01) and the data type (must be "DWORD" without an initial
value).
- For the parameter "STAT" enter a symbolic name for the message block to be called, for
example, "alarm" and the corresponding data type, here "SFB33."
3. In the code section of the function block, insert the call for the selected message block, here
"CALL alarm", and finish your entry with
RETURN.
Result: The input variables for the called message block (here SFB 33) are displayed in the
code section of the function block. Assign the symbolic name you assigned in step 2. for the
message block input, here "Mess01," to the variable "EV_ID".
Result: A flag should appear in the "Name" column for parameter "IN" if the column is not
selected. The selected block is then set as a message-type block. The required system
attributes (for example, S7_server and S7_a_type) and the corresponding values are assigned
automatically (Note: for certain SFCs you will have to assign the system attributes for the
parameter "IN" yourself. To do this select the menu command Edit > Object Properties and
then select the "Attributes" tab.).
Caution: If you call an FB that contains multiple instances and configured messages instead of
an SFB, you must also configure the messages of this FB in the calling block.
4. Repeat steps 2. to 4. for all calls to message blocks in this function block.
5. Save the block using the menu command File > Save.
6. Close the "LAD/STL/FBD" window.
Opening the Message Configuration Dialog Box
Select desired message block and then select the menu command Edit > Special Object
Properties > Message in the SIMATIC Manager.
Result: The STEP 7 message configuration dialog box is opened. Information on opening the
PCS7 Message Configuration function can be found under PCS7 Message Configuration
(CPU-Oriented).