SciFiDryer / ModbusMechanic

Cross platform GUI MODBUS TCP/RTU simulator & gateway. Interprets data types including ascii float and int.
Apache License 2.0
170 stars 15 forks source link

Allow setting up a slave to use a CSV file or similar to fill in register number and values #23

Open kommando828 opened 1 month ago

kommando828 commented 1 month ago

Have been using the Slave Simulator function to emulate PV Inverters for where data loggers have a discovery stage whereby they query certain registers for expected values. Normally this is only 5 to 8 register's and so easy to type in, however I have come across one with nearly 180 registers being queried in the discovery stage. Lots of typing but prone to error.

Suggestion is to use a 5 column CSV with , delimiter for input and holding type

Type of register(input or holding so 3 or 4), register number, Data type float int16 int32 (so 1 2 or 3), Value, word swap (1 or 2 ), byte swap (1 or 2)

So a holding register with register number 40001, data type int16, no word swap, yes to byte swap would be

4,40001,2,1,2

SciFiDryer commented 1 month ago

That is a good suggestion, the import/export option could be added to the menu bar of the simulator once started.