Device Templates
Device templates allow you to save the configuration of a device instance added to the PLANT to a template and reuse the configuration in the same or any other PLCnext Engineer project several times. When you create a device template from a device instance, PLCnext Engineer saves the following data to the template:
- Settings and parameters of the device instance. This applies to standard (non-safety-related) and safety-related devices.
- Subordinated devices (child devices) of the device instance (for example, modules of a Profinet device) with their settings and parameters.
Note
The assignment of data items configured for a device are not saved to the device template. |
Device templates are managed in the 'Device Templates' folder in the 'Local' folder of the 'Network' category in the COMPONENTS area. They can be added to the PLANT via drag & drop or copy & paste from the COMPONENTS area or via the device's station editor (see the following descriptions).
This topic contains the following sections:
- Creating and deleting device templates
- Adding devices from device templates
- Releasing device templates
Creating and deleting device templates
When creating and deleting device templates, observe the following:
- Once a template is created, it is not possible edit it. If you want to create a template with modified settings and parameters, you need to create a new template from the device instance in the PLANT.
- There is no connection between device template and device instance added to the PLANT. This means, when you modify a device instance created from a template, no changes are made to the relating device template.
- When deleting a device template in the COMPONENTS area, the template is only removed from the 'Devices Templates' folder. Instances of the device template added to the PLANT will not be deleted.
To create a device template, right-click a device instance in the PLANT and select 'Create Device Template' from the context menu (the command is only available for device instances for which a template can be created). The device template will be created in the 'Devices Templates' folder in the 'Local' folder of the 'Network' category in the COMPONENTS area (see the following figure). After creation the name of the device template is automatically in edit mode so it can be renamed straight away (renaming is also possible via context menu or pressing <F2>)
When you hover over the device template in the COMPONENTS area, the tooltiip provides information about the device.
To delete a device template in the COMPONENTS area, right-click the template and select 'Delete' from the context menu or select the template and press <Del>.
Adding devices from device templates
There are two ways to add a device from a device template to the PLANT:
Via copy & paste or drag & drop of the device template on a PLANT tree node
Via the Role Picker provided for the station editor of a device in the PLANT
Further Info
See the topic "Offline: Add Devices manually to PLANT" for further details. |
Releasing device templates
The device templates created in the local project can be released to a library via the 'File > Release As Library...' command. This allows you to use the device templates in other PLCnext Engineer projects. In the 'Release As Library' dialog (appears after selection of the 'Release As Library' command'), the device templates you can release are shown in the 'Device Templates' folder (see below).
Note
When you activate the 'Selection' checkbox of a device template in the 'Release As Library' dialog, all child devices (subordinate devices) of the device template are automatically checked in the dialog and thus also released to the library. |
Further Info
See the topic "Releasing Libraries" for further details. |