Page 1 of 1

Using vNet injector in FC8

Posted: Wed Aug 22, 2018 12:13 am
by planeri
I was searching for examples using the vNet injector in Flowcode 8, but every video or fcfx file I found was from previous releases. I see this particular function has seen some changes: before you should run Flowserver executable, go to the vNet menu in Flowcode, create a new vNet with a particular client name and add nodes to this virtual net. Now I can't find any executable and the vNet menu in FC is gone, so I don't really no how to initialize the virtual net.

The first time I added a vNet injector Windows firewall asked for permissions, but I can't communicate two simultaneous FC instances. I tried the example in the wiki (https://www.matrixtsl.com/wiki/index.ph ... 7bda03dc82), the TX injector shows the sent characters, but none of them are received by the RX injector.

Any recommendations on how to make this work in FC8?

Re: Using vNet injector in FC8

Posted: Wed Aug 22, 2018 1:00 pm
by Benj
Hello,

I have just had a look into this for you and managed to replicate the problem you are having, data is being sent out but not received.

I'll have a comb through and see if I can find out what's gone wrong as well as some working examples for you to play with.

Re: Using vNet injector in FC8

Posted: Wed Aug 22, 2018 8:29 pm
by planeri
Benj wrote:I'll have a comb through and see if I can find out what's gone wrong as well as some working examples for you to play with.
Thanks,I hope you can solve it! Those examples will surely come in handy! :D

Re: Using vNet injector in FC8

Posted: Thu Aug 23, 2018 5:24 pm
by Benj
Hello,

Right I've just pushed a set of updates to the Flowcode 8 update system to fix a number of minor bugs relating to vNet. I couldn't get the old vNet UDP communications working at all so for now I have switched this over to TCP comms and this is now working nicely.

Here is a really basic example using a single instance of Flowcode to send and receive data. Both the send and receive vNet properties are connected to the same port.
SingleInstanceVnet.fcfx
(12.04 KiB) Downloaded 325 times
Again using a UART component here is basically the same thing but using two instances of Flowcode.
UartVnetDemoTx.fcfx
(10.56 KiB) Downloaded 312 times
UartVnetDemoRx.fcfx
(11.54 KiB) Downloaded 329 times
Here is a simple modbus example showing a master and slave working together using vNet. It should work out the box just start the slave simulation before you start the master and everything should work. If you have access to the console window then this provides a nice level of detail to the comms both at the high level modbus and the low level TCP vNet comms.
ModbusMasterDemo.fcfx
(10.7 KiB) Downloaded 313 times
ModBusSlaveDemo.fcfx
(12.17 KiB) Downloaded 331 times
Please let me know how you get on.

Re: Using vNet injector in FC8

Posted: Mon Oct 01, 2018 12:11 pm
by Zane
Hi Ben,

Would these bugs also be present in FC7? I have tried to get my VNET injector running but have had no luck. I get the message UDP socket on channel 6 failed. I have seen another post relating to this. I have tried disabling my firewall and this has no effect. Do you have any ideas where i can look next?

Thanks

Re: Using vNet injector in FC8

Posted: Mon Oct 01, 2018 1:06 pm
by Benj
Zane wrote:Would these bugs also be present in FC7? I have tried to get my VNET injector running but have had no luck. I get the message UDP socket on channel 6 failed.
Hi Zane,

Hmm yes possibly, here is an updated v7 version of the vNet component.
InjectorVnet.fcpx
(169.07 KiB) Downloaded 327 times
Let us know how you get on. It's possible you will also need a new DLL but let's try without first to avoid complicating things.

Re: Using vNet injector in FC8

Posted: Tue Oct 02, 2018 1:30 am
by Zane
Hi Ben,

I installed the latest component, put a VNET and RS232 component into a project, very basic with an initialize for the rs232 component and then sending out a character every second in a loop. Looking at the console it looks like there is still an issue. Once again tried with the firewall off.
1.JPG
1.JPG (25.2 KiB) Viewed 7547 times
Thanks

Re: Using vNet injector in FC8

Posted: Tue Oct 02, 2018 9:51 am
by Benj
Hello,

Please can you try extracting the attached .dll file into your "Flowcode 7components/dll" folder. Be sure to add the .dll file and not the .zip file.
TCPIP_DLL.zip
(53.99 KiB) Downloaded 330 times
Let us know how you get on.

Re: Using vNet injector in FC8

Posted: Tue Oct 02, 2018 1:59 pm
by Zane
Hi Ben,

The extracted DLL file has been installed and I have set up two instances of flowcode each sending and receiving characters. It looks like they are sending but not receiving. Looks like only the one channel is being opened up. See what you think, hope i have set it up correctly?

Running both of these programs in simulation, both instances of flowcode are extremely slow to respond to any commands. I have tried running another flow chart separate to these without the Vnet or rs232 component and it responds normally.
1.JPG
1.JPG (43.18 KiB) Viewed 7532 times
Thanks for your help

Re: Using vNet injector in FC8

Posted: Tue Oct 02, 2018 4:00 pm
by Benj
Hello,

In your programs one thing I spotted was the incoming and outgoing channels. In one program you use channels 0 and 1. The other program should be 2 and 3 or other unique values. Also the UART components hadn't been linked to the injector components.

Here are some files that hopefully will work better for you.
Node1.fcfx
(9.45 KiB) Downloaded 282 times
Node2.fcfx
(11.56 KiB) Downloaded 278 times

Re: Using vNet injector in FC8

Posted: Tue Oct 02, 2018 4:28 pm
by Zane
Hi Ben,

Ok with the unique channel instances it works fine now. Once again thanks for your good work. :D

Zane