asked on
How to send system run schedule to modbus registers
Any recommendations on how to submit a system run schedule view modbus RTU?
Background:
I have an HMI running a python 2.7 gui (Pyside/QT4). I'm using on of the serial ports to run a modbus-tk server (slave).
I have an IoT gateway that will pass a motor run schedule to the HMI through modbus registers on the HMI. That's the concept anyway.
The schedule structure will look like this:
Sunday: start time*, end time, belt**
Monday: start time, end time, belt
Tuesday: start time, end time, belt
Wednesday: start time, end time, belt
Thursday: start time, end time, belt
Friday: start time, end time, belt
Saturday: start time, end time, belt
* time represented like this 13:45 unless someone has a better idea
**belt is a binary 1 or 0 indicating to run belt A or Belt B
My Approach:
I was thinking of creating a bunch of registers on the HMI modbus server, for example:
Monday start hour
Monday start min
Monday end hour
Monday end minute
Monday belt
Each would be a 16 bit register. Maybe not the most efficient but I don't have any register limit constraints really.
The question:
Before I start writing code, how would a pro handle this? Would you use a bloaty register approach like this or would you try some clever bitmapping stuff? Some other approach that I'm not aware of? Any ideas would help!
Thanks
There are many other protocols which have superseded Modbus, like X10 + friends.
If you get stumped, likely there's some sort of Modbus specific forum you can find to ask questions.
ASKER