--- alias: user-guide-automation-task-core-equipmentsetup tags: - automation tasks description: "The `On Equipment Setup` task configures drivers and handles connection events, slated for removal in version 12" --- # On Equipment Setup :iot-equipmentsetup-lg:{style="font-size: 100px"} The `On Equipment Setup` task configures the driver and handles key driver-related events (not equipment events). It is automatically added to the workflow when the driver is created and is used exclusively by that driver. Although it is technically possible to include multiple instances of this task, only one `Equipment Setup` and one `Equipment Setup Result` task should exist per driver per controller. ![Screenshot showing equipment setup interface with "On Equipment setup" heading and "Equipment setup" label.](../images/image35.png) !!! warning This task is deprecated and will be removed starting with version 12. Its functionality, along with Equipment Setup Result have been split into three separate actions: [[user-guide-automation-task-core-equipmentconfig]], [[user-guide-automation-task-core-driver-event]] and [[user-guide-automation-task-core-driver-command]]. ## Workflows | Data Flow | Control Flow | | :--------: | :---------: | | :material-check:{ style="color: #4DB6AC" } | :material-close:{ style="color: #EF5350" } | ## Inputs | Name | Data Type | Description | | -------------------------- | ------------- | ------------ | | connect | `any` | Instructs the driver to configure and connect to the equipment. | | reconnect | `any` | Instructs the driver to disconnect and reconnect to the equipment. | | disconnect | `any` | Instructs the driver to disconnect from the equipment. | |`` | `any` | Protocol-specific communication parameters. Each protocol defines its own. | ## Outputs | Name | Data Type | Description | | ---- | ---------- | ----------- | | onInitialize | `Boolean` | Triggered when the controller establishes a connection with the driver. | | onSetup |`Boolean` | Triggered when the driver successfully connects to the equipment (socket, port, directory, etc) and is ready for setup. | | onHeartbeat | `Boolean` | Occurs at defined intervals during the `communicating` state to verify communication integrity. | | onCommunicationChange | `String` | Triggered when the communication state changes. | ## Settings | Name | Data Type | Default | Description | | ---------- | ----------- | ----------- | ----------- | | Connecting Timeout |`Integer` | 30000 | Time (ms) to wait while establishing a connection. | | Setup Timeout |`Integer` | 10000 | Time (ms) allowed for setup between the `onSetup` and `success` stages of `On Equipment Setup` and `Equipment Setup Result`. | | Reconnect Interval |`Integer` | 5000 | Time (ms) between connection retries. | | Heartbeat Interval |`Integer` | 60000 | Interval (ms) between `onHeartbeat` triggers. Used to validate connection integrity. Some protocols may not detect connection drops in realtime. | ![Screenshot showing settings for equipment setup.](../images/image36.png) Each protocol driver defines its own communication parameters, displayed in the **Inputs** tab as a list. These values are sent to the driver unless a link overrides them. ![Screenshot showing equipment setup settings with communication parameters.](../images/image37.png) ## Behavior When the Controller process connects to the driver process, the **On Equipment Setup** task activates and triggers `onInitialize`. The workflow then defines the next actions. Possible configurations include: ### Single Equipment Scenario - Configure the exact communication parameters in the **Settings** page. - Link the `onInitialize` output directly with the `connect` input. ### Multiple Equipment Scenario - Configure shared communication parameters in the **Settings** page. - Create or reuse attributes in the entities that represent unique communication parameters for each device, such as: - `Resource\IpAddress` - `Resource\IpPort` - Add an `Entity Instance` task: - Select the instance representing the equipment (controller or driver). - Select attributes containing the device-specific communication properties. - Link the `onInitialize` output to the `Activate` input of the **Entity Instance** task. - Link each **Entity Instance** attribute to the corresponding **On Equipment Setup** input that defines the communication parameter. - Link one **Entity Instance** value to the `connect` input of **On Equipment Setup** ![Screenshot showing a multiple equipment setup scenario with an entity instance linked to the on equipment setup connect input.](../images/image38.png) !!! note Multiple On Equipment Setup tasks can be linked in sequence to establish communication only after the previous connection succeeds. When the `connect` input is activated, the communication parameters are sent to the driver, and the communication state changes to `Connecting`. ![Screenshot showing a multiple equipment setup scenario with an "On Equipment Setup" component.](../images/image39.png) When the driver successfully connects to the equipment, the state changes to `Setup`, and the `onSetup` output is triggered. ![Screenshot showing multiple pieces of equipment with configuration options.](../images/image40.png) At this point, configuration actions can be executed on the equipment side (such as sending commands or setting authentication properties) to ensure the equipment is in the correct state. If `reconnect` or `disconnect` inputs are triggered, the driver disconnects and transitions to the appropriate state: - `Ready`, if `disconnect` is triggered. - `Connecting`, if `reconnect` is triggered. ![Screenshot showing a multiple equipment scenario with a device labeled "MENBIBRIOTERO CONES".](../images/image41.png) ## Remarks This task is dependent on the `Equipment Setup Result` task to complete the setup process. {% include-markdown 'includes/pages/automation_zones_note.md' %}