pymodbus-dev / pymodbus

A full modbus protocol written in python
Other
2.25k stars 922 forks source link

Add uint64 & other 64bit support in Device Entries in Modbus Simulator #2027

Closed schwarzkunstlerin closed 5 months ago

schwarzkunstlerin commented 7 months ago

Why there is no support in configuration for uint64 in Device Entries in Modbus Simulator? I think there should be one and we should be able to initialize this type of data stored in the simulator's register, especially since the library supports reading and writing uint64.

I'm currently working on simulating a device with u64int registers, using the JSON config and I really miss the types!

janiversen commented 7 months ago

Very simple, because nobody programmed it.

Pull requests are welcome.

schwarzkunstlerin commented 7 months ago

I am not sure if I will be able to code something sensible on this topic in the near future, because I don't fully understand how pymodbus and the simulator work yet, but if someone would do it in their free time, I'd be very grateful.

schwarzkunstlerin commented 7 months ago

Well, I started to understand better Modbus & pymodbus. I forked the repo, maybe I will be able to add something sensible as a contribution to this issue. Staaaay tuned!

janiversen commented 7 months ago

Actually it is quite simple, look for the 32 bit conversion methods.

you need to modify: build_registers_from_value and build_value_from_registers

and of course add it as a valid configuration option.

look forward to see a Pull request.

janiversen commented 5 months ago

Seems there are no interest in this issue (although it seems relevant)