• No results found

Simatic IT Production Suite Part1

N/A
N/A
Protected

Academic year: 2021

Share "Simatic IT Production Suite Part1"

Copied!
287
0
0

Loading.... (view fulltext now)

Full text

(1)

© SIEMENS DF PL DER MOM DL 2015

1

List of contents:

Chapter 1 - Introduction to SIMATIC IT Services

Chapter 2 - Introduction to Production Modeler

Chapter 3 - Analysis: Project Requirements

Chapter 4 - Analysis: Library Development

Chapter 5 - Messaging Manager

• Chapter 6 – Class rules

Chapter 7 - Methods and Events

Chapter 8 - Rule Development

• Chapter 9 – Engineering: Plant instantiation

• Chapter 10 – Runtime: Monitoring

Chapter 11 - COM Integration

(2)

© SIEMENS DF PL DER MOM DL 2015

2

In this first part of the course we are focusing on how to use SIMATIC IT Framework, i.e. the development environment.

(3)
(4)
(5)

Important Notes:

• .NET framework 3.5 has to be installed on machines running Windows Server 2012 R2. • SIMATIC IT can run on x64 operating systems only through the WOW64 (Windows 32-bit on Windows 64-bit) subsystem.

• SIMATIC IT 6.7 SP1 has been tested in both English and German on the supported operating systems.

• The Server Core installation option is not supported.

• UAC has to be always disabled except for client machines with the following requirements:

– Windows 7 SP1 is installed, ZAC installation and HDD Lean Setup is installed or – Windows 8.1 is installed and ZAC installation

(6)
(7)
(8)

© SIEMENS DF PL DER MOM DL 2015

8

The installation process allows the user to choose the SIMATIC IT installation folder (by default, C:\Program Files

(x86)\SIEMENS\).

In case of installation of Production Modeler server, the user is also prompted to select the path of the folder containing all Production Modeler files. The default path is

C:\Program Data\Siemens\SIMATICIT\UserKbs.

The USERKBS folder contains:

a USERKBS folder, containing Production Modeler projects, libraries and plants

a DOC folder, containing images, documentation files and library and plant versions belonging to Production Modeler

(9)

© SIEMENS DF PL DER MOM DL 2015

9

A typical distributed architecture for SIMATIC IT Production Suite can look like the one in this picture. Note that Component servers can be distributed on different machines, as well as Component clients.

(10)

© SIEMENS DF PL DER MOM DL 2015

10

(11)

© SIEMENS DF PL DER MOM DL 2015

11

(12)
(13)
(14)
(15)

© SIEMENS DF PL DER MOM DL 2015

15

SIMATIC IT may also be started from START menu, All Programs > Siemens Automation > SIMATIC > SIMATIC

(16)

© SIEMENS DF PL DER MOM DL 2015

16

The files containing the configuration of a

Services Plant are stored in a folder on the

PC hard disk.

This folder has the same name of the

Services Plant: <Plant_name>.PLT.

To display configuration details, double-click the Services Plant, logging on the

SIMATIC IT Management Console.

Multiple Services Units can be defined inside one Services Plant, but only one at a time can be active. Therefore, if more Services

Units are needed, e.g. for performance

(17)
(18)

© SIEMENS DF PL DER MOM DL 2015

18

The Foundation Server also hosts the Discovery Service: this allows the Components clients to discover the machine where SIMATIC IT Servers are running, with no need to configure their location explicitly.

(19)
(20)

© SIEMENS DF PL DER MOM DL 2015

20

SIMATIC IT Network can be configured either

from the Management Console environment, by selecting Configuration > Network Configuration, or

(21)

© SIEMENS DF PL DER MOM DL 2015

21

Operation: To change user

1. Press SHIFT + ESC

Operation: To open User Manager

1. From Management Console, select

(22)
(23)
(24)
(25)

© SIEMENS DF PL DER MOM DL 2015

25

In this way SIMATIC Logon implements the integration between SIMATIC IT, SIMATIC and Windows users:

The same username and password is valid to log on to the Operating System and it is recognized both in SIMATIC IT applications and in PCS7

