Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

daqmx events finite data

Solved!
Go to solution

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.

0 Kudos
Message 1 of 7
(4,121 Views)

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!

 

Transition from Traditional NI-DAQ to NI-DAQmx in LabVIEW

Answers to Frequently Asked Questions about NI-DAQmx and Traditional NI-DAQ (Legacy)

Getting Started with NI-DAQmx: Main Page

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

 

 

 

 

 

Regards,
Margaret Barrett
National Instruments
Applications Engineer
Digital Multimeters and LCR Meters
0 Kudos
Message 2 of 7
(4,098 Views)

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

0 Kudos
Message 3 of 7
(4,091 Views)

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!

0 Kudos
Message 4 of 7
(4,056 Views)

Thanks for the links, I wish to find examples that show how to use the DAQ software events below:

  • Every N Samples Acquired Into Buffer Event—Occurs when the user-defined number of samples is written from the device to the PC buffer. This event works only with devices that support buffered tasks.
  • Done Event—Occurs when the task completes execution or when an error causes the task to finish. Recoverable errors that do not cause the task to finish do not cause this event to fire. Calling the Stop function/VI to complete execution similarly does not cause this event to fire. Use the DAQmx Task Done property node located in LabVIEW under Measurement I/O >>DAQmx-Data acquisition >> DAQmx Advanced Task Options.
Mike
0 Kudos
Message 5 of 7
(4,047 Views)
Solution
Accepted by topic author HTMike

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!

 

Regards,
Margaret Barrett
National Instruments
Applications Engineer
Digital Multimeters and LCR Meters
0 Kudos
Message 6 of 7
(4,023 Views)

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

0 Kudos
Message 7 of 7
(4,013 Views)