LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read spreadsheet file for Analog Out Profile using DAQmx

I am trying to read a .txt file in, then output the Analog out profile (Daqmx) vs. time.  The first column is time is (ms) in .001 sec increments.  The second column is the Analog out voltage I want to output.  I want to read the profile in, and ouput the a Analog out voltage incrementing in .001 sec intervals (or whatever the time increments are in the .txt file).  The problem I am having is, it reads in the whole file and outputs it in a fraction of a sec, instead of incrementing by the time.  I attached a screen shot of what I have.  Any help would be great. Thanks 
0 Kudos
Message 1 of 10
(4,386 Views)

You are reading the timing but not doing anything with it. You've specified Analog Wfm 1Chan NSamp for the DAQmx Write but you did not create the waveform data type. Use the Build Waveform function on the Waveform palette and wire in your array to the Y (waveform component) input and the time interval to the dt input.

Message Edited by Dennis Knutson on 04-06-2006 08:56 AM

0 Kudos
Message 2 of 10
(4,373 Views)
I tried using the build waveform, and its doing the same thing.  I am loading in a simple 1 hz sinewave profile.txt, and its ouput is a 1.35khz sizewave using a seperate scope.  I have attached the vi.  Thanks
0 Kudos
Message 3 of 10
(4,361 Views)
Sorry, I don't have 8.0 and can't load the VI. Can you save it as 7.1 and re-post. If you could also include the text file that you are reading, that would also help a lot.
0 Kudos
Message 4 of 10
(4,358 Views)
Here is the file in v7.1.  Also included the text file with the profile data.  Thanks
Download All
0 Kudos
Message 5 of 10
(4,347 Views)
Well, the first data point of the first column is 0.  Waveforms do not like to have a dt of 0.  I bet if you changed it to the second data point of the first column, you would get results more like the ones you want. 
Message 6 of 10
(4,344 Views)
Or subtracted row 0 from row 1.
Message 7 of 10
(4,339 Views)
I deleted the fist row with the zeros but the output still runs to fast.  Its acting like there is no timing with the analog out.  So it just runs as fast as it can.  The profile is a total of 9.439 secs long but it takes less than 10ms to run the entire profile?
0 Kudos
Message 8 of 10
(4,335 Views)
Since you have built your waveform, now use the example VI "cont gen voltage wfm int-clk.VI" that is shipped with labview for generating it
0 Kudos
Message 9 of 10
(4,322 Views)
It was missing the calucate timing from waveform vi. After looking at the example I was able to get it working correctly. Thanks to everyone for all the help
0 Kudos
Message 10 of 10
(4,305 Views)