03-14-2014 08:43 AM
Hi all
So i have some difficulties to use flush event queue, i would like to know how use it before to put it, i use a Vi test very simple.
So if somebody have any idea?
Thanks for futur repply
Best regarde,
Guillaume.
Solved! Go to Solution.
03-14-2014 08:50 AM
What are you trying to do? Why do you have multiple event structures? Where is your VI? What version of LabVIEW are you using? In 2013 new event controls were added but looking at your picture I'm not even sure what the goal is so I can't say if these new functions will be of any use to you.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-14-2014 09:04 AM
my Vi is in picture, so very basic. i'm using Labview 2013.
I have multiple event structure because in my project i have many buttons, so i prefere to use a simple VI only for test.
and i'm trying to enter in my case and controle in my loop some block (in picture it's is only a led), and when i'm in my loop, if i click on my first button (to enter in case) there is a event in queue, so i would like to flush it because when i leave the loop i return it directly.
(sorry for my english i'm not very good ^^")
i saw event control but i don't really understood how to use it =S
03-14-2014 09:33 AM
03-14-2014 09:35 AM
@Guillaume90 wrote:
my Vi is in picture, so very basic. i'm using Labview 2013.
I have multiple event structure because in my project i have many buttons, so i prefere to use a simple VI only for test.
and i'm trying to enter in my case and controle in my loop some block (in picture it's is only a led), and when i'm in my loop, if i click on my first button (to enter in case) there is a event in queue, so i would like to flush it because when i leave the loop i return it directly.
(sorry for my english i'm not very good ^^")
i saw event control but i don't really understood how to use it =S
A picture is worth a 1000 words, but a VI is worth a million. There are intrisic settings on the VI that don't translate to a picture. What is the mechanical operation of the buttons? Latch? Switch? Release? These are things that a VI can tell me right away. Also I may incorrectly reproduce the VI and have different functionality. Also there are things I can't see like what other events are in each structure?
Very rarly should you ever have more then 1 event structure on a single VI. Not because it in it self is bad, but because people get into situations like yours where one event structure is much more simple, and less prone to issues. Can you have multiple event structures? Sure, plenty of applications can be done that work fine. But whenever I see this I suspect that the developer didn't know what they were doing and are causing application issues.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-14-2014 09:55 AM
because i need event when i click on my button, i can use case if i want, event is may be more reliable?
Yes i'm aware for event structure and it's my trouble because the first event struct keep in waiting my click on my button start, but if i don't place a second event structure in my case i couldn't have my click on buttons, except if i use case struct.
i want to enter in my case with my button start, then switch on my led and then leave, it's work, but after entering in my case, if i puch button start again, the first event struct keep in waiting my click, and when i leave my loop after switch on the led, i return again in my loop... i want juste to avoid this bug, so i want to delete every event of the first event struct in queue. if there are no solution i can hide button with node, i search another possibility to fix it.
Thanks for all.
03-14-2014 10:00 AM
you right, so i'm sorry, i'll put my VI on my last answer.
and i have two solution, event or case. I search the best way, and it's a way to learn labview.
03-14-2014 10:02 AM
Please listen to all the guys who answered you. Having more than a single event structure makes no sense.
You can easily look your VI completely when pressing "stop" first. That is a typical caveat of the event structure and obviously, you have to learn this before moving on for your task....
Norbert
03-14-2014 12:43 PM
03-14-2014 12:52 PM
i read it, and thanks for answers and for all informations.
Thanks guys.