LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

output timed txt signal in daqmx

I am trying to bring in a txt file and then output the same file to a shaker. The text file is 600 seconds of data with a dt of .001 seconds (600000 points). I have imported the file and plotted it in a XY graph and it looks good. However when I try to output the file to the shaker, the output only lasts about 10 seconds instead of 10 minutes. Since the text file is so large I will attach a small clip (2 min) of it and the vi for verification of what it is I am trying to do. Eventually I would like to loop this for continuous running. Any help would be greatly appreciated.
Download All
0 Kudos
Message 1 of 6
(2,941 Views)
DAQmx write vi has a terminal labeled "timeout".  It defaults to 10 seconds.  Try adding a constant and increasing timeout.
0 Kudos
Message 2 of 6
(2,931 Views)
Hi,

You are clearing your task before it finishes the output. You need to place a DAQmx Wait Until Done VI between your write and clear task.

Hope this helps!


Abhinav T.
Applications Engineering
National Instruments India

LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals
0 Kudos
Message 3 of 6
(2,910 Views)
Thank you both for your response. I managed to get the program running but still have one small problem. I created a sine wave text file in Excel and have been using that as the file being sent to the shaker. The shaker moves at the correct frequency but the read signal is very slow for the first cycle and then it speeds up until the end of the run. By the time the read display finishes the first cycle the shaker is done moving.  Any ideas? I have attached a recent copy of the file and the text file. Thanks again for your assistance.
Download All
0 Kudos
Message 4 of 6
(2,901 Views)
Hi,

Im not sure I understand what you mean by read signal - is this where you are reading from the excel file? You could possibly read the entire contents of the excelf ile before initiating the analog output.


Abhinav T.
Applications Engineering
National Instruments India

LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals
0 Kudos
Message 5 of 6
(2,879 Views)
I think I know what you're trying to do.  I think you need to set the DAQmx Read to do multiple samples.  I've attached an example I found that has a similar functionality.
0 Kudos
Message 6 of 6
(2,859 Views)