LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous event queue ?

Hi,
 
I'm using LV6.1 and  I got a little problem with events. How do I make a continuous event queue for activex component, that means LV will respond every time when mentioned event fires instead of it responds just once. Does anyone have an example ?
 
Thanks in advance!
 
0 Kudos
Message 1 of 16
(4,092 Views)
I have never used events in 6.1 but assuming they function the same as they do in later versions, the events are queued continuously.

You event structure should be in a loop, and the event triggers will be queued as they arrive.

If you want to prove it out, create an event structure in a loop that fires when you click a button on the front panel.  Have a counter count each time the event is fired, and have a few second delay in the loop.  If you keep clicking that button faster than the delay in the loop, you won't see anything happen immediately, but the event counter you created will eventually match the number of times you pressed the button.
0 Kudos
Message 2 of 16
(4,081 Views)
Hello Supermango,

do you unregister for the activeX event inside the VI that reacts on the event? in that case you will loose the funictionality you wnat. Could you show some code?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 16
(4,076 Views)

I apologize that I do not have an answer to your question. But it seems like I have a similar issue.  I have 2 while loops and would like to have one event run continuously when another event is fired.  I'd appreciate any advise. (See attached vi)

Thanks

KM

0 Kudos
Message 4 of 16
(4,025 Views)
KM,

I dont think you need an event structure at all.... Here, check this out. Is this along the lines of what you were looking for?


0 Kudos
Message 5 of 16
(4,015 Views)
It seems silly to even use two loops:
 
 
If you require two loops and want to use an event structure (maybe the rest of the code requires it), you can manipulate the event timeout, e.g. as follows.
 

Message Edited by altenbach on 09-13-2006 01:45 PM

Download All
0 Kudos
Message 6 of 16
(4,010 Views)
Hi altenbach and brehm:
 
THanks for the prompt response and the VIs.  You are right... it really seems silly to use 2 while loops.   Maybe there is a better way of doing what I am currently doing.  I am trying to modify the "New Event Handler" example that ships with LV.  I am creating an Intrusion Detection System.   My program has three basic functions:  Acquire data continously via TCP/IP, analyze data (which includes multiple operations on demand such as different types of data analysis, image analyses and graphing) and display/archive data (which includes multiple operations on demand such as different display formats). I am new to Event Structures and I thought that using events might be the best option to optimize CPU speed and memory.   Any suggestions/advise on improvements?  Thanks again.
 
KM
0 Kudos
Message 7 of 16
(3,979 Views)

km,
      Take a look here.  

-Nathan

 
0 Kudos
Message 8 of 16
(3,964 Views)

Altenbach,

I am using your example as my reference. Instead of sending the value of A to B in the same VI, i am calling a subVI and continuously sending the value of A to that subVi when  the OK button is pressed (see attached code).  I am not sure why the code isn't working.  Also, I notice that the CPU usage increases drastically.  Any suggestions?  Thanks in advance.

Regards

KM

Download All
0 Kudos
Message 9 of 16
(3,885 Views)
km,
      Have you tried debugging the code using highlight execution so you can see what is going wrong?

Thanks,

NathanT
0 Kudos
Message 10 of 16
(3,859 Views)