Skip to content

On Equipment Setup#

image34

The On Equipment Setup task is used to configure the Driver and be notified when important events (driver events, not equipment events) occur. This task is only used by the driver that was defined during creation (when creating the workflow for the first time, it is automatically added).

Although it is currently possible to add more than one of these tasks, you should not do so. As a rule of thumb, one On Equipment Setup and one Equipment Setup Result task per driver per controller.

image-20191211222547558

Inputs#

Name Data Type IsTrigger Description
connect any Yes Indicates the driver to configure and connect to the equipment
reconnect any Yes Indicates the driver to disconnect and connect again with the equipment
disconnect any Yes Indicates the driver to disconnect with the equipment
<communication parameter> any No Each protocol has its own communication parameters

Outputs#

Name Data Type Description
onInitialize Boolean Triggered when the connection between Controller and Driver is established
onSetup Boolean Triggered when the driver was able to establish a communication with the equipment (socket, port, directory, etc) and it is ready for the configuration flow to start
onHeartbeat Boolean Occurs every n seconds during the communicating state to allow validation of the communication integrity
onCommunicationChange String Triggered when a communication state is changed

Settings#

Name Data Type Default Description
Reconnect Max Attempts Integer 0 Maximum number to attempts to establish a communication (0 means forever)
Require buffering Boolean true Flag to determine if the driver should cache messages received from the equipment while a drop of communication occurred
Connecting Timeout Integer 30000 Number of milliseconds to wait while trying to establish a communication with the equipment interface
Setup Timeout Integer 10000 Number of milliseconds to wait while setup is being performed.
Setup phase is between onSetup and success stages of On Equipment Setup and Equipment Setup Result
Reconnect Interval Integer 5000 Number of milliseconds to wait between failed connection attempts
Heartbeat Interval Integer 60000 Number of milliseconds to separate the onHeartbeat outputs to be triggered. Use this option to validate if the connection with the equipment is still valid. Some protocols may not detect connection drops in realtime.

image-20191211223853203

Each protocol driver as its own communication settings. They will be listed in the Inputs tab in a list. These values will be the ones sent to the driver if no link is used to override them.

image-20191211224643975

Behavior#

When the Controller process successfully connects to the Driver process, it will activate this Task by triggering a value in the onInitialize output. It is up to the workflow developer to determine what to do next. There are multiple possible scenarios and each one may require additional tasks to accomplish. Some examples are described next.

  • Controller is to be used exclusively by one equipment and no others will be acquired

    • Configure the exact communication parameters in the Settings page

    • Link the onInitialize output directly with the connect input

  • Controller is to be used with multiple equipment

    • Configure the shared communication parameters in the Settings page

    • Create (or reuse) attributes in the entities that will represent the not-shared communication parameters of the devices.

      • example: Resource\IpAddress

      • example: Resource\IpPort

    • Drop an Entity Instance task

      • Select the correct instance that will represent the equipment (controller, driver)

      • Select the attributes that will contain the not shared communication properties

    • Link the onInitialize output with the Activate of the Entity Instance task

    • Link each attribute of the Entity Instance with the On Equipment Setup input that represent the communication parameter

    • Link one of the values of the Entity Instance with the connect of the On Equipment Setup

image38

Note

You can link different On Equipment Setup tasks to cascade the establish communication of driver to only activate if the previous succeeds.

When the connect input is activated, the communication parameters are sent to the driver and the communication state changes to Connecting.

image39

When the driver manages to connect with the equipment, it will change its state to Setup and the onSetup output will be triggered.

image40

This is the right time to make any setting on the equipment side (send commands, set some properties to authenticate, etc) to make sure everything is in the desired state.

If the reconnect or disconnect input is triggered, the driver will first disconnect and enter the next state (to ready if disconnect or to connecting if reconnect).

image41

Remarks#

This task is tightly dependent on the Equipment Setup Result to determine the setup process result.

There should only be one of this Task for each driver per Controller.

The communication parameters inputs only appear after you open the settings for the first time. This is already addressed and will be fixed in a future version.

This task uses a specific structure of context-based data called zone. For more information, see Zones.