Adding Devices from Template

Overview

Device templates are related to a specific fieldbus device. They contain the following information:

oFieldbus device configuration

oControl logic (controller programming) (optional)

oVisualization elements (visualization programming) (optional)

You can create your own device templates from your project. For details, refer to the Steps to Create a Device Template chapter.

Add Device from Template

EcoStruxure Machine Expert provides 2 ways to add a device from a device template:

oCreating a device using a device template by drag-and-drop:

Step

Action

1

Open the Devices & Modules view of the hardware catalog.

2

At the bottom of the Devices & Modules view, activate the option Device Template.

Result: The templates of field devices available in EcoStruxure Machine Expert are displayed in the Devices & Modules view.

3

Select an entry in the Devices & Modules view, drag it to the Devices tree, and drop it at a suitable subnode of a controller.

Remark: Suitable subnodes are highlighted by EcoStruxure Machine Expert.

Result: The Add Device From Template dialog box displays.

G-SE-0010159.1.gif-high.gif

 

 

4

In the Add Device From Template dialog box, set the Device Name as well as the Device Address if the fieldbus requires numerical addresses. In case the device templates includes control logic, select the program (POU) in which the control logic is inserted.

5

Click the OK button.

Result: The device is created and parameterized according to the selected device template including the optional visualization screens and control logic.

oCreating a device using a device template via contextual menu:

Step

Action

1

Open the Devices tree.

2

Right-click field device manager, and execute the command Add Device From Template from the contextual menu.

Result: The Add Device From Template dialog box displays.

G-SE-0010159.1.gif-high.gif

 

 

3

In the Add Device From Template dialog box, select the Device Template to be used, and set the Device Name as well as the Device Address if the fieldbus requires numerical addresses. In case the device templates includes control logic, select the program (POU) in which the control logic is inserted.

4

Click the OK button.

Result: The device is created and parameterized according to the selected device template including the optional visualization screens and control logic.

NOTE: The undo / redo function is not available for the process of creating field devices.

Naming of Objects

In order to avoid naming conflicts if the same device template is used as a basis for creating different field devices, the following naming conventions are applied to the field devices and the associated objects (FB, visualization, and variables):

If the name of the original object...

Then ...

Case 1:

contains the name of the original field device,

this part of the object is replaced by the name of the new field device that is created.

Example:

The device template for the field device ATV1 contains a variable Var_ATV1_Input.

For a new device Axis1 being created with this device template, the new variable is correspondingly named Var_Axis1_Input.

Case 2:

does not contain the name of the original device,

the name of the new device plus an underscore are inserted in the original name to form a unique new name.

Example:

The device template for the field device ATV1 contains a variable Var_Input1.

For a new device Axis1 being created with this device template, the new variable is correspondingly named Axis1_Var_Input1.