NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
RogerMont
Posts: 41
0 Kudos
Accepted Solution

sense pending frame events?

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

Active Participant
vt92
Posts: 496
0 Kudos

Re: sense pending frame events?

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
Member
RogerMont
Posts: 41
0 Kudos

Re: sense pending frame events?

Yes, and Yes.

 

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

 

Roger

Active Participant
vt92
Posts: 496
0 Kudos

Re: sense pending frame events?

[ Edited ]

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
Trusted Enthusiast
crossrulz
Posts: 4,024
0 Kudos

Re: sense pending frame events?

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.

Member
RogerMont
Posts: 41
0 Kudos

Re: sense pending frame events?

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

Trusted Enthusiast
crossrulz
Posts: 4,024
0 Kudos

Re: sense pending frame events?


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

Member
RogerMont
Posts: 41
0 Kudos

Re: sense pending frame events?

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

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page