LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Problem constant triggering

I am having problems using an event structure.  I am not quite sure how to explain the undesired behavior I am seeing.
 
I have an event that when triggered takes a few seconds to complete.  I don't want to lock the panel because I would like to still receive input during this time and have the events queue.  The problem I am seeing, however, is that if the event is queued it somehow keeps the trigger enabled. 
 
For example, if I trigger the event and while the task is running the event is triggered again; like it should, it will run the task again after the completion of the first.  The problem that is arising is that it will the keep triggering the same task over and over again (executing over and over again) even without any addition triggers.  This will continue until a different task is triggered in the same event structure.
 
How can I stop this continuous triggering of the event?  And why is it occuring in the first place?
Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 1 of 4
(2,655 Views)
It would be best if you post a simple example showing what you are seeing. I suspect that the problem is with the nature of your task (not really completing?) rather than retriggering itself.

Generally, you do not want any task running inside an event case which will take longer to complete than the minimum time between events. Time consuming task(s) should be run in a parallel loop which receives commands from the event loop via queues or notifiers or similar methods.

Lynn
0 Kudos
Message 2 of 4
(2,649 Views)
I could not reproduce the behavior in a small VI.  However, I took your advise and moved the code for the task into a parallel, polling loop .  It seems to have fixed the problem.  Thank you.
Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 3 of 4
(2,645 Views)

The Q wrote:
The problem that is arising is that it will the keep triggering the same task over and over again (executing over and over again) even without any addition triggers.  This will continue until a different task is triggered in the same event structure.

I still would like to see the code that does this. It should not happen, so maybe you discovered a bug that NI should be made aware of.
 
Remember that value changes of "analog style" controls such as slides will typically trigger quite a few indentical events, not just one.
 
Maybe that's what you are seeing?
 
One workaround for this particular problem is described HERE. See if applies to your situation. 😉
0 Kudos
Message 4 of 4
(2,632 Views)