Faster way to read state of DI and control of relay ?

  • Hello

    We need a faster way to control relay and read the status of DI.

    Our setup is this:

    We have a C++ control software running with Neuron M503.
    We have a relay output that activates mechanical movement in actuator.
    We also have a digital input connected to limit switch in this actuator.

    So when movement is commanded via relay, we can verify that physical movement has been actually occured by reading an limit switch. Pretty normal setup.

    Now we are controlling relay with EVOK websocket call and also reading the status of digital input with evok websocket. But as our process is pretty fast, this current way of controlling output and reading input seems to be too slow for us, we would need more speed.

    From what I read from this forum, Modbus TCP could be the answer. But then in Github [1], it's marked as "Legacy".

    So is Modbus still viable solution for more speed ? Could we call Modbus TCP from our C++ software and get faster responses than websocket ?

    We also have an UI that uses EVOK via websocket (Node Red) and we would like to keep that as it is. So in ideal solution we could have both - "lower level" calls from our C++ with Modbus TCP and slower UI calls from Node Red with websocket to EVOK.

    Best regards,



  • administrators

    Hello @henkka,
    the ModbusTCP server is still actively developed and it is our most supported API. On Neuron and Axon, make sure you have the most up-to-date version of unipi-modbus-tools package, which you can find in our official repository:
    Then you can access the ModbusTCP server on The documentation of Modbus Registers Map for each device is here:

    If you need very fast access to the IOs (except 1-Wire), I would suggest you to take a look at the SysFS approach. You can find documentation of the endpoints here:

    Let me know, what you have picked.

    Best regards,

  • I took up the sysfs-based approach in my own (golang-based) project:

    Basically, it does active polling on a series of files, representing the different inputs and pushes out an MQTT-event in case there's a change.

Log in to reply