How to configure big value mapping data

Hello all

It is my first time with grafana so please dont shout at me :slight_smile:

I need to create dashboard to control over 50 machines in my company through modbus.
I have created config and dashboard and look preatty cool but i have problem with value mapping.

The value what i need to map is proccess step time. Some processes has 3minuts and others 45 minus - how i can display this on the dash? I recive from modbus data like this (only first column)

0 0 min
256 1 min
512 2 min
768 3 min
1024 4 min
1280 5 min
1536 6 min
1792 7 min
2048 8 min
2304 9 min
2560 10 min
2816 11 min
3072 12 min
3328 13 min
3584 14 min
3840 15 min
4096 16 min
4352 17 min
4608 18 min
4864 19 min
5120 20 min
5376 21 min
5632 22 min
5888 23 min
6144 24 min
6400 25 min
6656 26 min
6912 27 min
7168 28 min
7424 29 min
7680 30 min
7936 31 min
8192 32 min
8448 33 min

do I have to map every single value from modbus to be able to displat actual time on my dash ?

10 values i can map, but what if i have some processes which takes liake 90 minuts. I need to configure 90 values on this lace ?

Hi @kominekmarek

What is your datasource? It might make more sense to do the “conversion” there.

How are you retrieving the Modbus values? I use Node-RED and again, you could do the conversion there with a lookup table.

Even if you are forced to type out the 90 or so values in the Value Mappings section of Grafana, you would only have to do it once (takes 20 minutes max).

It collect data from telegraf

Can you please answer this question?


You could reference an array of your map values in Flux and then have your Influx query use the minute value (instead of the Modbus data), but that is a fairly intricate Flux query. You might save time by just creating a giant list of Value mappings in Grafana.

1 Like


Also, instead of Telegraf, have you tried/used Node-RED? It’s perfect for grabbing Modbus data, manipulating it to your liking, and then sending to InfluxDB. I use it extensively for collecting Modbus data and sending to InfluxDB.

Telegraf is first what i found. If I have some free time at work i do this project. Telegraf was first what i’ve founded online for collecting modbus data, but i am trying to run this as a test, Grafana and other stuff is installed on windows desktop PC. I have plan to reinstall all on Linux when i grab all the data what i need. I received a tcpip/modbus from a representative of the company from which we have the devices, but nothing more and I try to put all togethet.