(26)

© SIEMENS DF PL DER MOM DL 2015

26

(27)
(28)

© SIEMENS DF PL DER MOM DL 2015

28

The connection to physical devices is configured by defining the interfaces in RTDS (information about device drivers).

From the Management Console, click your logical unit and select Unit > Real Time Data Engine > RTDE Offline

Configuration

(29)

© SIEMENS DF PL DER MOM DL 2015

29

RTDE must be activated, by selecting Unit > Real Time Data Engine > Start Real Time Data Engine.

During this training course you do not need to launch it manually, since it has been added to the automatic start-up list, as we are going to see at the end of this chapter.

(30)
(31)
(32)

© SIEMENS DF PL DER MOM DL 2015

32

(33)

© SIEMENS DF PL DER MOM DL 2015

33

Detailed information about Custom Objects can be found in the Custom Objects Management document:

Start > All Programs > Siemens Automation > SIMATIC > SIMATIC IT Documentation > English > Concepts and Use > Custom Objects Portal Online Help.

(34)

© SIEMENS DF PL DER MOM DL 2015

34

More information on the Logbook Configuration manual:

Start > All Programs > Siemens Automation > SIMATIC > SIMATIC IT Documentation > English > Concepts and Use > Logbook Service Configuration Manual.

(35)

© SIEMENS DF PL DER MOM DL 2015

35

The user that is logged on automatically when SIMATIC IT is started is the default user. In order to define a different start-up user, you must select Configuration > System and

select the Automatic User Logon check box click Set Automatic User

• enter the start-up user username and password

The start-up user configured in the Training Room workstations is the manager user.

1

2

(36)
(37)
(38)

© SIEMENS DF PL DER MOM DL 2015

38

Prerequisites:

A Services Plant (.PLT)

SIT must be configured to log-on to the Services Plant automatically.

Furthermore, the user that is logged on the SIT Services automatically must have sufficient permissions to start the Components configured as Windows Service (the manager username is suggested)

(39)
(40)

© SIEMENS DF PL DER MOM DL 2015

40

The Windows Services related to SIT are

SIMATIC IT IPC: it provides the communication layer for SIMATIC IT Components (Inter-Process

Communication protocol) and makes it possible to start Components automatically by launching the Program

Server (prgserv.exe);

StarterService: it launches SIMATIC IT DIS connectors; SIMATIC IT Application Broker

These services are visible in the Computer Management window (Windows Administrative Tools).

Even if possible, it is recommended not to start / stop them from the Windows Control Panel: in some cases, the correct behavior may not be ensured.

It is possible to start the SIT Management Console at any time, in order to modify the configuration of Components running as Windows services.

(41)

© SIEMENS DF PL DER MOM DL 2015

41

Operation: To launch System Monitor

1. From Management Console, select

(42)

Operation: To configure the system to start PM automatically

1. From Management Console, select Configuration System 2. Select Startup tab

3. Click Startup Conf

4. Drag Production Modeler – automotive project and drop it on your computer name. 5. Click Save

6. Click Apply now 7. Click Finish 8. Click OK

Operation: To open System Monitor

1. From Management Console, select

Tools System Monitor

(43)
(44)
(45)
(46)

© SIEMENS DF PL DER MOM DL 2015

46

Manual References

Release notes, hardware requirements and installation guidelines:

From Start menu, SIMATIC > SIMATIC IT Documentation > English: - Follow the links to Release Notes and Installation /Configuration

License Management:

From Start menu, SIMATIC > SIMATIC IT Documentation > English:

- Follow the links to Installation /Configuration > SIMATIC IT Licensing Manual

Services help manual:

From Start menu, SIMATIC > SIMATIC IT Documentation > English: - Follow the links to Application Development

(47)
(48)
(49)

© SIEMENS DF PL DER MOM DL 2015

49

KB stands for Knowledge Base.

The configuration of the User-Root is contained in a file with .KB extension. Libraries are represented by files with .LIB.KB extension.

Plants are represented by files with .PLN.KB extension.

