NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Using Producer/Consumer Architecture for DAQmx Read and Write to File

VERSION 4

Created on: Oct 27, 2008 11:12 AM by JohnP - Last Modified:  Jun 15, 2009 2:44 PM by DougL.Bear

This example program uses the Producer / Consumer parallel-loop architecture to acquire data using DAQmx and write that data to a file.  This allows the data to be queued in memory as it is acquired, so the acquisition loop can run at a faster rate.  The data is dequeued in the second loop and written to file.  Make sure to specify the file you are writing to (and any other parameters) inside the express VI in the consumer loop.

 

2009-06-15_144326.png

 

Downloads:
Average User Rating
(3 ratings)




vgravel vgravel  says:

If there still items in the queue when the user presses the Stop button, these items will not be written in the file because the first loop will have released the queue. An error will occurs and the second loop will stop as well.