MODBUS:
It can run over Ethernet and RS-485
https://modbus.org/
Python has a MODBUS library: https://www.lmgtfy.com/?q=modbus+for+python
With anything writing drivers can take a long time. I tried to write a LabView driver for a motion controller and it was really hard.
A gazillion years ago, I wrote a FORTRAN program with diver ENTRY POINTS. It was a strange beast, I used the same basic structure for all devices. e.g. Write to log; write to display; parse config line, save config parameters, set config.
It was really, really cool. the txt file had lines and a dispatch code The main routine parsed the txt file and then moved the file pointer back one line an then the driver routine would be called and it would do the read. It may have continued to do the reads until the device changed, It would then back up the file pointer and return.
I also wrote drivers just to optimize speed.
It can run over Ethernet and RS-485
https://modbus.org/
Python has a MODBUS library: https://www.lmgtfy.com/?q=modbus+for+python
With anything writing drivers can take a long time. I tried to write a LabView driver for a motion controller and it was really hard.
A gazillion years ago, I wrote a FORTRAN program with diver ENTRY POINTS. It was a strange beast, I used the same basic structure for all devices. e.g. Write to log; write to display; parse config line, save config parameters, set config.
It was really, really cool. the txt file had lines and a dispatch code The main routine parsed the txt file and then moved the file pointer back one line an then the driver routine would be called and it would do the read. It may have continued to do the reads until the device changed, It would then back up the file pointer and return.
I also wrote drivers just to optimize speed.