LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

performing event structure sequentially

Hello,

 

I started a vi based on an event structure where the events are button pushes.  The code works fine.  I would like to add an additional 'Start' button that would perform the individual events.  Any help or direction you can provide would be greatly appreciated.

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

Sounds like you could be after a state machine, or event driven queued state machine.

 

Do you just want to be able to click your start button and then have it cycle through your sequence in order or do you want to be able to execute the individial items in the sequence separatly and out of order?

 

Look up 'State Machine' for the click start, and leave it option, or 'Queued State Machine' / 'Producer Consumer' if you want to be able to pick states out of order, and also have an option to automatically cycle through.

 

Hope that makes sense.

 

p.s. if you are using LV2012/13 I think there are some templates that would be suitable to get you started

0 Kudos
Message 2 of 7
(2,699 Views)

Thanks, I'll look into the secdond option.

0 Kudos
Message 3 of 7
(2,694 Views)

This is sounding like an ideal case for the QSM, or as many of us are trying to get it renamed to Queued Message Handler.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(2,648 Views)

Not that architectures like state machines and queued message handlers aren't great, but if all one needs is to add a button that triggers other already-coded-for buttons then one can use Value(signalling) Property nodes.

Message 5 of 7
(2,634 Views)

@crossrulz wrote:

This is sounding like an ideal case for the QSM, or as many of us are trying to get it renamed to Queued Message Handler.


Reading the new pages about LV2013, it looks like you have been heard.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 6 of 7
(2,631 Views)

@drjdpowell wrote:

Not that architectures like state machines and queued message handlers aren't great, but if all one needs is to add a button that triggers other already-coded-for buttons then one can use Value(signalling) Property nodes.


I was thinking the same thing, although it'd be slightly prettier to remove those buttons and move the functionality to a User event.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(2,605 Views)