Run a full IO-Link master with no hardware
Category: Engineering
IO-Link development needs a master, a device, a PLC, and bench wires. The bench uses many cables and connections. The cables let you test the parts together. We ran the master stack and the device stacks only in software. The stacks exchange data on the C/Q wire. The exchange runs in your browser and in CI.
You can test all functions of an IO-Link master stack. The test includes the ISDU parameter server. The test includes the cyclic process-data channel. The test includes the event path. The test includes data storage. The test needs a master and at least one device. The test needs point-to-point wires and power. The test needs a unit that controls the other end of the wire. You test the stack by hand on a bench. The regression coverage is thin.
LabWired lets developers run the full exchange. The exchange uses a real master, real devices, and the C/Q wire. The exchange runs headless in software. You can repeat the exchange in a browser tab. You can repeat the exchange on a GitHub CI runner.
How the exchange works
LabWired contains three virtual STM32L476 microcontrollers. One microcontroller runs the iolinki master controller firmware. Two microcontrollers run the iolinki device stack. Each device sends its own process data (0xA5 and 0x3C). IO-Link is point-to-point. One device connects to one master port. These MCUs are separate. Each MCU has a separate address space. A simulated C/Q wire connects the MCUs.
The real master stack drives the C/Q wire. The device stack sends the reply. The bytes cross a simulated UART. The master checks the reply. This is the same firmware that you compile for the silicon. The firmware runs against that same firmware over the simulated C/Q wire.
The full service set
The link can reach OPERATE. The master can read one cyclic process-data byte. These two steps are the easy part. A master stack must run every service on the C/Q wire. The test checks each service. The test asserts that each service completes after the link reaches OPERATE.
| Service | What crosses the wire |
|---|---|
| ISDU read / write | The service reads and writes acyclic parameters. Vendor-name index 0x0010 returns "LABWIRED". |
| Cyclic process data | The device returns the master PD-out byte as the device PD-in. This behavior is the actuator mirror. |
| Events | The device triggers a WARNING event (0x8CA0). The master reads that event. |
| Data storage | The master writes an Application-Tag record. The master reads the record back. The bytes match byte-for-byte. |
A master that works only on a perfect wire is not a master. The test covers three fault paths on the same simulated C/Q wire. The master survives one CRC-corrupted frame in place. The master retries that frame. The master stays in OPERATE. Sustained corruption exhausts the retry budget. Sustained corruption drives the port to ERROR + restart. The master detects a muted device by response-timeout. The port does not act as if the link is healthy. The test covers startup. The test covers cyclic data and acyclic services. The test covers events, data storage, and the failure modes. These parts cover the whole master. The C/Q wire exists only in software.
Try the lab in your browser
The frame below runs the real firmware. The firmware is a WebAssembly build of the simulator. Press Run. The three boards boot together. The boards step in lockstep. Click a sensor board. That board reaches OPERATE. That board publishes its process-data byte to the master.
The CI results
The browser lab and the CI model use the same firmware. The browser lab and the CI model use the same simulator core. The exchange in the tab above also runs headless on a CI runner. The runner checks each byte. The check runs on every push. The iolink-native-c-master job starts the real master against the real device stack. The job checks that every service completes on the C/Q wire. The job status is green. The job finishes in under two minutes. The job does not use hardware in the loop.
Core IO-Link Native workflow runs the master against the device. The service run is green in CI. See the runs ↗Real device firmware tests a real IO-Link master. The test covers the full service set. The C/Q wire exists only in software. You can run the exchange in a browser tab. You can test the exchange in a browser tab. You can observe the exchange in a browser tab. CI gates the exchange. The test does not use a bench, a PLC, or a cable.