# How to control an Output on a MOXA ioLogik using the CoCoS MOXA connector

## Question or Case description

This article describes how to configure and control outputs on **Moxa ioLogik** devices using the new **device connector** in CoCoS.  
The connector replaces the previous script-based method, providing a more user-friendly and reliable way to manage digital inputs and outputs.

Use this article when you want to:

- Create a Moxa ioLogik device in CoCoS.
- Control its digital outputs (turn ON/OFF or pulse).
- Read its input statuses.

## Application

The Moxa ioLogik device is typically used to control external systems such as doors, gates, etc.  
This setup allows CoCoS to trigger digital outputs through a direct device connector, without the need for custom scripts or webhooks.

## How To

Follow the steps below to add and configure the Moxa ioLogik device, and control its outputs.

<table border="1" id="bkmrk-step-1%3A%C2%A0navigate-to-" style="border-collapse: collapse; width: 100%; height: 332.364px;"><colgroup><col style="width: 50.0433%;"></col><col style="width: 50.0433%;"></col></colgroup><tbody><tr style="height: 46.3182px;"><td style="height: 46.3182px;">**Step 1:** Navigate to **"System / Devices"**, and click on the **new device** button.</td><td style="height: 46.3182px;">[![HyxGYMUujdNygBGl-image.png](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/scaled-1680-/W8HhMmwq3d9Y56jk-hyxgymuujdnygbgl-image.png)](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/W8HhMmwq3d9Y56jk-hyxgymuujdnygbgl-image.png)

</td></tr><tr style="height: 79.9091px;"><td style="height: 79.9091px;">**Step 2:** Enter a clear and descriptive **Device Name** (for example: “Location - Moxa ioLogik”).  
Select **Moxa ioLogik** from the **Device Type** dropdown list, and click **Add**.

</td><td style="height: 79.9091px;">[![image.png](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/scaled-1680-/78LG1csIM7WSKSlP-image.png)](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/78LG1csIM7WSKSlP-image.png)

</td></tr><tr style="height: 79.9091px;"><td style="height: 79.9091px;">**Step 3:** In the device configuration panel:  
\- Enter the **IP Address** of the Moxa ioLogik.  
\- Set **Status** to **On**.  
\- Click **Save**.

</td><td style="height: 79.9091px;">[![image.png](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/scaled-1680-/Eq921znBSmr3En6U-image.png)](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/Eq921znBSmr3En6U-image.png)

</td></tr><tr style="height: 63.1136px;"><td style="height: 63.1136px;">**Step 4:** After saving, the device will automatically create a list of **Tags**. These tags represent the available **inputs** and **outputs** on the Moxa ioLogik.

</td><td style="height: 63.1136px;">[![image.png](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/scaled-1680-/hkVbPJ8PGYyZQygT-image.png)](https://knowledgebase.cocos.software/uploads/images/gallery/2025-10/hkVbPJ8PGYyZQygT-image.png)

</td></tr><tr style="height: 63.1136px;"><td style="height: 63.1136px;">**Step 5:** To **control an output**, use the corresponding tag:

\- Set the tag value to on / off.

\- Set the tag value to milliseconds for sending a pulse.

</td><td style="height: 63.1136px;">  
</td></tr></tbody></table>

## Validation

To verify that the device and outputs are working correctly:

1. Open the **Device** view in CoCoS.
2. Check that the device shows as **Running**.
3. Toggle an output and observe the physical response (e.g., relay click, light indicator, or external system activation).

If the device does not respond / has status error:

- Ensure the IP address and network connection are correct.
- Confirm that the Moxa ioLogik is powered and reachable.
- Ensure "Restful API" is enabled on the Moxa ioLogik.

## References

- [Moxa ioLogik Official Documentation](https://www.moxa.com/en/support/product-support/software-and-documentation?psid=42116)