ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW equivalent of DAQmxRegisterEveryNSamplesEvent

Solved!
Go to solution

Hello,

 

I am trying to translate a LabWindows/CVI program to LabView, but I've hit a snag in my development.  The way the CVI program works is it starts running a continuous waveform with regeneration disabled and registers a buffer generation and writing function to DAQmxRegisterEveryNSamplesEvent.  This makes the code responsive to the signal voltage controls on the front panel.  I've searched the LabView DAQmx functions but I can't find it anywhere.  Is there such a function in LabView, or am I looking at putting an event handler on a separate thread and calling the function manually?  Thank you for your time and please have a nice day.

 

Surge

0 Kudos
Message 1 of 7
(3,683 Views)

Attached is a LV 2017 Example using an event structure to do what I think you are talking about.

 

 

Randall Pursley
Message 2 of 7
(3,663 Views)

Hello rpursley8,

 

I am running LabView 2015, could you save your VI in a way that will make it compatable with my version?  Thank you very much for your time.

 

Surge

0 Kudos
Message 3 of 7
(3,652 Views)
Solution
Accepted by digital71

Try this

Randall Pursley
Message 4 of 7
(3,602 Views)

Randall,

 

That's a pretty solid solution, thank you.  That's essentially what I ended up doing, except I generated the sine wave once and multiplied it by the amplitude because I figure FP multiplication is cheaper computationally than computing sine, and I put this entire loop on a separate thread so I could output a waveform and read simultaneously in another part of the program.  My experiments run for a long time (up to 24 hours) and this allowed me to keep the UI responsive while the experiment runs in the background.  Attached is what I did in case you're curious.  Thank you very  much for your time.

 

Surge

Download All
0 Kudos
Message 5 of 7
(3,588 Views)

Of course you could just drop the whole darn thing off the DAQmx Events palate.  

Capture.PNG

but Backsaving from 2017 is an option too

 


"Should be" isn't "Is" -Jay
Message 6 of 7
(3,585 Views)

That is not very useful in that form for me.  I keep a snippet with the while loop and the DAQmx vis that I usually use included.

Randall Pursley
0 Kudos
Message 7 of 7
(3,549 Views)