Modbus TCP

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Modbus TCP

Post by EtsDriver »

Today i found out that many of our devices should in future support Modbus TCP client/server... How hard would it be to implement the Modbus TCP and Modbus RTU over TCP? This could be archieved using some ethernet modules like ENC28J* or WizNet. ENC would be easier to be implemented onto a PCB.

The TCP usually doesn't need slave ID:s, but in my case, the TCP slave could have multiples serial devices (or measurement adc) under it and it would act as a Modbus TCP Gateway (so the slave ID would tell the device to put the message out to the correct measurement device).

Ive seen there are some gateway devices out there, but it would be always better to be on way to get the on-board Modbus TCP to the devices! :)

Would be glad to hear any opinions and suggestions about this!
Ill just keep the good work up!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Modbus TCP

Post by Benj »

Hello,

I don't see this being a massive problem. In fact it's probably very simple to pull off. However the problematic thing is the wifi / ethernet module. These all tend to require different methods to talk to them so we might have to make seperate modbus components for each module style. Or we add the interface mothods to one component though things might get messy fast with i2c, SPI and UART comms all going on in a single component.

This is a fairly huge problem so maybe we could create a sort of abstraction layer that all ethernet and wifi modules would work with. This would certainly help our IoT push that we are planning for the near future and allow our examples to be more universal and friendly.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Modbus TCP

Post by Benj »

Modbus TCP is now included in Flowcode 8, I've not managed to do a massive amount of testing but certainly the simulation is looking good.

Hopefully I can test more embedded TCP/IP and WIFI modules soon to ensure these all work as they should.

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: Modbus TCP

Post by EtsDriver »

Benj wrote:Modbus TCP is now included in Flowcode 8, I've not managed to do a massive amount of testing but certainly the simulation is looking good.

Hopefully I can test more embedded TCP/IP and WIFI modules soon to ensure these all work as they should.
Nice to hear, i gotta give it try when i have time. Might even go and upgrade my old V7 then! :D Is it btw available for the RPi target too? :roll:
Ill just keep the good work up!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Modbus TCP

Post by Benj »

Is it btw available for the RPi target too? :roll:
Yes :D

Post Reply