undoBUS Coming Soon

undoBUS In Development

Fieldbus master implementations for the undoRT ecosystem — built on undoCore's IoBus interface.

🚧

In Active Development

undoBUS is the next major component of the undoRT ecosystem. Follow the GitHub repository for progress updates.

Overview

undoBUS provides fieldbus master implementations that integrate seamlessly with the undoRT ecosystem. Built on the IoBus interface defined in undoCore, undoBUS will offer deterministic, real-time fieldbus communication for industrial automation.

💡 Design Philosophy: undoBUS implements the IoBus contract, ensuring that any fieldbus protocol can be used interchangeably with undoPLC. The bus drives the cycle timing — undoPLC is always the follower.

Architecture

undoBUS follows the IoBus synchronization protocol defined in undoCore:

/**
 * Synchronization protocol:
 *
 *   [Bus]  cycleStart()  → copyIn() → notifyPlc()
 *   [PLC]                                          → execute() → notifyBus()
 *   [Bus]  copyOut() → sendFrame()
 */

Core Components

Component Description Status
EtherCATMaster IgH EtherCAT Master wrapper with real-time scheduling ● Planned
ProfibusMaster Profibus DP master implementation ● Future
SimulatedBus Simulated fieldbus for testing and development ● Planned
IoBusAdapter Adapter for custom fieldbus implementations ● Planned

EtherCAT

The first fieldbus protocol to be supported by undoBUS is EtherCAT, using the IgH EtherCAT Master as the underlying stack.

Key Features (Planned)

⚠️ Requirements:
  • IgH EtherCAT Master kernel module
  • PREEMPT_RT kernel
  • Root privileges for real-time scheduling

Anticipated API

#include 
#include 

using namespace undoCore;
using namespace undoBUS;

// 1024 inputs, 512 outputs
ProcessImage<1024, 512> pi;

// Configure and start EtherCAT master
EtherCATMaster bus("eth0", "/path/to/eni.xml", pi);
bus.start();

// PLC cycle — bus drives the timing
while (running) {
    // Bus waits for cycle and copies inputs (copyIn)
    if (!bus.waitCycle(1000)) {
        // Watchdog timeout
        break;
    }

    // PLC executes user logic (reads from pi, writes to pi)
    plc.run();

    // Notify bus that PLC is done
    bus.notifyDone();  // bus calls copyOut() and sends frame
}

Profibus

Profibus DP master support is planned as a future extension. The implementation will follow the same IoBus contract, ensuring protocol-agnostic integration with undoPLC.

📋 Planned: Profibus DP master with configurable baud rates, slave parameterization, and diagnostic support.

Other Protocols

Additional fieldbus protocols are under evaluation based on community interest and industrial demand. Potential candidates include:

🔌 Extensible Design: The IoBus interface makes it straightforward to add support for any fieldbus protocol. Contributions are welcome!

Integration with undoCore

undoBUS is built on undoCore, using:

#include 

class EtherCATMaster : public IoBus {
    // Implements all IoBus virtual methods
    // Uses ProcessImage for I/O mapping
};

Integration with undoPLC

undoPLC consumes the IoBus interface, making it completely agnostic to the underlying fieldbus protocol:

// In undoPLC MasterTask
class DemoMasterTask : public UndoMasterTaskBase {
protected:
    void readInputBus() override {
        // Bus waits for cycle and copies inputs
        if (!_bus->waitCycle(1000)) {
            // Watchdog timeout
            handleWatchdog();
        }
    }

    void writeOutputBus() override {
        // Bus copies outputs and sends frame
        _bus->notifyDone();
    }
};
✅ Protocol Agnostic: undoPLC works with any fieldbus that implements the IoBus interface — EtherCAT, Profibus, Modbus, or a simulated bus for testing.

Roadmap

Milestone Description Status
v0.1.0 Basic EtherCAT master wrapper with IoBus interface ● Planned
v0.2.0 Distributed Clock (DC) synchronization support ● Future
v0.3.0 Simulated bus for testing and development ● Future
v1.0.0 Production-ready EtherCAT master with full diagnostics ● Future
v1.1.0 Profibus DP master implementation ● Future
📖 More information: Visit the GitHub repository for the latest development status and contributing guidelines.

API Reference

Full API documentation will be generated with Doxygen when the first release is available: Browse API Reference

📝 Documentation in Progress: API documentation will be generated as the implementation is completed. Check back after the v0.1.0 release.