04-28-2023 08:51 AM
Network Stream Error -314350
I am trying to connect network streams from two different application to one other application.
Application A <> Application C
Application B <> Application C
It is working without problems, if the applications are running in the LV development environment. As soon as I execute the executables, only one application can connect, the other gets the error -314350
(From https://labviewwiki.org/wiki/LabVIEW_Error_Code_Family:
LabVIEW: (Hex 0xFFFB3412) Another application is already streaming data to an endpoint in the context you specified. If you specified a context name in the reader name or writer name terminal of the endpoint, you must specify an unused context name. If you did not specify a context name, you must specify an unused context name by entering an endpoint URL in the reader name or writer name terminal.)
The url in Application A is //localhost:ScriptHandler/script1_out_writer (if in executable)
The url in Application B is //localhost:ScriptHandler/script2_out_writer (if in executable)
If I change the name of the context, it is still not working.
The url in Application A is //localhost:ScriptHandler1/script1_out_writer (if in executable)
The url in Application B is //localhost:ScriptHandler2/script2_out_writer (if in executable)
Only one executable (either A or B) can connect with the application C.
Can anybody help me to solve this issue?
Regards,
Hannes
Solved! Go to Solution.
04-29-2023 09:33 AM
It is really so much easier when we have actual VIs to examine. So I'll ask some questions to help me understand your situation.
Bob Schor
05-02-2023 02:57 AM
Hi,
Thanks for your answer.
Currently all applications are running on the same PC, thus "localhost" should work instead of the IP address.
Application C (Create Network Stream Reader Endpoint Function)
readername = //localhost:ScriptHandler/script1_in_reader
writerurl = not connected
Application A (Create Network Stream Writer Endpoint Function)
writername = script1_in_writer
readerurl = //localhost:ScriptHandler/script1_in_reader
Application C:
readername = //localhost:ScriptHandler/script2_in_reader
writerurl = not connected
Application B:
writername = script2_in_writer
readerurl = //localhost:ScriptHandler/script2_in_reader
In the debug version (running inside the development environment) the parameters are different:
Application C:
readername = //localhost/script1_in_reader
writerurl = not connected
Application A:
writername = script1_in_writer
readerurl = //localhost/script1_in_reader
I hope this information helps...
Hannes
05-02-2023 04:45 AM
Thank you, Johann.
I vaguely remembered seeing something like this before, and found that ten years ago, I answered a similar post for "within a PC Network Streams" (here) and it seemed to have solved the previous poster's problem. Maybe it will also solve yours. If so, please help the next person with a similar question by marking this response as the "solution".
Bob Schor
05-02-2023 05:02 AM
Thanks again for your answer.
I am pretty sure, that I read your linked answer some years ago (as my code to get the context is very similar to your code to get the context).
Unfortunately, it does not solve my issue.
It solves the issue to connect from the executable, and it is possible to connect ONE application. But it does not solve the issue, that I can't connect a second application (Thus using the context twice but with a different reader/write name.
Hannes
05-03-2023 08:44 AM
Network Streams is a one-to-one communication method. So if you have multiple applications wanting to talk to a single node, you will need multiple independent connections. I presented on Network streams a while ago here:
And in that I posted my code and demos on VIPM.IO here.
https://www.vipm.io/package/hooovahh_network_streams/
In there, there are examples on making multiple connections, and having things work in development, and an application.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-03-2023 08:50 AM
Many thanks for your reply!
I will have a detailed look on it.
For the current application I changed the direction of my connections, and this is working in development and executable mode.
(Thus, now Application C is connecting to Application A and Application C is connecting to Application B).
Regards,
Hannes
05-04-2023 05:19 AM
Hi,
I thought, I had a work-around for my network stream problem. But it is not the case.
I had a look to your presentation, it is a very good solution. But I am not sure, if it solves my problem
(connection from Application A to App B, connection from App B to App C).
Thus, I have created small test projects to show the behaviour.
Everythind works fine as long as you are in the development environment. But it does not work as executables.
I can either connect App A to B OR App B to App C, but it is not possible to connect App A to B AND App B to C.
Thanks in advance for any help!
Hannes
05-08-2023 02:12 AM
Hi,
I still haven't found a solution.
Can somebody try the attached application to see if the problem is only my PC?
Regards,
Hannes