Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Network streams on cRIO 9035 - Error -314004

Hi all,

 

I'm testing network streams with a simple VI (from the official examples) to transfer data between my RT target (cRIO 9035) to my host (laptop with Windows 7 and Labview 2017). I'm getting Error -314004, i.e. the Create Network Stream Reader Endpoint VI times out despite a generous timeout value of 45000 ms. 

 

I know this question has been asked many times, but none of the solutions in the forums/tutorials seem to help me. The obvious diagnosis should be that I'm using the wrong endpoint URL. I'm following the convention //host_name/endpoint_name as described here: https://www.ni.com/docs/en-US/bundle/labview/page/specifying-network-stream-endpoint-urls.html

 

I'm using the IP address I get from the network settings in NI MAX as host_name, so my endpoint URL looks like //169.254.49.210/MyWriter (see also .lvproj file attached). The cRIO is connected through a crossover ethernet cable, and I'm able to ping it and access the files on it.

 

I'm wondering whether I'm getting the syntax wrong, and I should be adding the context_name bit as described in the link above. But if so, what does context_name refer to? The name of the RT VI? Or of the build? Or... ?

 

In short, any clue would be much appreciated!

 

Thanks,

 

Nate

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

Hey Nate45,

 

Had a go running your example, and no issues here. This is what I used:

 

NS_Reader:

image.png

NS_Writer:

image.png

 

If you can't get it worked with a similar set up I'd suggest looking at the network rather than the code. 

 

Error -314004 When Using Network Streams mentions checking your firewall and antivirus - have you tried temporarily disabling these, or asking your IT to check the communication isn't blocked? You can find the specific ports needed in Configuring Software and Hardware Firewalls to Support National Instruments Products.

 

Let us know how it goes, 
Rebecca

 

 

 

0 Kudos
Message 2 of 6
(2,053 Views)

Hi Rebecca,

 

Thanks for the fast reply. I've changed the buffer size, and I've created a rule in Windows firewall to free the ports listed in the link you sent me, but I'm still getting the same error.

 

I've noticed that NI Application and System Web Servers, mDNS Responder, Service Locator, and TSU Clock Service are not allowed through the firewall (and only the system administrator can change this), but on the other hand all their related ports are. Is this relevant?

 

Just want to make sure I have a case before I pursue this, as our IT department is notoriously reluctant in giving people admin rights.

 

Also, to rule out mistakes at a more fundamental level: I've only worked with the FPGA and RT target before, but I assume the deployment procedure of the VI+variables is the same (minus the compilation, of course)?

 

Thanks again,

 

Nate

0 Kudos
Message 3 of 6
(2,047 Views)

Hey Nate, 

 

Do you now have the exact same settings for the endpoints (except for the different IP of course!)? And just to double check are you definitely running both VIs at the same time? I get that error if I only run the NS_Reader, without then running the NS_Writer afterwards.

 

Also how are you connecting to the cRIO? Are you able to give a screenshot of it's settings in NI MAX?

 

The NI Service Locator does affect the NI Network Discovery... although I've just tried the project again whilst having the services you name disabled and I still run successfully.

 

On the deployment procedure, I'm not sure I understand the question! When I tried this I've just been running simply by pressing the Run button on NS_Writer, rather than deploying this down to the cRIO as a start up executable.

 

Kind regards, 

Rebeccca

0 Kudos
Message 4 of 6
(2,038 Views)

Hi again Rebecca,

 

The settings are definitely the same. As for the deployment, a bit of backstory: NS_Writer is supposed to simulate my future application, which is going to be the signal processing middleman sitting on the cRIO OS between the FPGA (data acquisition) and the PC (data saving and monitoring, simulated here by NS_Reader). Basically I don't want to use remote front panels to access the RT target as I've been doing until now because I want to avoid all potential performance overheads in the cRIO.

 

So to test the communication between the RT target and the PC (which as you can see I know very little about), I need the NS_Writer to run on the cRIO processor (not the FPGA). My understanding was that to do this I need to deploy it to the RT target. I also create a build and set it to "Run as startup", which I thought would guarantee that NS_Writer is always running.

 

Am I completely off base? Is there a simpler way?

 

And of course thanks for your help!

 

0 Kudos
Message 5 of 6
(2,035 Views)

Hey Nate, 

 

Pressing the run arrow on a VI that is under the Real Time target in your LabVIEW Project will still run the code on the cRIO. In the background the LabVIEW displays the front panel of the VI on the host computer whilst the RT target executes the block diagram. It's option A in Interacting with the Front Panels of RT Target VIs

You're right in the fact that this increases the overhead and sections of code that contain front panel controls and indicators can introduce jitter, but its good for quick debugging. 


I've tried deploying as startup too. Still no issue. The project is attached as I made a new real time executable build... but it's much the same as you.

1. I build the "My Real-Time Application" and right click >> Right as Startup

2. The cRIO restarts as the exe is deployed. 

3. Then I run the NS_Reader.vi ... and after about 5 seconds (or less) I start getting some data through.

 

Maybe worth give it a go running it without deploying so you can use highlight execute?

Kind regards, 

Rebecca

0 Kudos
Message 6 of 6
(2,032 Views)