Link to home
Start Free TrialLog in
Avatar of tf2012
tf2012

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

ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tf2012
tf2012

ASKER

Thanks David,  modbus is not a common topic in here it seems :).  All good, I'll just set up some registers and get on with it. thanks again
As I mentioned, this is the first I've ever heard of Modbus since actually working with it in the mid 1980s.

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.