These files are stored in C:\Program Data\Siemens\SIMATICIT\UserKbs\USERKBS.

The user root contains configuration information about the PM project, such as which plants and libraries to load, which Components should be accessible, settings about debugging and logging, etc.

(50)
(51)

© SIEMENS DF PL DER MOM DL 2015

51

Available actions on PM Projects:

New… / Add: create a new project Modify: change the configuration of an

existing project

Delete: delete an existing project

Clicking Advanced makes it possible to configure the initial size of three memory regions for PM:

Region 1: memory reserved to the Production Modeler engine Region 2: memory reserved for the evaluation of PM keywords Region 3: memory reserved for the interpretation of graphic steps

(52)

© SIEMENS DF PL DER MOM DL 2015

52

The following commands are accessible by right-clicking the connection:

Connect Disconnect Show TW Hide TW

(53)
(54)

© SIEMENS DF PL DER MOM DL 2015

54

Operation: To open System Monitor

1. From Management Console, select

Tools System Monitor

Operation: To start PM User Interface

1. From Management Console, select

Components Production Modeler Production Modeler User Interface 2. Select AUTOMOTIVE-PROJECT

(55)

© SIEMENS DF PL DER MOM DL 2015

55

The constraints for using multiple instances of PM Server are the following:

• A specific plant can be loaded in more than one PM Server instance, but it can be “ACTIVE” only in one PM instance, and it must be in “STAND-BY” mode in all other instances (this check is performed at runtime via BPM)

• Each PM Server instance can load more than one plant, without violating the previous constraint

• Each PM Server instance is identified by the host name and the TCP port number. The TCP port number allows other applications (e.g.: PM User Interface, SIMATIC IT MULTI COM Interface, etc.) to specify which of the PM instances running on the same host they want to connect to

(56)
(57)

© SIEMENS DF PL DER MOM DL 2015

57

The RTDS Units folder allows the user to monitor the status of the connection to Services Units (RTDS Unit Monitor).

(58)
(59)
(60)
(61)

© SIEMENS DF PL DER MOM DL 2015

61

click to

drop

click and

release

(62)
(63)
(64)
(65)
(66)

© SIEMENS DF PL DER MOM DL 2015

66

According to ISA-95, a plant definition should always start either with an ENTERPRISE, a SITE or an AREA. The ENTERPRISE and SITE levels can be used to manage a distributed architecture, where several PM Servers can run on a single multiprocessor workstation or on different workstations.

In the hierarchy proposed by PM, those levels are meant as coordination layers: several production plants (local or remote) within the same company can share high-level information and have common operating procedures, which are stated in the ENTERPRISE or SITE.

The architecture can be made up of several distributed PM Server installations: an “Enterprise” PM Server contains the project with the definition of the ENTERPRISE or SITE and one or more local plants; each “Client” PM Server contains one or more remote plant definitions, consisting of SITES or AREAS.

LOGICAL-CELLS may also be recursive (i.e. they can contain other LOGICAL-CELLS)

SITE-LINKS and AREA-LINKS are used in the “Enterprise” PM Server in order to access plants running on other “Client” PM Servers.

The PROCESS-SEGMENT level is used to describe the production processes and not the physical layout of the production plant. More information about this is given in the chapter dedicated to Process Segments.

(67)
(68)
(69)
(70)

© SIEMENS DF PL DER MOM DL 2015

70

(71)
(72)

© SIEMENS DF PL DER MOM DL 2015

72

Versioning is available for plants too, with the same criteria.

(73)

© SIEMENS DF PL DER MOM DL 2015

73

Manual References

Release notes, hardware requirements and installation guidelines:

From Start menu, SIMATIC > SIMATIC IT Documentation > English: - Follow the links to Release Notes and Installation /Configuration

PM help manual:

• From Production Modeler User Interface: - Help > Contents and Index

From Start menu, SIMATIC > SIMATIC IT Documentation > English: - Follow the links to Engineering > Production Modeler

(74)
(75)

© SIEMENS DF PL DER MOM DL 2015

75

During the course you have to:

• Model the production plant layout: you will model the physical machines, production lines, and functional areas (e.g. production area, warehouse area) (Production Modeler)

