LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with code from NI's "Tutorial: Creating a Real-Time Application"

Solved!
Go to solution

I went through all 6 parts of this tutorial about how to make applications which transfer data between a real-time target and a host computer. My target is a PC running the Real-Time operating system. When I try running "Real-Time Main.vi" and then "Windows Main.vi", it works the first time. But I encounter the two following problems:

  1. When I hit the stop button on "Windows Main.vi", I get an error on "Real-Time Main.vi." The source is the "Write Single Element to Stream" function and the code is "-314220." It says a possible reason is "The remote endpoint has been destroyed." I think I've fixed this by adding a 500 ms delay in "Window Main.vi" before the stream endpoint is destroyed so that "Real-Time Main.vi" has time to get the message to stop running. But I still have problem 2...
  2. The second time I try running these two VIs, "Windows Main.vi" will add one more point to the chart, but then no more. And when I hit the stop button, it doesn't do anything. So I have to abort both VIs. And here's the weird part, if I try the VIs a third time, they work again. In fact, it seems to alternate between working and not-working, so that I see this same broken behavior every other time I run the VIs. Also, I don't get errors in the error out indicator for either the windows or real-time vi.

Any ideas? I've attached the two VIs. I'm running Labview 2011. Thank you!

Download All
0 Kudos
Message 1 of 3
(837 Views)
Solution
Accepted by ConfusedGrad

I "fondly" remember LabVIEW 2011.  I was just getting into LabVIEW, LabVIEW Real-Time, and trying to rewrite an existing LabVIEW RT project, about 2000 VIs/TypeDefs, with absolutely no documentation (no VIs had a "Description", one VI (which did the majority of the "Legacy DAQ" code) took about 20 pages of paper to print the Block Diagram (I taped those pages together -- it read like a Torah Scroll, but left-to-right).

 

I remember it taking me several weeks to properly load this LabVIEW Version (without errors) on whatever version of Windows we were running in those days (I think it might have been XP?).  Many calls to NI Tech Support, many attempts to find which steps in the Installation Sequence triggered the NI Services to shut down.  Lots of struggles to get Network Streams to run, many confusing "We apologize for the Inconvenience" crashes ...

 

I went to my second or third NI Week in 2012, and attended a presentation about Network Streams.  I remember asking the Developer speaking during that session about the problems I had documented with Network Streams in LabVIEW 2011, and she laughed -- "Yes, we were grateful for your reports, and fixed the bug present in LabVIEW 2011 ..."

 

I certainly would not return to LabVIEW 2011 for LabVIEW Real Time Projects.  I'm currently developing another LabVIEW RT Project, this time running with a myRIO, so I'm forced to use LabVIEW 2019 as this is the most recent version that has a released myRIO Software Toolkit (there never was a LabVIEW 2020 version, a LabVIEW 2021 version was rumored to be released in Q3 or Q4 in 2021, but still nothing ...

 

LabVIEW 2019 works well with Network Streams and LabVIEW RT.

 

Bob Schor

0 Kudos
Message 2 of 3
(775 Views)

Thank you, that's useful advice! I had been considering updating our LabVIEW version, and this adds another item to the pros list.

0 Kudos
Message 3 of 3
(755 Views)