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
Unable to get Modbus to work with VNET
Moderator: Benj
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Unable to get Modbus to work with VNET
- Attachments
-
- Master.fcfx
- (9.06 KiB) Downloaded 232 times
-
- Slave.fcfx
- (9.41 KiB) Downloaded 228 times
- 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: Unable to get Modbus to work with VNET
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.
And here are your example files slightly tweaked.
Let me know how you get on.
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.
And here are your example files slightly tweaked.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Unable to get Modbus to work with VNET
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
Thanks
Zane
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Unable to get Modbus to work with VNET
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
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
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Unable to get Modbus to work with VNET
Hi Ben,
I have tried using the modbus master function and i am getting the results i expect.
Thanks
I have tried using the modbus master function and i am getting the results i expect.
Thanks