From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-13-2010 04:43 PM
I'm familiar with the link you mentioned. One thing I don't like is stopping a loop with an error, like closing a queue after the producer loop, and having the consumer loop stop due to a queue error. I don't think its wrong, I just don't like it. Sending a command to stop is my favorite. But what if you have multiple loops and no queues? I've used local variables, but I've always had reservations about doing it this way. Notifiers sound interesting for this function.
05-14-2010 01:49 AM
Thank you everybody for the interesting contributions.
I already wrote yesterday something that works with single-process shared variables. I was aware of the possible problem of race condition, but I think it will not affect me. Indeed, I write each variables from only one sub-VI. The order of reading is not critical neither as I measure slow variation data. By the end, the order of opening or closing each subVI is not important. Moreover, I can not link subVI for opening otherwise I will not start to measure the weight as the flowrate is not finished, hence I loos the interest of the test.
In the only training I had, LabView Core 1, we do not have seen the Queues and Notifiers, hence I do not have a clue how does it work, I will look it quickly.
Thank you all again for the ideas.
Regards
Renaud Isaac
05-14-2010 10:38 AM
Look at the Labview Examples for queues and notifiers (Click on Help menu, then Find Examples - type Queues in search box). You will learn something new that may be very beneficial in the future.
05-14-2010 10:46 AM
tbob wrote:I'm familiar with the link you mentioned. One thing I don't like is stopping a loop with an error, like closing a queue after the producer loop, and having the consumer loop stop due to a queue error. I don't think its wrong, I just don't like it. Sending a command to stop is my favorite. But what if you have multiple loops and no queues? I've used local variables, but I've always had reservations about doing it this way. Notifiers sound interesting for this function.
I agree but I am leaning toward it being borderline wrong, if not wrong then[Flamesuit ON] lazy [flamesuit OFF]. I try hard to prevent all errors and trap on those I can't prevent. Yes just my own personal philosophy that only real error should ever occur.
Ben
05-14-2010 12:18 PM
Ben wrote:
I agree but I am leaning toward it being borderline wrong, if not wrong then[Flamesuit ON] lazy [flamesuit OFF]. I try hard to prevent all errors and trap on those I can't prevent. Yes just my own personal philosophy that only real error should ever occur.
Ben
Hmmm... You may be right. Stopping a loop on a forced error condition is just plain wrong, and lazy. Good philosopy, only real errors should ever occur. No more forced errors for me.