LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Network Streams Error -314350 and Fix For Multiple Controllers & One Computer

I am working with a cDAQ-9132 and a cRIO-9039. We have one set of sensors and its data being collected and streamed back to the deployment computer by the cDAQ. The data is sent back via ethernet cable to one of the two network ports on the deployment computer. The other sent of sensors and its data is being collected and streamed back to the deployment computer by the cRIO. It is on a different ethernet cable then the cDAQ and connects to the second network port on the deployment computer. The cDAQ, cRIO, network port 1 and network port 2 all have their own static IP. For simplicity I will only focus on the cDAQ program in this post (both programs have also been developed and a separate development computer).

 

The cDAQ program consists of two VI's (see attached). GROUND SENSORS.VI is converted to a .rtexe on ran directly on the cDAQ upon its startup. I have tried naming the Real-Time Executable as My Host.rtexe. The ARCHIVING.VI is converted to a stand alone executable to be run on the deployment computer and I have tried naming it as My Target.exe. The second program (again not attached here) is run in a similar fashion, but just is using different sensors, code, etc. but the network stream setup is similar (different names for the network stream writer and reader as well). 

 

So we are trying to have two different executables run on one computer at the same time with two different network ports, with one .rtexe running on the cDAQ and one on the cRIO.

 

When we set up both programs with the below, one programs executable would work (whichever was started first) and the other would not (in the actual program I use the actual IP not the names I have given to this post),

 

Writer with Name & no URL:

 

Name: Ground_Writer

 

 

Reader with Name & URL:

 

Name: Ground_Reader

URL: //cDAQ IP/Ground_Writer

 

This similar setup on both programs would give us error -314350 when trying to run both simultaneously.

 

After researching that error code, I have been trying to use the setup which is in the attached VI's, which is to use the context_name's in the URL:

 

Writer with Name & no URL:

 

Name: //cDAQ IP:My Host/Writer

 

 

Reader with Name & URL:

 

Name: //Deployment Computer IP:My Target/Reader             

URL: //cDAQ IP:My Host/Writer

 

If I run just the GROUND SENSORS.VI and ARCHIVING.VI in LabVIEW on the development computer with this configuration (without the second set of sensors program running) it works fine. But if I make these programs into a .rtexe and an .exe it doesn't work (starts running but no data comes through even without the second program running).

 

I believe I am missing something here when it comes to naming and URL's with regards to the Network Stream functions.

 

Download All
0 Kudos
Message 1 of 6
(1,810 Views)

I can imagine developing a single Host program that connects to two RT Targets using Network Streams (one set for Target #1, a different set for Target #2).  The part I'm concerned about is having two Host Programs, both of which want to use Network Streams to different Targets.  I'm not sur how a LabVIEW executable interacts with the (single) LabVIEW Run Time System on the Host -- it seems to be that there may be an "unshareable resource", such as links to the Network, in there.

 

Do you have any experience (or other evidence) that running two LabVIEW Executables can both use the Network at the same time?

 

Bob Schor.

0 Kudos
Message 2 of 6
(1,755 Views)

We are actually going to try merging both programs into one (not desirable for our situation, but will manage). I would be concerned of some of the same behavior happening in this case, but we will try and see.

 

This would be the first time we are trying running two separate executables at the same time both using network streams, so no evidence it would work more of we were hoping it would.

 

However, when running the linked VI's on just the development computer (without the second program even on this computer) it works fine. But when I try converting to an .rtexe and .exe on this computer it doesn't want to work. The only time I can get it to work with the executables is if I remove the context_names, but that then of course gives the error code that I listed in the original post when moving over to the deployment computer. Shouldn't I be able to at least get executables to work on the development computer with the context_name's, then I could move it over to the deployment computer and see if its even possible? This is why I think I may just be missing something in the actual code.

 

 

0 Kudos
Message 3 of 6
(1,746 Views)

Sorry for the delay in responding.  Six or seven years ago, I answered a similar question about Network Streams on the Forums, but I can't locate my response, where I spelled out "How to Do This" and explained what a URL was (that, I believe, is your problem).  So I spent a little time and wrote a four-page document, complete with pictures of Block Diagrams (for which I apologize, but I think you should have no difficulty figuring them out and duplicating them).

 

Bob Schor

 

P.S. -- drat!  After all that work, the Forum won't let me attach my PDF.  I'll try to figure out how to get this to you ...

0 Kudos
Message 4 of 6
(1,695 Views)

Hello, 

 

I made 2 UI deployed on one computer (1 network card with an Ethernet switch). Each UI has several network streams with its own dedicated Crio.

 

I'm not sure you did it. That's why I wanted to ask you if you used different "context_name" between app 1 and app 2.

 

You should have this : 

 

Writer app1 :

 

Name: //cDAQ IP:My Host1/Writer1

 

Reader app1:

 

Name: //Deployment Computer IP:My Target1/Reader1             

URL: //cDAQ IP:My Host1/Writer1

 

Writer app2 :

 

Name: //cRIO IP:My Host2/Writer2

 

Reader app2:

 

Name: //Deployment Computer IP:My Target2/Reader2             

URL: //cRIO IP:My Host2/Writer2

0 Kudos
Message 5 of 6
(1,661 Views)

I was able to get it working. The nomenclature of the URL's needs to be:

 

Writer:

 

Name: //localhost:Application 2/writer

 

Reader:

 

Name: //localhost:Application 1/reader

URL: //cDAQ IP:Application 2/writer

 

The second program then follows the same format.

0 Kudos
Message 6 of 6
(1,649 Views)