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

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure and background tasks

Solved!
Go to solution

I am not sure if using an Event Structure inside a WHILE loop is the best thing for this purpose.

 

I want to have some DAQ tasks running in the background which reads voltages.

 

I have placed these tasks in the Timeout event and wired it to 100ms. Is this the right thing?

0 Kudos
Message 1 of 5
(2,667 Views)
Solution
Accepted by topic author nyc_(is_out_of_here)

I would put them in a independent loop.

 

The timeout will get starved under some conditions. For example if somebody would continuously fire events (by press buttons or changing sliders for example, the timeout will rarely occur. (partial workaround)

Message 2 of 5
(2,666 Views)
Solution
Accepted by topic author nyc_(is_out_of_here)

FYI, little known fact: you can also register for some DAQmx events with an event structure;). 

 

Message 3 of 5
(2,643 Views)

Hmm. On my computer both Altenbach's and Greg's answers are marked as solutions.  Never saw that before.

 

BTW, Greg, that's a great tip.  Does anyone have an exhaustive list of what inputs the event registration node will accept?

0 Kudos
Message 4 of 5
(2,596 Views)

I think now NI has a provision to mark as solution to more than one post and personally i find it fare.

I dont have an exhaustive list but i found dynamic event registration with case of IMAQ buffer change event and it proved very handy ( eariler we were polling for buffer change , to take new image )

i dont have vision module right now so can not post image.

0 Kudos
Message 5 of 5
(2,579 Views)