1. From the Management Console, select Component → Messaging Manager (MSM) →Template Editor
Operation: To create the SERIAL-NUMBER template 1. Select File → New → Template
2. Right click the template and select Properties…
3. Set the following:
Name: SERIAL-NUMBER
Caption: Obtain Engine Serial Number 4. Click OK button
Operation: To add and configure the static-label
1. From the Controls toolbox, add a static-label to the template
2. Right click the label and select Properties… 3. Set the following:
Caption: Engine Serial Number 4. Click OK button
© SIEMENS DF PL DER MOM DL 2015
129
Manual References
MSM Server, Client and Template Editor help manual:
• From Start menu, SIMATIC > SIMATIC IT Documentation > English : - Follow the links to Engineering > Messaging Manager Online Help MSM Template Editor help manual:
• From MSM Template Editor: - ? > Contents and Index
© SIEMENS DF PL DER MOM DL 2015
132
Operation: To show / hide step names1. Select Tools Options GUI Plant objects name Visible (this is applied to all steps in all workspaces) 2. Right-click the workspace and select Layout Hide / Show Names (this is applied to all steps in the
workspace)
3. Right-click the single step and select Layout Hide / Show Name (this is applied to the single step)
In any case, the general option (Tools Options) must be activated in order for the more specific ones (on the workspace and on the single steps) to have an effect.
© SIEMENS DF PL DER MOM DL 2015
133
Operation: To define rule arguments:1. Right click the rule step
2. Select Properties
3. Select Input / Return Arguments tab
4. Click Add
5. Set the following:
Name Type
Default Value 6. Click Ok
© SIEMENS DF PL DER MOM DL 2015
138
© SIEMENS DF PL DER MOM DL 2015
139
© SIEMENS DF PL DER MOM DL 2015
140
The NOT OK End-Of-Rule is required in case of failure of the Engine-Serial-Nr-Rule to inform its caller about the failure.
© SIEMENS DF PL DER MOM DL 2015
141
Operation: To add a new Root step
1. Select the Messaging-Rules container in the Raw-Mat-Wh 2. Click the Add object button
3. Add a new Root step to the main workspace 4. Set the following:
Name: ENGINE-SERIAL-NR-RULE
Description: ENGINE-SERIAL-NR-RULE 5. Click OK.
Operation: To add the Send-Message step
1. Add the Send Message step 2. Set the following properties
Name: ASK-ENGINE-SERIAL-NR Comment: ASK-ENGINE-SERIAL-NR Destination: {LOCALHOST}
Call Type: CALL
Message Type: {UNSOLICITED} Message template: {SERIAL-NUMBER} Always on top: Yes
3. Click OK. 4. Link to the root
Operation: To add the End-Of-Rule step
1. Add an End Of Rule step 2. Set the following properties
Name: NOT-OK Comment: NOT-OK Exit-Status: NOT-OK 3. Click OK.
© SIEMENS DF PL DER MOM DL 2015
142
Transactions are defined by four properties referred to as ACID:
- Atomicity: changes are saved in the database only if all the queries are executed successfully - Consistency: a transaction will not break any database constraint
- Isolation: during a transaction no concurrent tasks are able to retrieve or alter any intermediate data created by a particular transaction task
-Durability: once a transaction is committed, all its effects will be retained even in case of system failure SIMATIC IT supports database transactions through the following technologies, operating at database level: •Bound Sessions
•Distributed Transaction Coordinator (MS DTC)
Note As of SIMATIC IT 6.5, Bound Sessions are used by default to manage transactions. If you upgrade from a
© SIEMENS DF PL DER MOM DL 2015
149
For example, the Task Type can be:
• Rule-Task, if the action modeled by the method is executed by a Production Modeler rule
• Generic-Com-Task, if the action modeled by the method is executed by a COM application integrated with
© SIEMENS DF PL DER MOM DL 2015
151
Notice that
• if you right click the method icon (e.g. Action-Method-Definition-0 in the picture above) and select Properties from the contextual menu, you can choose the task type of the method;
• if you click the method icon (e.g. Action-Method-Definition-0 in the picture above) and select Task-Details from the contextual menu, you can browse for the task (i.e. the rule in case of Rule-Task, the script in case of
Script-Task, etc.) linked to the method.
© SIEMENS DF PL DER MOM DL 2015
152
Operation: To expose the Unload-Truck-Rule as method1. From Libraries tree view, right click RAW-MAT-WH class 2. Select New Method
3. Set the following:
Name: UNLOAD-TRUCK-MTH
Type : INSTANCE-BASED Task Type : RULE-TASK
4. Click OK
5. Right click the UNLOAD-TRUCK-MTH method 6. Select Task Details
7. Set the following:
Event to infer: UNLOAD-TRUCK-RULE
8. Click OK to import Input / Return Arguments
© SIEMENS DF PL DER MOM DL 2015
155
Notice that
• if you click the event icon (e.g. Event-Method-Definition-0 in the picture above) and select Properties from the contextual menu, you can choose the event type of the event;
• if you click the event icon (e.g. Event-Method-Definition-0 in the picture above) and select Task-Details from the contextual menu, you can browse for the source of the event (i.e. the RTDS tag in case of Cube-Event, the details of the COM application in case of Generic-COM-Event, etc.).
© SIEMENS DF PL DER MOM DL 2015
157
The arguments of an event can be used to provide additional information concerning the occurrence signaled. For example, an automated system signaling the arrival of a raw material in the warehouse could bring as additional information the bar code of the incoming material lot.
© SIEMENS DF PL DER MOM DL 2015
158
Operation: To create a CUBE-EVENT to be linked to the TRUCK-ARRIVED tag 1. From the Libraries treeview, right click RAW-MAT-WH class
2. Select New Event
3. Set the following:
Name: TRUCK-IN-DELIVERING Type: INSTANCE-BASED Event Type : CUBE-EVENT
4. Click OK
5. Right click the TRUCK-IN-DELIVERING event
6. Select Task Details
7. Set the following:
Unit: CAR
Cube-Name: TRUCK_ARRIVED Default Update Interval: 1 second Cube Polling Class: 1 : 1 second Activation Value: 1
Reset Value: 0
© SIEMENS DF PL DER MOM DL 2015
162
Operation: To create the TRUCK-MANAGEMENT rule container 1. From the AUTOMOTIVE library, navigate to RAW-MAT-WH
2. Right click the Rules folder and select New Rule Container
3. Set the following:
Name: TRUCK-MANAGEMENT Rule-Type: Instance-Based
Operation: To rename the Root step in the TRUCK-MANAGEMENT rule container 1. From main workspace, right click the Root step and select Properties
2. Set the following:
Name: Truck-Arrival Description: Truck-Arrival
© SIEMENS DF PL DER MOM DL 2015
164
The Expression configured in the Condition step is evaluated as soon as the runtime execution reaches the step:
• If the Expression is TRUE, the step turns green and execution goes on following the TRUE output path
• If the Expression is FALSE, the step turns red and execution goes on following the FALSE output path
R
1
© SIEMENS DF PL DER MOM DL 2015
165
In the Expression field of a data Parameter you can configure complex expressions by using PM scripts The same scripts can be used also in the Script-Caller rule step.
• Allocation-Functions: to check how many rules are booking a piece of equipment
• Arithmetic-Functions: to perform mathematical calculations (square root, random numbers generation,
trigonometric functions, ...)
• Bitwise-Functions: to perform logical operations (AND, OR, XOR, ...)
• Date-Time-Functions: to manage date-time format and convert between System, Unix, UTC and COM
representation
• Equipment-Specification-Functions: to retrieve information about runtime values for equipment specification
parameters
• Error: to manage error descriptions and sources
• Evaluate-Expression: to get the values of Windows environment variables
• GSI-Checking-Functions: to get information concerning the connections between PM and SIMATIC IT
Components or between SIMATIC IT Components and the SITMesDb database
• Material-Specification-Functions: to retrieve information about runtime values for material specification
parameters
• Quantity-Functions: to convert a TEXT or TRUTH-VALUE input argument into a QUANTITY • Retrieve-Caller-Object: returns the step which called the current rule
• Retrieve-Executor-Object: returns the Root of the rule which is called by the current step
• Retrieve-Previously-Executed-Object: to retrieve information about the previously executed step (name, a
specific attribute, ...)
• Retrieve-Parent-Object: to retrieve information about the parent of a specific item (parent class, a specific
parent attribute, ...)
© SIEMENS DF PL DER MOM DL 2015
169
You can use the Expression field to read from a source step and Destination Object and Attribute to write to some destination.
Note that the Root has the opposite configuration:
Destination Object and Destination Attribute are available to store the values of input arguments to some destination to be used by other steps within the rule
and
Expression is available to create a value for return arguments.
When giving a constant value to an input argument, it is exactly the same to write it in the Default Value field or in the Expression field.
If the data type of the argument is TEXT, remember to type the expression value between double quotes.
For example, if you want to assign an initial value equal to value1 to the Input Argument 1 of type TEXT you can open the properties window and either
type value1 in the Default Value field
or
© SIEMENS DF PL DER MOM DL 2015
171
For the Return Argument configure Destination Object only, the Destination Attribute must be left blank:
© SIEMENS DF PL DER MOM DL 2015
172
Configure Destination Object and Destination Attribute in a rule step argument:
• Destination Attribute: insertion policy to be used (INSERT-AT-BEGINNING, INSERT-AT-END or CURRENT- VALUES)
Configure the Expression in a rule step argument:
© SIEMENS DF PL DER MOM DL 2015
173
Configure Destination Object and Destination Attribute in a rule step argument: