Using vNet injector in FC8

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
planeri
Posts: 11
Joined: Wed Aug 01, 2018 6:20 pm
Contact:

Using vNet injector in FC8

Post 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?

User avatar
Benj
Matrix Staff
Posts: 15014
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Using vNet injector in FC8

Post 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.

planeri
Posts: 11
Joined: Wed Aug 01, 2018 6:20 pm
Contact:

Re: Using vNet injector in FC8

Post 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

User avatar
Benj
Matrix Staff
Posts: 15014
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Using vNet injector in FC8

Post 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 108 times
Again using a UART component here is basically the same thing but using two instances of Flowcode.
UartVnetDemoTx.fcfx
(10.56 KiB) Downloaded 101 times
UartVnetDemoRx.fcfx
(11.54 KiB) Downloaded 110 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 114 times
ModBusSlaveDemo.fcfx
(12.17 KiB) Downloaded 122 times
Please let me know how you get on.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Contact:

Re: Using vNet injector in FC8

Post 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

User avatar
Benj
Matrix Staff
Posts: 15014
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Using vNet injector in FC8

Post 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 99 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.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Contact:

Re: Using vNet injector in FC8

Post 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 3229 times
Thanks

User avatar
Benj
Matrix Staff
Posts: 15014
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Using vNet injector in FC8

Post 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 90 times
Let us know how you get on.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Contact:

Re: Using vNet injector in FC8

Post 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 3214 times
Thanks for your help
Attachments
Node1.fcfx
(9.89 KiB) Downloaded 71 times
Node2.fcfx
(11.62 KiB) Downloaded 70 times

User avatar
Benj
Matrix Staff
Posts: 15014
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Using vNet injector in FC8

Post 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 79 times
Node2.fcfx
(11.56 KiB) Downloaded 79 times

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Contact:

Re: Using vNet injector in FC8

Post by Zane »

Hi Ben,

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

Zane

Post Reply