• Implement the logic to manage a truck that delivers raw materials (e.g. engines) to the plant (Production Modeler) • Model the processes to manage equipment involved in the assembling of a chassis and of a complete car (Production

Modeler)

• Use SIMATIC IT Material Manager to define initial, intermediate and finished materials. You will describe the parts that compose the cars (BoM). During production, MM will update warehouse stocks with the movement and assembling of materials

• Use SIMATIC IT Product DEFinition Manager to define the PM processes involved in the production of a car model and the related requirements (input / output materials, machine parameters, execution equipment)

• Use SIMATIC IT Production Order Manager to define orders to assemble a car (e.g. a coupe or a station wagon) • Use SIMATIC IT Data Integration Service to manage data exchange between the ERP and the MES layers. Production

orders, materials and product specifications will be received from an external application, manipulated and stored in the Production Suite database

• Implement a WEB application using SIMATIC IT Client Application Builder to manage orders from an Internet Explorer page. You will also build a GUI to display equipment availability

(76)

© SIEMENS DF PL DER MOM DL 2015

76

Using SIMATIC IT Production Modeler you will model the equipment present in your production plant and its hierarchical layout.

The Plant is composed of:

• One Site

Two Areas (the Production Area and the Warehouse Area) The Production Area contains:

Two Production Lines (the Chassis Assembling Cell and the Car Assembling Cell)

• A Workplace Cell

The Warehouse Area contains:

• A Raw Material Warehouse

• A Final Material Warehouse

The assembling production lines are composed of:

• A Side-Line Warehouse (Unit)

• An Assembling Machine (Unit)

• An Inspection Unit

(77)

© SIEMENS DF PL DER MOM DL 2015

77

Using PM you will model the workflows for the management of each equipment from an MES point of view. For example, in the Raw Material Warehouse, you will model a workflow to:

• Ask the Operator to insert the License Plate in a form

• Store the License Plate on the Database

• Ask the Operator to insert the Engine Serial Number in a form

• Ask the Operator to check if the Engine Serial Number is in the arrival list: - If so, unload the Engine in the Warehouse

(78)

© SIEMENS DF PL DER MOM DL 2015

78

Using SIT PM two sets of Production Rules will be created:

• the Chassis-Production-Rules (which are executed inside the Chassis Assembling Cell)

(79)

© SIEMENS DF PL DER MOM DL 2015

79

When a production process is started, the following actions are performed:

• The status of the production line is set to BUSY

• Production starts and materials are assembled

• The output material is inspected and if necessary moved to a repair station for rework

(80)

© SIEMENS DF PL DER MOM DL 2015

80

Using SIMATIC IT Material Manager you will model and hierarchically classify the materials involved in the production process.

(81)

© SIEMENS DF PL DER MOM DL 2015

81

Using SIMATIC IT Material Manager you will define Bills of Materials (BoMs) containing the ingredients and the quantities needed for obtaining each product.

Using SIMATIC IT Material Manager you will model and hierarchically classify the materials involved in the production process.

(82)

© SIEMENS DF PL DER MOM DL 2015

82

Using SIMATIC IT Product Definition Manager you will specify the PM processes involved in a specific car model assembly (e.g. Chassis and Car Assembling Processes will be used as Coupe Chassis and Coupe Car

Assembling Processes).

For each process you will define production specifications (e.g. input / output materials, machine set point values, etc.).

(83)

© SIEMENS DF PL DER MOM DL 2015

83

Using SIMATIC IT Production Order Manager you will define an order for the car model you want to assemble (e.g. one coupe model).

In SIMATIC IT Production Order Manager you may wish to specify other product characteristics (e.g. the color).

At runtime, product specifications are sent to SIMATIC IT Production Modeler and production is started on the specified plant.

(84)

© SIEMENS DF PL DER MOM DL 2015

84

SIMATIC IT Data Integration Service enables data exchange between the ERP and the MES system. You will use SIMATIC IT Data Integration Service to import from an ERP system:

• Material Definitions

• Material BoMs

• Product specifications

