For this project, we used Modbus as communication protocol and Omega HX303C and OME-ET-7017 Ethernet I/O modules to write a driver that collects live data within 0.1 seconds.
The OME-ET-7000 module requires the use of a jumper to switch from the default voltage to milliampere. The IO module uses Modbus reading input registers to store the analog inputs of the temperature and humidity within the 4-20mA range. This will match the detection range for the sensor (0-100˚ C for temperature and 0-100% for humidity).
DMC used pyModbusTCP, which uses Modbus TCP protocols to get readings from the IO module. pyModbusTCP's built-in method handles the address for registers when calling different methods. For this project we used input registers, which are stored by 0x04 address. pyModbusTCP automatically handled the addresses.
Another feature of this driver is the ability to handle different channels' logging frequency within a module, as well as handle different IO modules. The program is developed to scale for other IO module brands, which could potentially use other communication protocols.
Since the client required different sensors to have the ability to log the environment data under different frequencies, DMC used technology such as asyncio to allow different IO modules to work together. We also used a priority queue system based on different channels, in this case the sensor, to log frequencies to increase the scheduling performance.
The resulting solution increased the client's scheduling performance and met strict sensitivity and temperature consistency requirements.
Learn more about DMC's Python Development Services and contact us today for your next project.