Hi Everyone,
Is there a way to send ethernet measages from one App to another on a differant PC.
Would like to send data that is captured on one app and send it to a differant computer running a second app to display the data?
Thanks,
Wayne M
Pass measages
-
- Posts: 94
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times
-
- Matrix Staff
- Posts: 1279
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 170 times
- Been thanked: 287 times
Re: Pass measages
The vNet Injector might be what you're looking for:
https://www.flowcode.co.uk/wiki/index.p ... Injectors)
https://www.flowcode.co.uk/wiki/index.p ... Injectors)
-
- Posts: 94
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times
Re: Pass measages
Hi Steve,
Thanks for the reply.
What im trying to do is send some float values to a static text box. which i have in the main code and wont to copy on second display over network.
Is there a way to copy the static text display on second screen.
Thanks,
Wayne M
Thanks for the reply.
What im trying to do is send some float values to a static text box. which i have in the main code and wont to copy on second display over network.
Is there a way to copy the static text display on second screen.
Thanks,
Wayne M
-
- Matrix Staff
- Posts: 1279
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 170 times
- Been thanked: 287 times
Re: Pass measages
Sorry. I've never used that component, but it sounds like it should do what you want.
Have you tried looking at the vnet examples?
Have you tried looking at the vnet examples?
-
- Posts: 94
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times
Re: Pass measages
Hi Steve.
Yes I have had a look and can see how to send switch values to control LEDS. But can't see how I can use to send float values to a second app.
Thanks,
Wayne M
Yes I have had a look and can see how to send switch values to control LEDS. But can't see how I can use to send float values to a second app.
Thanks,
Wayne M
-
- Matrix Staff
- Posts: 1279
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 170 times
- Been thanked: 287 times
Re: Pass measages
Looking at the macros for the component, it sends and receives byte values. You could try converting your float value to a string, send it as a sequence of bytes, and then recreate the string at the other end.
-
- Posts: 94
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times
Re: Pass measages
Hi Steve,
Sorry to be a pain. But i have had a play with VNet and found that it is not available in App developer.
Thanks,
Wayne
Sorry to be a pain. But i have had a play with VNet and found that it is not available in App developer.
Thanks,
Wayne
-
- Matrix Staff
- Posts: 1279
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 170 times
- Been thanked: 287 times
-
- Matrix Staff
- Posts: 1763
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 448 times
- Been thanked: 607 times
Re: Pass measages
Hello,
Hmm shame that vNet is not available in AD, I might look into this and see what we can do here.
For now the following should provide an example of fairly robust server and client type comms as we use with our AllCode systems and should be a bit more flexible then the vNet approach.
The server sits and waits for clients to connect to it. It then pulls in any data sent to it and looks for a command start code ":" followed by a command body and terminated with a command end code ";\n".
Once it receives this it processes the command. The first byte sent after the command start is the command code and tells the server what the client is trying to do. This then provides the basis on what to do next, bytes to send and receive etc.
In the examples I have two commands A and B which are created in the ProcessCommand macro.
A takes a floating point value from the client and passes to the server.
B takes a floating point value from the server and passes to the client.
Hopefully fairly straightforward but let us know how you're getting on with this.
To make the apps run simply start the server app running. Then on the client app you just need to enter the IP address of the server into the properties window and then the client app should run and connect and allow two way data. Both apps can run on the same PC for testing purposes.
To keep things organised and easier to debug we generally draw up an API table that shows what each command will do in terms of parameters and returns. This is an example taken from our AllCode Robot Arm.
Hmm shame that vNet is not available in AD, I might look into this and see what we can do here.
For now the following should provide an example of fairly robust server and client type comms as we use with our AllCode systems and should be a bit more flexible then the vNet approach.
The server sits and waits for clients to connect to it. It then pulls in any data sent to it and looks for a command start code ":" followed by a command body and terminated with a command end code ";\n".
Once it receives this it processes the command. The first byte sent after the command start is the command code and tells the server what the client is trying to do. This then provides the basis on what to do next, bytes to send and receive etc.
In the examples I have two commands A and B which are created in the ProcessCommand macro.
A takes a floating point value from the client and passes to the server.
B takes a floating point value from the server and passes to the client.
Hopefully fairly straightforward but let us know how you're getting on with this.
To make the apps run simply start the server app running. Then on the client app you just need to enter the IP address of the server into the properties window and then the client app should run and connect and allow two way data. Both apps can run on the same PC for testing purposes.
To keep things organised and easier to debug we generally draw up an API table that shows what each command will do in terms of parameters and returns. This is an example taken from our AllCode Robot Arm.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 94
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times