From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Marc Blumentritt

Expand Event structure functionality: Register new types of references

Status: New

Hello everybody,

 

(as suggested I will separate my idea Expand the functionality of Event structures into four seperate ideas to allow giving kudos separately.)

 

Make it possibly to dynamically register references like tcp/ip, visa, queues, etc. for Event structures. Possible events are "new bytes at tcp/ip", "new bytes at seriel port", or "connection closed". In the case of queues it could be the same function as "Dequeue Element" or "Queue referenced closed". There are certainly a lot more of similar references, which could be registered for catching events, which up to now we have to poll regularly or use other event functions (as in the case of visa -> new bytes at seriel port). Benefits are: no more regular polling of changes, better integration of several functions (like using queues to communicate with GUIs instead of dynamic user events), and in my opinion just better code.

 

Regards

Marc

CLD
5 Comments
crelf
Trusted Enthusiast
Id' like to see DAQ triggers (both hard and soft) in there too.




Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Chris.Osiecki
Member
Also being able to register notifications. I think anything that interrupts the program (notifications, queues, events, semaphores, etc) should be given equal priority and the best way to do that is through the event structure.
dbrigada
Member
A unified event polling architecture---using an event structure to be able to wait on LV events, but also socket events, queue events, etc.---would be a great help for LabVIEW's dataflow model.  This way, you could couple an event structure and a processing loop, and only use the event structure to change the value of wires flowing through it.  These changes would then be able to be used through the rest of the computation loop.
Chon.Mech
Member

I'd like the event structure to be able to register an X becoming Y; for example, boolean becoming true or integer becoming 3.

X.
Trusted Enthusiast
Trusted Enthusiast

Maybe I don't see the full depth of this idea, but it would seem to me that you would loose control on the polling frequency for these different types of events (basically, you would ask a LabVIEW black box to do all the polling for you). I wouldn't want that myself for DAQ tasks (or I suppose data transfer in general).

In general, you want your Event Structure to be one of many possible sources of action requests to an "Action Handling" loop (or more). In other words, your DAQ loop and/or TCP monitoring loop will feed the same queue as the loop containing the Event Structure, in parallel. The recipient loop(s) will handle all types of events.

The advantage of breaking this down in separate (parallel) loops is that you can customize their behavior. I can't see a simple way to have this done in the Event Structure without making this behemoth even more unwieldy than it is already.

But I may miss something deeper...

 

Edit: I did not realized it was an old idea (and probably forgotten 🙂 until reading some related posts by the same author. Got caught by the little adverts on the right hand side of the window...