LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Network Stream Error -314350

Solved!
Go to solution

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

0 Kudos
Message 1 of 9
(961 Views)

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.

  • How many "devices" (I was going to say PC's, but I'm using Network Streams between a PC and a RIO running NI Linux Real-Time) are you running?  Network Streams is designed for TCP/IP connections between multiple devices with specific IP addresses.
  • Network Stream endpoints are "asymmetric" -- one end or the other needs a unique IP in order to "reach out" to establish the connection.  I can't tell from your post that this is the case for you.
  • Please provide more descriptions of the three Applications and where/how they are running.

Bob Schor

0 Kudos
Message 2 of 9
(909 Views)

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

0 Kudos
Message 3 of 9
(877 Views)

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 

0 Kudos
Message 4 of 9
(871 Views)

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

0 Kudos
Message 5 of 9
(867 Views)
Solution
Accepted by topic author Johann_Hasiba

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:

 

https://youtu.be/NMYbTlsNlpk

 

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.

0 Kudos
Message 6 of 9
(841 Views)

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

0 Kudos
Message 7 of 9
(837 Views)

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

 

0 Kudos
Message 8 of 9
(818 Views)

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

 

0 Kudos
Message 9 of 9
(774 Views)