08-20-2012 08:31 AM
Hello LabVIEWers,
My current assignment is to create a workaround for an issue in some legacy code. Let's just say it was written in an unconventional way. It would be great if there was a way to sense if there are any pending control events. So far, I haven't found any property that will do that.
I'd appreciate any ideas.
Thanks!
Roger
Solved! Go to Solution.
08-20-2012 09:25 AM
Do you mean front panel controls? Have you looked at the Event Structure?
08-20-2012 10:09 AM
Yes, and Yes.
I'm hoping there is a way to know if there are events queued to the frame from outside it.
Roger
08-20-2012 10:16 AM - edited 08-20-2012 10:17 AM
The event structure would need to be "active" (e.g. inside a while loop running parallel to your other code) to detect the events. Take a look at the "filter event" node, maybe that would help.
It's hard to know how to help unless you can give more detail about your application or can post some code.
08-20-2012 10:27 AM
Maybe if you used a producer/consumer arhcitecture. I'm guessing that you have a lot happening inside of your event cases here.
You could have 1 loop with the event structure and all it does is put the event data (ID and data probably). Then your other loop dequeues elements to process the events. You can then use a Get Queue Status to look at what events are in the queue.
08-20-2012 10:44 AM
Hi,
This a large, but poorly written application. I've begged management to let me re-write it, but they won't fund that. My instructions are to find a work-around for the parts that don't work. It's gotten to the point where I can't find all the kludges, because of all the kludges.
It's a living...
Roger
08-20-2012 10:51 AM
@RogerMont wrote:
Hi,
This a large, but poorly written application. I've begged management to let me re-write it, but they won't fund that. My instructions are to find a work-around for the parts that don't work. It's gotten to the point where I can't find all the kludges, because of all the kludges.
It's a living...
Roger
Yeah, I inherited a program like that. It had kludges and bandaids galore. The more I took out, the better it worked.
Unfortunately, there is no queue that you can access for the events. If you really need to see into the future, then it sounds like a rearchitecture or massive performance updates are needed (depending on your exact situation).
08-20-2012 11:22 AM
Hi Again,
Well, I guess I'm reduced to another kludge, where I put in a delay long enough for the events to get done.
Thanks to All,
Roger