• Production Orders

(85)
(86)

© SIEMENS DF PL DER MOM DL 2015

86

In the GUI, a yellow or green rectangle indicates the availability of production lines in the plant:

• when the operator decides to dispatch an order the Chassis Assembling Line will be the first to be busy;

(87)
(88)
(89)
(90)

© SIEMENS DF PL DER MOM DL 2015

90

A new library contains the Common-Tools-Folder, which in turn provides the:

Custom-Data-Type-Folder Data-Builder-Definition-Folder Log-Files-Folder

Custom-Function-Folder Life-Cycle-Folder

(91)
(92)

© SIEMENS DF PL DER MOM DL 2015

92

Operation: To open GSI-INDUSTRY-LIBRARY

1. Right-click the root of the Libraries environment tree 2. Select Open

3. In the browser window that appears, select the GSI-INDUSTRY-LIBRARY 4. Click Ok

(93)
(94)

© SIEMENS DF PL DER MOM DL 2015

94

Operation: To set GSI-INDUSTRY-LIBRARY as AUTOMOTIVE sublibrary Right-click the AUTOMOTIVE library

Select Sub-Libraries

(95)
(96)
(97)

© SIEMENS DF PL DER MOM DL 2015

97

Operation: To create a new class (i.e. to derive a new class from S95 library):

1. Right-click the library in which you want to create the class 2. Select Add  Class

3. Select the parent ISA-95 level from which you want to derive your class in the browser window displayed 4. Set the following:

Class-Name

Operation: To create a subclass (i.e. to derive a new class from an existing user defined class)

1. Right-click the parent class 2. Select New Subclass 3. Set the following:

(98)

© SIEMENS DF PL DER MOM DL 2015

98

Operation: To override superior class behaviors:

1. Right-click the subclass 2. Select Override

3. Select the kind of behavior you need to override

4. Browse one of the available entries in the Inherited Methods/Events/Rules/Transaction Rules/Configuration Rules window

5. Apply the changes you require to the selected behavior

The difference between rules and methods / events is that you cannot visualize and override just one single inherited rule, only the rule container as a whole.

(99)

© SIEMENS DF PL DER MOM DL 2015

99

Operation: To add the WAREHOUSE-AREA class

1. Right click the Automotive library 2. Select Add Class

3. Select Area 4. Set the following:

Name: WAREHOUSE-AREA

5. Click OK

Operation: To add the PRODUCTION-AREA class

1. Right click the Automotive library 2. Select Add Class

3. Select Area 4. Set the following:

Name: PRODUCTION-AREA

5. Click OK

Operation: To add the CAR-ASSEMBLING class

1. Right click the Production-Line cell 2. Select New Subclass

3. Set the following:

Name: CAR-ASSEMBLING

(100)

© SIEMENS DF PL DER MOM DL 2015

100

Operation: To load an existing image:

1. Right-click the class or subclass, 2. Select Modify Load-Icon

3. Select the image file on your hard drive

Operation: To edit a new icon:

1. Right-click the class or subclass 2. Select Modify Edit-Icon

(101)

© SIEMENS DF PL DER MOM DL 2015

101

Operation: To modify CAR-ASSEMBLING class icon

1. Right click the CAR-Assembling class in the tree view 2. Select

Modify Load-Icon 3. Select CAR.JPG 4. Click Open

(102)

© SIEMENS DF PL DER MOM DL 2015

102

Operation: To define an attribute

1. Right-click the class in the tree-view 2. Select Properties

3. Select Class Attributes tab 4. Set the following:

Attribute Name Attribute Type Persistency

Note: The Attributes tab in the Class Properties window contains some information about the class and not the

(103)
(104)

© SIEMENS DF PL DER MOM DL 2015

104

In the Class Attributes tab, class attributes are displayed with different colors:

grey for system attributes

dark green for inherited attributes

(105)

© SIEMENS DF PL DER MOM DL 2015

105

(106)

© SIEMENS DF PL DER MOM DL 2015

106

Operation: To add and configure the TRUCK-LICENSE-PLATE attribute to RAW-MAT-WH 1. Open the AUTOMOTIVE library

