Hahas Posted May 10, 2023 Report Share Posted May 10, 2023 Hello I am trying to connect network streams from two different application to one other application. Application A <> Application C Application B <> Application C I have created three test projects showing the problem. In this example I try to connect from Application A to Application B and from Application B to Application C. It is working without problems, as long as 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 following urls are used: 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) Can anybody help me to solve this issue? Regards, Hannes NetWorkStream.zip Quote Link to comment
Hahas Posted May 10, 2023 Author Report Share Posted May 10, 2023 Hello hooovahh, I know, that this is a crosspost. But as I didn't get a solution there, I try it in this forum. Maybe an expert in this forum can help me. Hannes Quote Link to comment
dadreamer Posted May 10, 2023 Report Share Posted May 10, 2023 I would first increase the timeout input on the Create Network Stream node in ApplicationA.vi, so the value would be equal or higher than 160 ms, as I recall some problems related to the timeout being small: Timeout influence at Create Network Stream Endpoint Of course, it may be not your issue exactly, but worth trying anyway. Quote Link to comment
hooovahh Posted May 10, 2023 Report Share Posted May 10, 2023 2 hours ago, Hahas said: I know, that this is a crosspost. But as I didn't get a solution there, I try it in this forum. Maybe an expert in this forum can help me. Oh I get that you're welcome to post it here, I just wanted to link there so anyone here can see the conversation on the subject that has already taken place. Quote Link to comment
LogMAN Posted May 10, 2023 Report Share Posted May 10, 2023 (edited) I'm not familiar with network streams but the online help provides an example for your particular scenario (scroll to the very bottom): Specifying Network Stream Endpoint URLs - NI Based on your code this works for me: Working Example.zip Edit: To provide some more explanation: Only one application can create endpoints in the default (empty) context "//localhost/". Incidentally, this is also the default context when you create a writer endpoint by name. For example, writer endpoint "my_writer" is equivalent to "//localhost/my_writer". In your particular example, Application B creates a writer endpoint "ApplicationA_in_writer", which is equivalent to "//localhost/ApplicationA_in_writer". Application C creates a writer endpoint "ApplicationB_in_writer", which is equivalent to "//localhost/ApplicationB_in_writer". And since only one application can use the default context, the error happens. To create endpoints in separate contexts, you must specify the context in the endpoint name. For example, "//localhost:ApplicationB/ApplicationA_in_writer" and "//localhost:ApplicationC/ApplicationB_in_writer". Edited May 10, 2023 by LogMAN Explaining things 1 Quote Link to comment
Hahas Posted May 11, 2023 Author Report Share Posted May 11, 2023 Dear LogMan, That's the solution! Many thanks! Now everything is working fine 🙂 Hannes Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.