-
Notifications
You must be signed in to change notification settings - Fork 33
Minimal Example IP20 EC DI8 DO8
A complete software walkthrough for the Elrest IP20-EC-DI8-DO8
The IP20-EC-DI8-DO8 Minimal Example demonstrates how to control and monitor digital I/O on a Elrest IP20-EC-DI8-DO8 EtherCAT Fieldbus Controller using the QiTech machine framework.
The device provides:
- 8 digital outputs (DO1–DO8) — controllable from the dashboard
- 8 digital inputs (DI1–DI8) — readable in real time
Unlike Beckhoff EtherCAT terminal stacks (which require an EK1100 bus coupler), the Elrest IP20-EC-DI8-DO8 is a standalone EtherCAT device that connects directly to the EtherCAT master.
-
Elrest IP20-EC-DI8-DO8 EtherCAT Fieldbus Controller
- Vendor ID:
0x741 - Product ID:
0x117b6722 - Revision:
0x1
- Vendor ID:
- 24 V DC power supply
- Linux PC as EtherCAT master
- Standard Ethernet cable
- Wiring tools and appropriate conductors
See Device Example Basics for software prerequisites.
The Elrest IP20-EC-DI8-DO8 combines a fieldbus coupler and I/O in a single unit. It connects directly to your Linux PC via Ethernet and requires a 24 V DC power supply.
The device requires 24 V DC on its power terminals. Refer to the official Elrest documentation for the exact terminal layout of your hardware revision.
⚠️ Always disconnect power before wiring. See Device Example Basics for the safe wiring procedure.
The 8 digital outputs switch 24 V DC loads. Connect the load between the corresponding output terminal and the 0 V (GND) reference terminal.
The 8 digital inputs sense 24 V DC signals. Connect the signal source between the corresponding input terminal and the 0 V (GND) reference.
Use a standard LAN cable to connect your PC directly to the EtherCAT (X1) port of the IP20-EC-DI8-DO8.
See Device Example Basics to install and run the software, then return here for the device-specific demo steps.
Once the backend and frontend are running, the IP20-EC-DI8-DO8 will appear in the device discovery view.
Steps:
- Click Assign on the IP20-EC-DI8-DO8
- Select IP20 Test V1 as the machine type
- Enter a serial number
- Click Write
Navigate to Machines → IP20 Test.
The control page has four panels:
| Panel | Description |
|---|---|
| Digital Outputs | Toggle each of the 8 outputs (DO1–DO8) individually between On and Off |
| Digital Inputs | Live view of each of the 8 inputs (DI1–DI8), displayed as HIGH or LOW |
| Master Output Control | Turn all 8 outputs On or Off simultaneously |
(SoonTM)
Located in machines/src/ip20_test_machine/.
| File | Description |
|---|---|
mod.rs |
Defines IP20TestMachine struct; holds 8-element arrays for inputs, outputs, digital input (dins) and output (douts) HAL wrappers |
new.rs |
Initializes the IP20EcDi8Do8 device, creates DigitalInput / DigitalOutput wrappers for all 8 channels |
api.rs |
Handles SetOutput { index, on } and SetAllOutputs { on } mutations; emits StateEvent (outputs) and LiveValuesEvent (inputs) via Socket.IO |
act.rs |
Real-time loop: reads inputs, emits state at 30 Hz, emits live values at 10 Hz |
The HAL device driver is located in ethercat-hal/src/devices/wago_modules/ip20_ec_di8_do8.rs.
Located in electron/src/machines/ip20testmachine/.
| File | Description |
|---|---|
useIP20TestMachine.ts |
Custom hook; manages optimistic state and sends SetOutput / SetAllOutputs mutations to the backend |
IP20TestMachineControlPage.tsx |
UI with output toggle controls, live input badges, master on/off, and input summary |
ip20TestMachineNamespace.ts |
Socket.IO namespace handler; updates the Zustand store with incoming StateEvent and LiveValuesEvent messages |
QiTech Control | GitHub | Video Demo | Open Source Framework for Industrial Control
- Getting Started
- Adding a Machine
- Adding a minimal machine e.G. 4CH DO
- Code Style
- Performance
- Testing
- Adding Presets to Machines
- NixOS
Beckhoff:
WAGO:
- 4 Digital In (750-402)
- 8 Digital In (750-430)
- 8 Digital In + 8 Digital Out (750-1506)
- 4 Analog In (750-455)
- 2 Digital Out (750-501)
- 8 Digital Out (750-530)
- Stepper (750-671 & 750-672)
- Power Supply (2789‐9052)
- Serial Interface (750-652)
- 4-channel Analog input module Pt100 RTD (750-460)
- 8 Digital In + 8 Digital Out (750-430 + 750-530)
Elrest:
WAGO: