LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure

Solved!
Go to solution

Hi ,can someone help me to create this "go to the next   if there no event "in the structure event 

thank you 🙂

0 Kudos
Message 1 of 8
(2,832 Views)

Hello,

 

Not exactly sure what you mean, from what I understand...

 

Maybe you could add a button dialog box to alert you there is no event and then click OK to move to the next event.

 

 

0 Kudos
Message 2 of 8
(2,822 Views)

What is the "next" you want to go to?

 

Sounds like you want a timeout value on your event structure.  This will cause the code to advance beyond the event structure if no events have occurred prior to or within the time period specified by the timeout.

 

If not, please post your VI so we can see what it is you are trying to do.

0 Kudos
Message 3 of 8
(2,821 Views)

Yes, many of us could, but the LabVIEW Help screen on "Event Structures" tells you in the first paragraph. Get to know the Help file. It really wants to be your friend Smiley Happy .

 

(Darn my slow typing.)

 

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 4 of 8
(2,815 Views)

i would that my program read the waveforme continusly , if there are no changes in the controle ,but my program stopped  in the event structure 

 

 

0 Kudos
Message 5 of 8
(2,793 Views)

there is my program

0 Kudos
Message 6 of 8
(2,790 Views)

Okay, since you're timing your loop, you don't want an event, use one or the other.If you want to use loop timing:

 

What I would do is use your user controls to select T/F selector terminals in separate case structures for each parameter (determine if you have chaged the value of the control, there is more than one way to do that), put the Configure XX VI inside the T case and straight wires in the F case. That way your data acquisition will only miss the amount of time it takes to change setting XX (this is unavoidable, anyway), and if you have an independent timing source for the X axis of your graph, you won't skip a beat.

 

If you want to use events, it'll be similar, but you use the event timeout and "Value changed" event type instead.

 

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>
Message 7 of 8
(2,776 Views)
Solution
Accepted by topic author ENENT'COm

First, let us go back through the help file and point out a caveat about "Latching" booleans and value change events. 

 

The "Best Practice" is to put the terminal for latching booleans inside the event case that handles the value change event.  This prevents all sorts of troubles when the "Latched Value" is changed but the terminal is not "Read". 

 

Did you really want to do all of the same things that you do when "stop" is pressed as when other controls values changed? (Probably NOT- so why only the one case?)

 

Did you really want to update the cursors when something else was changed too?  (I Doubt it - so, where are the Value Change events for those booleans?)

 

Why is there a wait for next mSec multiple in the while loop?  There is no user in the universe that can generate events faster than 1mSec and, if there was, the event structure would be held back so that the UI would be "Unresponsive"

 

In general, if you want the user's actions to cause an effect, you need an event case to apply the desired effect when the user does that "Something".  and then only do that specific thing.   You need more event cases- they should only apply the new changes.

 

Oh, and having multple controls with the same label is "Bad"  You might want too rename a few controlsSmiley Wink


"Should be" isn't "Is" -Jay
Message 8 of 8
(2,769 Views)