08-30-2013 09:35 AM
I am having issues trying to make my program Start and Stop accordingly.
What I want to do is to Start the loop when a button is pressed and Stop it either by a Button or by an Event. The events could be any of the Boolean on the code attached.
I have tried using an event structure with a while structure inside and then the loop but still things were not quite right: Start/Stop buttons were not working, etc.
if anyone could help me I will appreciate it.
regards
08-30-2013 09:39 AM
Just a hint to all of you out there posting LV 2013 vis. Since many people are only getting their DVDs maybe a week or so ago, you won't find much help unless you save as a previous version.
08-30-2013 09:47 AM
thanks for the hint 🙂
just uploaded a 2010 version of it. Hope it helps 🙂
08-30-2013 10:00 AM - edited 08-30-2013 10:03 AM
That helps a lot. 🙂 (Sorry for my last post - it wasn't meant to be as terse as it sounded).
How about something like this?
[edit] watch out - I forgot that I deleted the file stuff...
08-30-2013 10:08 AM
that seems just like what I needed.
thanks a lot.
Just one more thing, if I need to also be able to stop (just like your toggle switch does) but when an event occurs, how can I implement that?
08-30-2013 10:28 AM
@jjjohnson wrote:
that seems just like what I needed.
thanks a lot.
Just one more thing, if I need to also be able to stop (just like your toggle switch does) but when an event occurs, how can I implement that?
That will be a little more challenging. New --> from template --> Producer/Consumer Design Pattern (Events) and adapt the code in your vi to fit into the consumer loop. 🙂
09-02-2013 03:18 AM
Hi Bill,
When you say adapt the code, does that mean that I have to move everything from the other block diagram page to the new Producer/Consumer Design Pattern (Events) page?
can you give me some further hints on this?
thanks for the help.
09-03-2013 10:18 AM
@jjjohnson wrote:
Hi Bill,
When you say adapt the code, does that mean that I have to move everything from the other block diagram page to the new Producer/Consumer Design Pattern (Events) page?
can you give me some further hints on this?
thanks for the help.
Roughly, yes that's about right. However, study the architecture of the design pattern above to see how to adapt your code to run there. You might have to massage the code a little, but it should survive fairly intact.
09-06-2013 03:46 AM
Hi,
I have been trying to understand the sequence of the producer/consumer loop.
I have put my loop inside the producer loop (read NI-DAQ, data log, etc). I see that it doesn't run all the time, only when I press the queue button.
Apart from that, I would like to make the boolean LEDs to make the loop STOP if any of those go TRUE.
can you give me some further steps on how to proceed?
hope to hear from you soon
09-06-2013 04:47 AM
attached more or less want I need to achieve even though I am not using the producer/consumer loop:
when the boolean goes high, stop the loop. But I don't know if its possible to make it like this.
hope to get some feedback soon.