2. Right-click the RAW-MAT-WH CELL in the library tree-view

3. Select Properties

4. Select Class Attributes tab

5. Click Add

6. Set the following

- Name: TRUCK-LICENSE-PLATE

- Type: TEXT

- Persistency: persistency and log 7. Click OK

8. Click OK

Operation: To add and configure the FIELD-INSPECTION attribute to INSPECTION-UNIT 1. Open the AUTOMOTIVE library

2. Right-click the INSPECTION-UNIT unit in the library tree-view

3. Select Properties

4. Select Class Attributes tab

5. Click Add

6. Set the following:

- Name: FIELD-INSPECTION

- Type: CUBE-VARIABLE

- Persistency: no persistency or log 7. Click OK twice

(107)

© SIEMENS DF PL DER MOM DL 2015

107

Operation: To initialize a non CUBE-VARIABLE attribute

1. Right-click the class icon in the workspace (Template view)

2. Select Properties

3. Select the User attributes tab

(108)
(109)

© SIEMENS DF PL DER MOM DL 2015

109

Operation: To initialize a CUBE-VARIABLE attribute

1. Right-click the class icon in the workspace (Template view)

2. Select Properties

3. Select the User attributes tab

4. Click the attribute ellipsis icon

5. Set the following:

Unit

Cube-Name Type Filter Validity Interval

Default Update Interval Cube Polling Class

(110)

© SIEMENS DF PL DER MOM DL 2015

110

If the configuration of a class attribute is set as fixed reference to a specific RTDS tag: when you create instances of the class, they will all contain the same attribute, related to the same field value.

(111)

© SIEMENS DF PL DER MOM DL 2015

111

In general, you can use the value of any class attribute or any PM expression in the parametric part of the tag name:

“[the attribute name of THE-OBJECT]_fixed_part”

It is also possible to combine more that one parametric parts in the tag name: “[the ATTR1 of THE-OBJECT]_fixed_part_[the ATTR2 of THE-OBJECT]” However, be aware that tag names have a maximum length of 32 characters.

Examples:

“[the ID of THE-OBJECT]_attribute” “[the NAME of THE-OBJECT]_attribute”

“[the ID of the object superior to the workspace of THE-OBJECT]_inspection”

(112)

© SIEMENS DF PL DER MOM DL 2015

112

Operation: To initialize the TRUCK-LICENSE-PLATE attribute:

1. Select the RAW-MAT-WH in the tree view

2. From the Template workspace, right-click the RAW-MAT-WH and select Properties 3. Select the User Attributes tab

4. Set the following:

- TRUCK-LICENSE-PLATE = plate

Operation: To initialize the FIELD-INSPECTION attribute:

1. Open the INSPECTION-UNIT Properties 2. Set the following:

- Unit: CAR

- Cube Name: “[the ID of THE-OBJECT]” (to be typed in exactly!!!)

- Type Filter: PI (Permanent attribute containing an INTEGER value)

- Validity Interval: indefinite (to be typed in exactly!!!) - Default Update Interval: none

- Cube Polling Class: 7 : On Changes

When instantiating INSPECTION-UNIT and after triggering the Synchronize-Tags command, a new RTDS tag will be created (if it does not already exist) and linked to the FIELD-INSPECTION attribute of the single INSPECTION-UNIT instance

(113)
(114)

© SIEMENS DF PL DER MOM DL 2015

114

Operation: To display one or more attribute values next to the icon of the class

1. Right-click the class in the Template view 2. Select Attribute Displays Change

3. Select one or more attributes to be displayed 4. Move the attribute anywhere in the workspace 5. Right-click the class in the Template view 6. Select Attribute Displays Set As Default

(115)
(116)

© SIEMENS DF PL DER MOM DL 2015

116

Operation: To show the Contents folder of a class

1. From the Libraries environment treeview, right-click the class 2. Select New  Content

3. If needed, refresh the treeview: select View > Refresh

Operation: To remove contents of a subclass

1. Right-click the Contents folder 2. Select Delete

