Modbus TCP
JordanCClark
Posts: 198
Hey all,
Has anyone made up a MODBUS/TCP object that they're willing to share? I currently have four program launches going on at the same time, so writing one is on the backest of back-burner projects, but I don't want to necessarily re-invent something that may already exist.
I've been developing our SCADA / HMI / Web applications using Ignition from Inductive Automation. Usually for small process items I'll use a small PLC from EZ-Automation, which I've already integrated well into Ignition. But I got to thinking about how snazzy it would be to integrate a Prop. Sorry to have digressed a moment, but a little background may be useful to you.
This is not going into a resale application, as this is really to help monitor processes out on our plant floor-- and maybe help me bring 'em kickin' and screamin' up to Y2K...
Thanks!
Has anyone made up a MODBUS/TCP object that they're willing to share? I currently have four program launches going on at the same time, so writing one is on the backest of back-burner projects, but I don't want to necessarily re-invent something that may already exist.
I've been developing our SCADA / HMI / Web applications using Ignition from Inductive Automation. Usually for small process items I'll use a small PLC from EZ-Automation, which I've already integrated well into Ignition. But I got to thinking about how snazzy it would be to integrate a Prop. Sorry to have digressed a moment, but a little background may be useful to you.
This is not going into a resale application, as this is really to help monitor processes out on our plant floor-- and maybe help me bring 'em kickin' and screamin' up to Y2K...
Thanks!
Comments
Cheers!
Mickster
Really, as I said, it's not a big deal. Someone's got to be the first. It just so happens it may be me... just not any time soon.
If it can talk on ethernet using tcp packets, you can do the little bit more work to interpret and send the serial character stream.
wow, this article is incredibly thorough for being wikipedia:
http://en.wikipedia.org/wiki/Modbus
It shows the frame format, and the function code.
looks like an easy job for the Spinneret, but searches reveal nobody has actually completed such a project yet.
I found these guys yesterday. They provide a free master and slave simulator, but also supply the source code with it. Perhaps a foray into GCC to port it over may be viable.
Okay, jumping back into the grind. Send in the search dogs if I'm not back...
BTW, I use subset of serial MB RTU in one of my projects as simple state machine in plain vanilla SPIN :-) I has a luxury to deal with only floating points to transfer ;-)
Gotta say, they look pretty slick. It also appears they have one for Modbus/RTU to Ethernet/IP as well.
Any way, TCP connection will be driven by external chip with Propeller.
Stay inspired !
Hi JonnyMac, I am looking for code similar to what you have prepared. I haven't found it in the ObEx yet, could you post it or direct me to it please?
Dave
Dave
Isn't the TCP version - just RTU (minus the checksum) encapsulated in an Ip header?
I have run your example code in the ObEx, and it works perfectly. It allowed me to verify my wiring and addressing. \\\What I need is modbus master code rather than slave. I am trying to determine the feasibility of a project...////
OOPS! Just checked and the operator interface device is the master, the prop application would have to be the slave. Glad I checked (gulp!).
I haven't had the chance to improve any further (life keeps getting in the way) but there are plans ...
If you encounter any errors/bugs or areas for improvement I would love to hear from you.
Enjoy
Excellent news.
Yeah I work with industrial stuff every day and constantly find the lack of documentation in code a source of annoyance - I made a conscious decision (many years ago) to document better - I'm glad now I did
When you done and dusted - please share your code so I can extract any really clever bits and incorporate into my "object".
Once again thanks for your work, it was a great benefit!
Dave