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.
04-27-2009 03:55 PM
The READ POTS.vi is in a loop and takes about 15 seconds to execute, so everything that follows has to wait for it to finish, including the boolean output. I would like to hardwire the boolean to FALSE so it's initially false, but then is TRUE if the READ POTS.vi results call for it to be true. In other words I don't want the boolean output to be indeterminate while waiting for READ POTS. Is this possible?
04-27-2009 04:06 PM
04-27-2009 04:08 PM - edited 04-27-2009 04:09 PM
Hi wb2nvy,
well you haven't attached ReadPots.vi... And there is no loop in your example.
When the boolean output results from ReadPots, then everything else has to wait for it. It's called dataflow...
You may use other structures like (functional) globals in seperate loops to get your desired behaviour!
Edited: @Dennis How does it come we both say "It's called dataflow"
04-27-2009 04:33 PM
GerdW wrote:...
Edited: @Dennis How does it come we both say "It's called dataflow"
Message Edited by GerdW on 04-27-2009 11:09 PM
Great minds think alike.
04-27-2009 08:04 PM
of course-
with 15 whole seconds you could calculate both results and select the desired path when you do have a deterministic value- you've got time- write code that makes CLADs shutter
04-28-2009 07:15 AM
I didn't realize sarcasm was such an integral part of Labview forum responses from you "great minds". DENNIS and GERD: I'm very much aware of the concept of "data flow". I've been using it quite successfully for the past 3 years. If the boolean is not read, then it's INDETERMINATE until it IS read, and therefore a problem in my program, and this is what I want to avoid.
GERD: I didn't attach ReadPots.vi because you don't need to see it to answer my question. Suffice that it has to finish before it sends out numeric values to be compared with the EQUAL operators.. and trust me, there IS a loop in the larger part of the vi that I didn't show. You don't need to SEE it to understand what I'm trying to accomplish. There's no point in attaching the whole main VI to illustrate a problem in a smaller part of it. JEFF: your response doesn't make sense. I have inputs which I want to override the 15 second delayed input, so my program can proceed WITHOUT having to wait 15 seconds.
Apparently this isn't a friendly place to get Labview help.
04-28-2009 07:55 AM
Hi wb2nvy,
don't be angry to ask here - we will always try to give (good) answers!
Well, you said: "The READ POTS.vi is in a loop" and then you show an example without ReadPots and without a loop - so I had to ask for...
This is a "friendly place" for LabView help, but questions should be on the point too!
What is wrong with my answer? Didn't I give a suggestion? (Remember: "You may use other structures like (functional) globals in seperate loops to get your desired behaviour!")
You have to use seperate structures (loops or other) to achieve the desired behaviour. Functional globals serve nice here, too.
04-28-2009 08:08 AM - edited 04-28-2009 08:13 AM
RESET!*
There is one excetion to the "Dataflow paradigm".
If a sub-VI is set as "sub-Routine" you pick-up an option to "Skip Subroutine Call If Busy".
What this means is if the sub-VI in question is actually being executed in another thread, rather than waiting for the other thread to complete and stalling the current thread, the call is skipped! THe data that is returned from the skipped call is the default of the data type (defaul-default). I have used this option many times and it works great (except in onve version of LV 7 where its was hosed). I use a boolean retuned by the sub-routine that is set true when the sub-routine returns. THe caller can check if the boolean is true to determine if the sub-routine was executed.
Another method would be use a single element queue. If the queue is empty the boolean is not there yet. If the queue has something in it, it reads the boolean state.
Is any of that helpful?
Ben
* Is should that read "Over charged"?
04-28-2009 08:15 AM
Thanks Ben. You understand my question and gave me some good ideas. And without sarcasm. I'll try them.