Operation: To go straight to the related class definition

1. Right click a library-instance 2. Select Show Show-Library-Class

(117)

© SIEMENS DF PL DER MOM DL 2015

117

Operation: To add new specific Contents for a class

1. Select the Contents folder of the class

2. Select Tools Add Object (or click Add Object button ( )

3. Select either the class palette or a source library from the ones available

4. Use the “Click and Click” mechanism to drop objects from the palette to the workspace 5. Give each instance a name

(118)

© SIEMENS DF PL DER MOM DL 2015

118

(119)

© SIEMENS DF PL DER MOM DL 2015

119

CHASSIS-ASSEMBLING CAR-ASSEMBLING PRODUCTION-AREA

(120)
(121)
(122)

© SIEMENS DF PL DER MOM DL 2015

122

Template Editor and Data Template Editor:

Messaging Manager provides two client applications to create the layout of messages:

Messaging Manager Template Editor

This application is a basic editor to generate messages in the form of Windows pop-ups. This editor is more suitable for simple dialogs: in particular, for example, it is not possible to write custom code in the message to define its behavior when a button is pressed or data selected

CAB Data Template Editor

This is a tool embedded in Client Application Builder, which allows you to define the structure of the message, in terms of

- input and output parameters to be exchanged with the operator

- a link to an ASPX web page which defines the appearance of the HTML pop-up to be shown; on this page you, the developer, are free to add custom code to configure the behavior of the message

For the exercises in this training course, some preconfigured standard Templates and Data Templates are already provided.

You will learn how to create a standard template using Messaging Manager Template Editor in this chapter; you will see how to define a Data Template in Chapter 19, which is dedicated to CAB.

(123)
(124)

© SIEMENS DF PL DER MOM DL 2015

124

Each item, including the template dialog itself, is uniquely identified by a name, the Mnemonic. Double-click an item to configure it.

(125)
(126)

© SIEMENS DF PL DER MOM DL 2015

126

The following actions can be simulated using MSM:

Obtain-License-Plate Obtain-Engine-Serial-Nr Display-Warning-Message

(127)

© SIEMENS DF PL DER MOM DL 2015

127

Operation: To open Messaging Manager Template Editor

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

(128)

© 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

(129)
(130)
(131)

© SIEMENS DF PL DER MOM DL 2015

132

Operation: To show / hide step names

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

(132)

© 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

(133)
(134)
(135)
(136)
(137)

© SIEMENS DF PL DER MOM DL 2015

138

(138)

© SIEMENS DF PL DER MOM DL 2015

139

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

(140)

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

(141)

© 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

(142)
(143)
(144)
(145)
(146)
(147)
(148)

© 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

(149)
(150)

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

(151)

© SIEMENS DF PL DER MOM DL 2015

152

Operation: To expose the Unload-Truck-Rule as method

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

(152)
(153)
(154)

© 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.).

(155)
(156)

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

(157)

© 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

(158)
(159)
(160)
(161)

© 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

(162)
(163)

© 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

(164)

© 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, ...)

(165)
(166)
(167)

© 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

(168)
(169)

© SIEMENS DF PL DER MOM DL 2015

171

For the Return Argument configure Destination Object only, the Destination Attribute must be left blank:

(170)

© 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:

(171)

© SIEMENS DF PL DER MOM DL 2015

173

Configure Destination Object and Destination Attribute in a rule step argument:

(172)

© SIEMENS DF PL DER MOM DL 2015

174

(173)

© SIEMENS DF PL DER MOM DL 2015

175

Display Object

configuration: 1. first window:

2. second window (it opens after clicking OK in the first one):

(174)
(175)

© SIEMENS DF PL DER MOM DL 2015

177

The Engine-Serial-Nr-Rule opens a dialog where the operator enters the serial number of the engine, containing two buttons: OK and Add To List.

We suppose that the operator is given a paper list of expected engines. The operator must click: - OK to acknowledge the engine if present in the list

- Add To List if the engine is not present in the list (because it was not ordered by the car company): in this case we suppose the new engine is nevertheless accepted, but it must be added to the list and a complaint letter is prepared to be sent to the vendor

