Modbus bit extraction from a 16-bit status register in Teltonika RUT200

Hello everyone,

I am working on a remote monitoring solution using a Teltonika RUT200 and a DEIF generator controller communicating through Modbus TCP.

The DEIF controller provides several generator status signals packed into a single 16-bit holding register. For example, register 91 contains information such as:

  • Generator running

  • Generator available

  • Fail to start

  • Stopped with fault

  • Common warning

  • Common shutdown

  • And other status bits

The register is structured as a bit field, where each bit represents a different status.

I configured the RUT200 Modbus TCP Client and discovered that when the data type is set to Bool, the router returns the register as an array of bits, for example:


[0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0]

This suggests that the device can internally unpack the 16-bit register.

However, my challenge is the following:

I need to trigger SMS alarms based on individual bits, such as:

  • Bit 9 = Generator Running

  • Bit 7 = Generator Stopped with Fault

  • Bit 6 = Generator Fail to Start

The problem is that multiple bits may be active at the same time. For example:


Generator Running = 1
Generator Available = 1

which results in multiple active bits within the same register.

So my questions are:

  1. Is there any way in the RUT200 to monitor or compare a single bit from a Modbus register?

  2. Does the Modbus Alarm service support bit masking, bit extraction, or wildcard comparisons?

  3. Can Event Juggler be used to access individual bits from a Modbus Bool array?

  4. Has anyone implemented a similar solution without using an external PLC or SCADA system?

At the moment I am considering using dedicated frequency and voltage registers instead of the packed status word, but I would like to know whether bit-level processing is possible directly inside the RUT200.

Any advice or examples would be greatly appreciated.

Thank you.

Greetings, @huerta.jf ,

Thank you for contacting our technical support team and sincerest apologies for a delayed response.

Regarding your query about isolating individual bits from a 16-bit Modbus status register on the RUT200, please note that RutOS reads registers as unified integers and does not natively include a bit-masking interface within the standard WebUI configuration.

To achieve bit-level extraction, we recommend one of the following standard engineering approaches depending on your deployment architecture:

  • Lua Scripting via Data to Server (For Cloud Routing): If you are forwarding data to an external broker, you can upload a lightweight Lua script directly within the Data Senders configuration. The script can mathematically parse the bits and restructure the payload into a clean JSON object prior to transmission.

For more information please refer to this wiki article:

https://wiki.teltonika-networks.com/view/RUT200_Data_to_Server#Data_configuration

  • Custom Register Block (For Local Automation): For local processing on the router, you can enable the Custom Register Block and map it to volatile memory (/tmp/regfile). A background shell script can extract the bits and populate this block, allowing the RUT200 to read them as separate registers without causing flash memory wear. Also please consult the documentation of your modbus TCP device register mapping.

For more information you can refer to this wiki article:

https://wiki.teltonika-networks.com/view/RUT200_modbus_custom_register_block#

Please let us know which approach best aligns with your system requirements, and we will gladly provide the specific configuration steps. Please note, that custom script writing is outside our technical support scope, however, we will try to assist you with the concept of the script.

Best regards,
V.