05-07-2009 08:49 AM
Hello:
I've been using Traditional DAQ for a long time and just now I'm trying to use the DAQMx drivers to reuse an old project. The vi that does the data acquisition seems straight forward yet I'm having trouble finding DAQMx examples to help me replace the functionality.
I've attached a snapshot of the vi but in short, the calling vi (not shown) generates an occurrence and passes it to this vi. This vi sets up the hardware for a finite acquisition but after 10 scans will fire the event that the caller is waiting for then after the finite number of scans is reached it will read the data and pass on to other vis for presentation.
I'm looking for a way to setup my DAQMx hardware to do the same thing, generate an event after 10 scans so another vi can be run while the acquisition is continuing.
Thanks.
Solved! Go to Solution.
05-08-2009 05:17 PM
Hello,
Thank you for posting to the NI Forums! I'm glad to see that you are upgrading to the newest DAQ driver. We have some documentation that should prove very helpful in making this transition. Please take a look at it as I think it will answer your questions. If you have specific questions after that, I'll be happy to help futher. Have a great weekend!
05-08-2009 10:06 PM
Hi Margaret:
Thanks for the info, pretty sure I've looked into all of those links and the fact that I the old app was able to fire an event when 10 scans are acquired then fire another when N scans are acquired is not directly replaced by DAQMx. At first I was trying to apply a producer - consumer pattern but that hasn't panned out yet. I'd like to be able to use events to run a separate thread after 10 scans.
Mike
05-11-2009 06:26 PM
Hey Mike,
I think you would be interested in this KB on handling DAQ Occurences in DAQmx. As well, you could explore using a DAQmx event. Otherwise, it may also work to use application architecture and a shift register to run code in a loop everytime the number in your shift register is divisible by 10. Let me know if this needs clarification, thanks!
05-12-2009 08:33 AM
Thanks for the links, I wish to find examples that show how to use the DAQ software events below:
05-14-2009 04:37 PM
Hi Mike,
With the DAQmx driver installed, you have access the DAQmx examples within the LabVIEW enviroment.
By selecting Help>>Find Examples, you can then navigate to Hardware Input/Ouput>>DAQmx>>Events. I think the first examples listed called "Acquire and Graph Voltage Internal Clock-Every N and Done Event.vi should be what you are looking for based on your last post. Check it out! Hope this helps!
05-15-2009 06:46 AM
Thank you, I had located a simlar example and was trying to get to wrok but this one was very straight forward and It was what I was looking for.
Mike