(176)
(177)

© SIEMENS DF PL DER MOM DL 2015

179

The use of local variables in the current exercise is suggested as the easiest way; nevertheless other methods (display object, direct link, equipment attribute) can be used

If the operator has clicked OK in the previous Send-Message step, then continue, otherwise (which means that the operator clicked Add_To_List) you need to display a warning message

(178)
(179)
(180)
(181)

© SIEMENS DF PL DER MOM DL 2015

183

Note: When you browse the Destination Object and Destination Attribute, the system will write the appropriate syntax for you. E.g. note that, as you click OK, the system replaces AUTOMOTIVE.RAW-MAT-WH with

THE-PLANT-OBJECT (i.e. a keyword that, in each instance of the class, is automatically substituted for the identifier of

the instance)

Add a new setting action to the arguments of the Set-Multi-Variable

Set the following:

Name: Record-License-Plate Type: TEXT

Expression: LICENSE-PLATE local-variable

Destination Object: browse for AUTOMOTIVE.RAW-MAT-WH Destination Attribute: browse for TRUCK-LICENSE-PLATE

(182)
(183)

© SIEMENS DF PL DER MOM DL 2015

185

The value contained in a Display-Object rule step can be retrieved with the following expression:

(184)

© SIEMENS DF PL DER MOM DL 2015

186

Note:

(185)
(186)

© SIEMENS DF PL DER MOM DL 2015

188

The value contained in a Display-Object rule step can be retrieved with the following expression:

(187)

© SIEMENS DF PL DER MOM DL 2015

189

Both steps are available in two versions:

One-shot (parallel):

the execution goes on along the stubs corresponding to all true expressions

In sequence (serial):

(188)
(189)

© SIEMENS DF PL DER MOM DL 2015

191

The steps are used to convert the code value into a description and write it into the MES-QUALITY attribute of the

(190)

© SIEMENS DF PL DER MOM DL 2015

192

The steps are used to convert the code value into a description and write it into the MES-QUALITY attribute of the

(191)
(192)
(193)

© SIEMENS DF PL DER MOM DL 2015

195

Visibility of steps involved in a loop:

After the configuration of the PORT-NAME attribute in the LOOP step, all the steps following the LOOP-IN will be able to browse information available before the LOOP.

On the opposite side, a step in the branch that contains the LOOP step cannot work on steps that follow the

LOOP-IN.

Loop cycle iteration number

Usually loops are used to cycle through Rule-Local-Lists. It often happens that you need to identify the current iteration of the loop in your syntax. This can be done by means of the following keywords:

"the current-loop-cycle of the-port-in"

Loop cycle numbering starts at 1.

Note that indexing in Rule-Local-Lists starts at 0. Thus, in order to keep the two numerations aligned you’ll use the following syntax:

(194)
(195)
(196)
(197)
(198)
(199)

© SIEMENS DF PL DER MOM DL 2015

201

(200)

References

Related documents

(i) bipolar interval valued multi fuzzy regular closed set (BIVMFRCS for short)

If you do not have Internet access, you can use student computers at Morton Col- legeThis course is designed for students who can work independently, havesome computer skills,

Any swimmer entered in the meet, unaccompanied by a USA Swimming member coach, must be certified by a USA Swimming coach as being proficient in performing a racing start or must

Acted as Well Site Construction Team Manager and Head Concurrent Operations on the Norg Underground Gas Storage project. Formed the SJK Consultancy Ltd

The class of sup- ported algorithms includes first and second order diffusion algorithms [34], dimension exchange algorithms (where the nodes balance their load only with one

In fact, the proposed complex model (8) can describe the dynamical evolution of the reputation for virtual organizations, in which let xi (t) denote the reputation degree of the

Detection of hepatic vitellogenin mRNA using rt-PCR in male Xenopus laevis frogs after injection with ethinyl-estradiol at various doses………... Protein concentration of sera from

The analysis’ results showed that the prognostic value of exon 2/3 K-Ras mutations is retained after correction for other well-known prognostic factors (age at diagnosis, tumor