×

Devices and Applications

PLC Shift configurations are made up of devices and applications. A device corresponds to a single Linux based industrial computer. A device can own multiple applications. Settings at the device level, such as which protocol is used to communicate with the controller, apply to all applications under that device.
 
Applications are created under a device. There is no inbuilt limit to the number of applications that a device may have, however, in practice, hardware must be sized appropriately to support many applications. The limiting factor is usually how long it takes to synchronize tag data with the PLC.
 
Both devices and applications are, fundamentally, a collection of parameters. Parameters are discussed in more detail below.
 

Parameters

Parameters are the fundamental building blocks in PLC Shift. Each parameter holds a single value. Parameters are strongly typed and can only hold a specific type of data (float, boolean, int32, etc.).
 
The different types of parameters are discussed in detail below.
 

Configuration Parameters

Configuration parameters are used to hold the configuration of a device. Configuration parameter values can be updated in PLC Shift Manager as well as at run time if the parameter is synchronized with the PLC or via MQTT.
 
Configuration parameter values are saved to disk by the application runtime. When a runtime is started, it will restore the last saved configuration from disk without any user intervention.
 
Configuration parameters are inputs to the application.
 

Control Parameters

Control parameters are used to hold values that are ephemeral. Control parameter values are not saved to disk. When an application is started, control parameter values are set to their default values.
 
Control parameters are usually bidirectional, which means that they can be set by both the PLC program and by the application.
 

Status Parameters

Status parameters are read only values that hold some information that the application has generated.
 

User Defined Parameters

User defined parameters are a special case of a configuration parameter. The are used to hold a string value that contains a tag name. User defined parameters are always synchronized with the PLC.
 
Whenever a User Defined Parameter is synchronized with the PLC, or exported to the cloud, it is actually the underlying value in the tag that is synced or exported. In other words, it is not the string value of the parameter itself that is used, but the value of the tag that the parameter refers to.
 

Tag Name

Every parameter in an app or device has an automatically generated tag name, except for user defined parameters. This tag name is used to access the parameter value programmatically in the PLC, via MQTT or in exported data. For user defined parameters, the tag name is entered directly by the user.
 
A device may have multiple applications of the same type. Use the ‘Tag Name Prefix’ configuration parameter, which is found the ‘Overall Settings’ group, to set a unique prefix for all parameters in the application. This makes tag names for applications of the same type unique across the device.
 
A unique tag name prefix is require for all applications belonging to a single device. This avoids duplicate tags.
 
The tag name prefix is not applied to user defined parameters. The tag name in these parameters is used as entered. It may make sense to prefix these on a per-application basis, however.
 

Units

All parameters can optionally have units. Units form a part of the configuration and are saved to disk. Units cannot be updated from the PLC at run time. Units can only be changed through PLC Shift Manager.
 
PLC Shift applications run their internal algorithms in normalized units. Units are converted from user units to normalized units when values are read, and then converted from normalized units to user units when values are written.
 

Sync with PLC

Almost all parameters, except for user defined parameters, can be synchronized with the PLC. When this option is selected, a parameter is included in the PLC specific export and the application will try to read or write the parameter value in the PLC. Parameters that hold a string value cannot be synchronized with the PLC because string values are difficult to read and write using real time industrial protocols.
 
User defined tags are always synchronized with the PLC. Note that it is not the string value of the parameter, but the underlying value that the tag points to that is synchronized.
 
The ‘Sync with PLC’ option for a tag cannot be changed at run time via the PLC. This option can only be changed through PLC Shift Manager when offline. The new configuration must be downloaded to the remote device to take effect
 

Export

The ‘Export on Change’, ‘Export Interval 1’ and ‘Export Interval 2’ settings can be used to export the tag value. Export locations are configured at the device level and include Azure Storage and the PLC Shift Cloud.
 
Choose the ‘Export on Change’ option to export the tag’s value when it changes. You can optionally choose to apply a deadband using the ‘Deadband 1’ or ‘Deadband 2’ selections when Export on Change is selected. The deadbands are configured at the application level (not the tag level) and can be found in the application’s Export Settings configuration group.
 
Choose the ‘Export on Interval’ options to export the tag’s value periodically. The actual intervals are configured at the application level in the ‘Export Settings’ group.
 
Both export on change and export on interval options can be selected at the same time. This is useful to capture a tag’s value immediately after it changes, but to also make sure that a value gets exported periodically for a value that rarely changes.
 
For user defined parameters, it is not the string value of the parameter, but the underlying value that the tag points to that is exported.
 

MQTT

Tag values can be exported via MQTT and Sparkplug B by selecting the ‘Pub MQTT On Change’, ‘Pub MQTT Interval 1’ or ‘Pub MQTT Interval 2’ options. Values that are published can also be subscribed, which allows you to change the tag’s value via MQTT. Values that are not published cannot be subscribed to.
 
The configure options here work similarly to the export options. See section the Export section for additional details.
For user defined parameters, it is not the string value of the parameter, but the underlying value that the tag points to that is exported.
 

Show in Manager

Select this option when you want to see a tag value in the PLC Shift Manager when online, but don’t want to export it or synchronize it with the PLC. When online, only values that are synchronized with the PLC, exported, or published via MQTT, or have the ‘Show in Manager’ option selected are visible.
 

Plug In Architecture

The application runtime on the Linux hardware consists or a base application, which always executes, and application specific plugins, which run as required.
 
When first deployed, the base app only has a default configuration, and no applications are active. When a configuration is downloaded from PLC Shift Manager, the base app will start plugins for the downloaded apps. An error will occur if there is no plugin that corresponds to a downloaded application.
 
New plugins can be downloaded to the Linux hardware without interrupting control. Updating the base app requires a halt in control.