02-06-2014 12:46 PM - edited 02-06-2014 12:46 PM
Hi ,can someone help me to create this "go to the next if there no event "in the structure event
thank you 🙂
Solved! Go to Solution.
02-06-2014 12:59 PM
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.
02-06-2014 12:59 PM
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.
02-06-2014 01:01 PM - edited 02-06-2014 01:02 PM
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 .
(Darn my slow typing.)
Cameron
02-06-2014 01:35 PM
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
02-06-2014 01:37 PM
there is my program
02-06-2014 02:04 PM
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
02-06-2014 02:14 PM - edited 02-06-2014 02:20 PM
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 controls