LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sense pending frame events?

Solved!
Go to solution

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

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

Do you mean front panel controls?  Have you looked at the Event Structure? 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 8
(2,931 Views)

Yes, and Yes.

 

I'm hoping there is a way to know if there are events queued to the frame from outside it.

 

Roger

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

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.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 4 of 8
(2,914 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(2,910 Views)

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

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

@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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(2,902 Views)
Solution
Accepted by topic author RogerMont

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

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