Skip to main content

Selecting specific bit as data (using bit_select)

Description

Some devices send single-point data (0 and 1) in one register. To access the individual bits of the register you need to use the optional parameter - bit_select parameter in the excel configuration. You can read about other optional parameters in the manual section 18. In short, you need to add one more column in the signals sheet with the name bit_select, and in the signals, you use to specify which bit is assigned to the specific signal, starting from 0 to 15 if the register is 16 bits, if we need 2 registers, then from 0 to 32 and so on. In this example, we will explain how to read states from the Fanox fault protection relay.

Configuration

The Fanox relay is communicating via Modbus, the address of the register is 500 using function 3 and the size of the register is 32 bits. So in the job_todo field, we enter 3;500;2 because we need to read 2 registers. The number type is SIGNED32. 

Below is the data that is written in the register as bits.

image-1676894368945.png

To read this data as signals we need to assign each of the bits from 0 to 26 to the created signals. All of the signals have the same job_todo, tag_job_todo , and number_type. But each signal has a specific bit. Below you can see the configuration of these signals.

image-1676894559730.png

This example only displays how to read bit states via modbus, if you are using any other protocol you will need other parameters to read the data, but bit_select parameter will stay.