DQMH Consortium Toolkits Feature Requests

cancel
Showing results for 
Search instead for 
Did you mean: 
JoGra

Support cluster of event registration refnums for helper loop

Status: New

Hi,

 

This might be a special use case, but maybe there are more applications for a cluster of event registration refnums for helper loops.

 

My use case involves DAQmx or IMAQdx events. These events get registered through a DAQmx or IMAQdx reference, like this:

JoGra_2-1704363872542.png

 

The register for events for the helper loop is happening before the loop and the task is started, which means that registering to the "Done" event of the task doesn't work if done like this:

JoGra_4-1704364222059.png

Because there is no valid task reference yet, so the event registration gives an error.

What works instead is the bundling of the "Module Request Events"-event registration refnum with a static event registration refnum of the task "Done" event. 

JoGra_5-1704364472523.png


Inside the helper loop, at a point where the task has been created, the event registration for "Done" event can be updated.

JoGra_6-1704364631172.png

 

This works very well and simplified my code, which before had another async VI which registered to the daqmx event and sent a broadcast to the helper loop. This is much nicer. 

 

The drawback is that the DQMH event scripting tool does not support the extra namespace ("Module Events") of the clustered event registration refnums. This results in that every time the Module Request Events get updated the assignment of events to in helper loops event handler gets broken and they need to assigned again manually.

JoGra_7-1704365226221.png


This happens when any kind of request is created. If the request is created for the helper loop this error appears:

JoGra_8-1704365328661.png

 

This is how my helper looks like after assigning the events again:
(using just a bundle instead of bundle by name for space reasons)

JoGra_9-1704365643845.png

 

 

Proposal:

 

Addition of check to request (and broadcast) creation, that when a helper loop exists and  the event registration refnum for the request events (and probably also the broadcast events) is bundled in a cluster with some other event registration refnum, the extra namespace (eg "Module Events") gets handled and the events can be created and assigned.

 

 

 

1 Comment
Darren
Proven Zealot

It's pretty common to have a helper loop that works with hardware events like DAQmx. The issue described in this post makes it impossible to use DQMH scripting with these kinds of helper loops. Until NI fixes the null hardware event registration error, I feel strongly that this idea should be implemented in the next DQMH release if possible.