06-07-2017 09:58 AM
OK, this topic has been discussed before but I just don't seem to get it working.I have a cRIO that measures data and must stream this data to the PC. While running in LabVIEW this works great but when I build the executables (and for the cRIO set as startup) it doesn't work. As my program is rather large I have attached a simple project (incl. the build specifications for the executables) that creates a network stream between a cRIO and a PC, it behaves as described above. The cRIO generates some data (counter, once a second) and the PC needs to displays this, again in LabVIEW this works but not as executables. The cRIO has a fixed IP address but the PC doesn't so I'm not sure if that's the problem. Hope somebody can help.
Solved! Go to Solution.
06-08-2017
09:11 AM
- last edited on
06-03-2025
02:31 PM
by
Content Cleaner
Hey Floris,
I'd check out https://forums.ni.com/t5/LabVIEW/Network-streaming-stand-alone-application/td-p/2462564 for a good place to start. It highlights some common issues when moving to a stand alone application in cRIO.
You could also look at the LabVIEW Real-Time Waveform Acquisition and Logging sample project to double check your code logic.
Let us know how you get on!
Rebecca
06-08-2017 09:22 AM
It looks like you've statically defined the context of the network stream as "startup". I've seen it be either "startup" or "lvrt". Here's some code that will return the proper context of the RT application for the network stream.
06-10-2017 04:01 PM
Ok, I solved it finally.
The statically defined context is OK, in fact I think it should be statically defined as it has to be the same on the compactRIO as well as on the PC and the executables have different names so that wont work. The thing was that I had a timeout on the create network stream endpoint of 100 ms ...... this is too short. The strange thing is that is works in LabVIEW but not as executable. When I changed the timeout to at least 150 ms all was working. I use the short timeout as I have 3 network streams from 3 cRIO's and they might or might not be connected so having a longer timeout would block the other streams for too long as all data from the streams is collected in the same loop, I might change this to three separate loops. Well it took a frustratingly long time but all is working now. In any case thanks for the replies.