LabVIEW Channel Wires

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange delay when dispose channel wires

I am using channel wires (messenger) to communicate among some loops.

The application is like a serial terminal, that must poll the serial port read, but also write to serial port, then there is a loop/thread just to update a text indicator (see "part2.jpg" on the far right).

 

Just run my main.vi (select a serial port port before running), and try to close the windows.

 

I dont understand why main.vi doesn't exit immediately. Why does he wait??? is it related to channel wire lifetime?

 

thanks

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

The function that is hanging the UI Event Handler Task is VISA Close.  I'm not sure why it takes extra time to close, but the Principle of Data Flow means that the Event Structure can't exit until it finishes.  The other loops close immediately because the Messenger Channels say "Do it Now".

 

I have been using (and abusing) Channel Wires for three-and-a-half years, and many of my VIs use Messenger Channels.  I've never used the Abort feature -- if I want to send an "Exit" message, I send an "Exit" message and have the Reader respond to it.  If it's an "Error", I handle the Error and/or send "Error" and have the Reader do whatever is appropriate.  Makes it simpler, no need for extra Case Statements.

 

This May, at NIWeek 2019, I'll be giving a talk on Using and Abusing Channel Wires, and talking about a Project that runs up to 24 data stations (simultaneously) and has 6 Channel Wires per station + more in the Main routine.  Most of the Channels are Messenger Channels, but there are a few Tag and Stream Channels in there, as well.  Runs like a top.  My talk is at 4:30 pm on Monday, May 20.

 

Bob Schor

Message 2 of 3
(3,773 Views)

Thanks,

 

I noticed in fact that I open the VISA serial port at the very start (with the VISA configure.vi).

I will try to redo the VI without the abort on the channels to stop them.

I won't be at NI week , I look forward to have your pptx or video linked here.

It's important for me that channel wires are "solid" because I can avoid actor framework for the simpler cases.

0 Kudos
Message 3 of 3
(3,763 Views)