MODBUS RTU

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
mscrace1981
Posts: 7
Joined: Thu Nov 08, 2007 6:58 pm
Contact:

MODBUS RTU

Post by mscrace1981 »

Hello,

I'm interested in implementing MODBUS RTU protocol within Flowcode on PIC18F family. I would like know whether it is possible and also if anyone has tackled this. Some Sample code would be very much appreciated to get me started.

Thanks in advance,

Matt

User avatar
Steve
Matrix Staff
Posts: 3424
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: MODBUS RTU

Post by Steve »

I have no experience of this, but I found a few examples of source code via a web search. Also, there is a Wikipedia page with links to source code and more information.

User avatar
mytekcontrols
Posts: 95
Joined: Sun Aug 19, 2007 6:38 pm
Location: Santa Rosa, California
Has thanked: 4 times
Been thanked: 7 times
Contact:

Re: MODBUS RTU

Post by mytekcontrols »

This would be of interest to me as well. I probably wont get around to trying this until later this year, but if I do come up with something I'll be sure to post it. Of course I too need to learn the protocol.
Michael St. Pierre
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.

mscrace1981
Posts: 7
Joined: Thu Nov 08, 2007 6:58 pm
Contact:

Re: MODBUS RTU

Post by mscrace1981 »

Thanks for your replies guys. I am unsure as to whether it is easier to embedded c code into a flowcode macro or to build up the MODBUS routine structure from scratch using Flowcode blocks :shock: . The dilemma lies in the fact that i've never put c code into Flowcode before and i want to make it easy on my self :lol:

Thanks,

Matt

User avatar
mytekcontrols
Posts: 95
Joined: Sun Aug 19, 2007 6:38 pm
Location: Santa Rosa, California
Has thanked: 4 times
Been thanked: 7 times
Contact:

Re: MODBUS RTU

Post by mytekcontrols »

It seems like it should be quite possible to build the protocol from within Flowcode itself. Just be a matter of using If-Then decision blocks to sort out the commands. Of course there might be a way to streamline it based on decoding commands and parameters separately. Perhaps even creating macros for the common elements. I'll be doing something like this in a couple of months for a protocol called ModCom. Later when I take a good look at ModBus, I'll probably find that I'll be able to use some of the same techniques.
Michael St. Pierre
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: MODBUS RTU

Post by MJU »

Hey mytekcontrols

Did you use Flowcode with Modbus already?
I'm interested in this topic and want to hear from your work with Modbus...

Does anyone have a solution for the question of the topic starter???

Post Reply