LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Channel Read and File I/O Problem

Hello
 
     I am having a simple problem with reading in two channels from a usb-6259.  I have 2 channels, reading in voltages, and I am wanting to read them in at 400K Hz.  I have used the DAQ assistant and the Write To Measurement File VI.  It is just a direct connection between the two.  I have the DAQ assist set up for taking in N Samples, which is set to 8M because I want to take in 20 seconds worth of data at 400K Hz.  Now the problem lies with the fact that I am getting a Out of Memory error.  This pretty much confuses me because the file that I will get is 220MB (I know this because I put a wait and got none continuous data for a total of 20 seconds worth of data at 400K Hz), and I have 2 GB of RAM, in whic i usually have 1.3GB free when I start the simulation.  So, now on to my actual question.  How is this system running out of memory?  How else can I program this to make this work?  Any feedback on this would be great.  Thank you.
 
Michael B
 
Labview 8.5
0 Kudos
Message 1 of 2
(2,419 Views)

Hello Michael B,

The DAQ assistant creates a lot of over head and this may be the reason why you are running out of memory. If you keep the Task Manager open while you are running the task, you'll be able to see that the memory keeps being used up by the data acquisition process. I would suggest not using the DAQ assistant and to use the lower level DAQmx VIs.

A good place to start would be Help -> Find Examples. Within Find Examples select Hardware Input and Output -> DAQmx -> Analog Measurements -> Voltage -> Acq&Graph Voltage Int Clk.vi. Go to the Block Diagram of the VI and change the "time out" to a much larger value. You can select two channels at the same time by using a comma (eg: Dev2/ai0, Dev2/ai1). Hope this helps.

 

0 Kudos
Message 2 of 2
(2,393 Views)