Page 1 of 1

Unable to get Modbus to work with VNET

Posted: Wed Oct 03, 2018 2:09 pm
by Zane
Hi Ben,

I have tried getting the Modbus components working, a master sending data to a slave and looking for the confirmation back at the master. In the master flowchart in the console you can see Modbus data being generated and the data in the Modbus master - Vnet that is being sent to the slave. When you look in the console for the slave flowchart you can see the incoming data in the Modbus slave - Vnet but in the Modbus slave data this is empty. The macro "check for incoming" appears to be always returning 0 for no data detected.

I think i have configured everything correctly?

Thanks

Re: Unable to get Modbus to work with VNET

Posted: Wed Oct 03, 2018 5:25 pm
by Benj
Hello,

I have spent a bit of time on this now and have things semi working. The master command to the slave is now working correctly but the reply to the master is not correct.

I did a big overhaul of how communications were handled moving from v7 to v8 to get away from these types of bugs and to improve reliability for simulation comms with injectors etc. So I unfortunately cannot simply copy the v8 code into the v7 components because certain features just are not there in v7.

Here is a new slave component.
ModbusSlave.fcpx
(91.93 KiB) Downloaded 274 times
And here are your example files slightly tweaked.
Master.fcfx
(9.65 KiB) Downloaded 274 times
Slave.fcfx
(13.64 KiB) Downloaded 271 times
Let me know how you get on.

Re: Unable to get Modbus to work with VNET

Posted: Thu Oct 04, 2018 10:49 am
by Zane
Thanks for your work on this, I am away for the next few days. When I get back I will try this out and let you know how we get on.

Thanks

Zane

Re: Unable to get Modbus to work with VNET

Posted: Thu Oct 11, 2018 3:54 am
by Zane
Hi Ben,

The simulation is working as you mentioned. I understand about the compatibility issues, no worries there. I have some hardware arriving soon so can try with that. Once again thank you for your help, its always appreciated. Cheers

Re: Unable to get Modbus to work with VNET

Posted: Mon Nov 12, 2018 11:48 am
by Zane
Hi Ben,

I have tried using the modbus master function and i am getting the results i expect.

Thanks