LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stream Channel Reader and Writer not Executing

Hi all,

 

I am suddenly having a peculiar issue where my stream channel writers and readers are not executing in a VI I am working on.

 

Some background:

- I am using multiple different channel types and only the stream channels are not executing.

- Everything was working great as I developed and tested the VI on the PC then the channels stopped working after switching to developing on my CRIO 9047.

- I have deleted the "Channelinstances" folder and had them regenerate several times but the problem still persists. 

- Not even after clearing all data, rebooting my PC, and creating the simple attached VI will it work properly. The channel will write but not read which is equally as baffling.

 

Has anyone had a similar issue occur? Any help or ideas would be appreciated.

Download All
0 Kudos
Message 1 of 7
(1,580 Views)

Your code works perfectly, doing exactly what you tell it to do.  There are two peculiarities which you might, or might not, have noticed or intended:

  1. The two Channel Wires are of different types.  The top one, wired to Element 2, is a Lossy Stream of size 1, while the other is a normal Stream with no pre-determined size.
  2. Your Channel Readers correctly read the same Random Number placed into the two Streams.  Having done this, the Readers stop.  The loops continue to run, and the lower Stream continues to "accept" new data (probably eventually exhausting memory).

What did you intend?  Why two different Streams?  Why Write Many Times but Read Once?

 

Bob Schor

0 Kudos
Message 2 of 7
(1,521 Views)

Hi Bob,

 

Sorry that was a poor example from the end of a long day. I quickly realized I was missing a loop around the channel reader. I had a normal stream and a Lossy stream as both types were giving me trouble in my VI and I was trying to recreate the issue. 

 

I have attached my actual VI that is having the problems.

 

When I deploy it to the cRIO, the messenger and tag channels work as desired however the stream channels misbehave. It seems to be something to do with the portion where I read the data from the AI module as the channel writer never executes even though data is being read. However I was able to add a stream channel to pass the data from the Acceleration AI Mod loop to a test loop and that worked as expected, yet if I deleted all the channel instances and re drew them from the AI Mod Loops to the Acquisition Loop it still did not execute.

 

I also wrote a quick VI that just read sensor data and used a stream channel to display the data in another loop to test that it wasn't some aspect of streaming data on the cRIO I did not understand but it worked just fine.

 

Any help, advice or insight would be appreciated as this is my first LabVIEW project and I am a little out of my depth! 

 

Ethan

Download All
0 Kudos
Message 3 of 7
(1,497 Views)

Somehow I missed that you were doing this on a cRIO.

 

I've been an enthusiastic User (and Abuser) of Channel Wires since they were a "hidden Feature" in LabVIEW 2015, and have been using them heavily ever since they were formally released in LabVIEW 2016.

 

Up until early 2020, I'd only been using them on "regular LabVIEW", occasionally employing several hundred in a Project.  Recently I started work on a LabVIEW Real-Time project using a RIO device as the RT Target.  I was using mainly Messenger Channels to create what I called a Channel Message Handler (think QMH with Messenger Channels instead of Queues), and started getting "mysterious errors" and other problems.

 

My "conclusion" was that the version of LabVIEW running on the Target OS (Linux RT?) didn't quite handle Channel Wires properly.  It took several weeks of trials and errors, including several exchanges with NI Technical Support, for me to try (sob) abandoning Channel Wires and going back to Queues (for my Messages) and other non-Channel methods of synchronization, but at least my code now runs.

 

It's been several months since I mentioned this to NI.  I don't know what the current status is, but I'll try to find out.

 

Bob Schor

0 Kudos
Message 4 of 7
(1,490 Views)

This definitely aligns with my experience as it was all running perfectly in "regular LabVIEW" then fell apart when I sent it to the real-time target.

 

Glad I'm not imagining things and its good to know I can always switch to queues in a pinch to get things working.

 

Thank you for looking into this, I really appreciate it!

0 Kudos
Message 5 of 7
(1,483 Views)

Glad you just replied!

 

I've filed a Support Request with NI, referencing my earlier Request and mentioning your situation.  You have something I couldn't supply, a fairly simple VI that "blows up", which I (and NI) would love to test.

 

However, I cannot run your code (so I cannot "test" it), as it uses functions (Settings Dialog 5, Measure and Log Settings control, possibly others).  Can you please include all of the VIs and TypeDefs needed to run this code?  The easiest way to do this is (if the LabVIEW Project and all of its files are in a single folder) to compress the Folder containing the LabVIEW Project and attach the resulting .zip file.  If, for any reason, you feel uncomfortable doing this, please send me a Private Message here on the Forum and we can discuss this.

 

Bob Schor

0 Kudos
Message 6 of 7
(1,473 Views)

I'm glad this community is so helpful! Much more used to struggling under my rock aha.

 

For whatever reason it is now throwing errors from the actual code for the tag messenger channel itself which was not a problem yesterday. The stream channels didn't throw errors they just didn't execute.

 

I think I've managed to zip up all the necessary files. Glad I can provide a useful test case!

0 Kudos
Message 7 of 7
(1,469 Views)