LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analog voltage output using text file

Hi All,

I would like to use a text file to output voltage. I have gone through https://decibel.ni.com/content/docs/DOC-11694 and 

http://forums.ni.com/t5/Multifunction-DAQ/How-to-send-data-from-text-file-to-analog-output/td-p/5824... and I had a few questions about it.

 

Should the text file have voltage as well as time or just voltage?

 

I am generating sine waves at certain frequencies using matlab.I would like to read it once in labview and then use daqmx write.Going by the examples,If I use autoindexing and put the daqmx write in a loop and use auto indexing to read data, would the frequency be still the same of the wave? Should there be delay between samples due to processing time?

 

Can anyone suggest the best way to do this

I am looking to replace the signal generator in my current vi using the text file in order to make it quicker.

 

Thankyou

 

 

0 Kudos
Message 1 of 5
(3,791 Views)
If you don't define the time between samples, you don't have a defined frequency, do you? The first example writes the necessary information to a file which is read back in its entirety and written by DAQmx add a waveform - not a single point. A single point write is a software timed operation that will be subject to considerable jitter.

Why are you using matlab instead of LabVIEW to generate simple sine waves?
0 Kudos
Message 2 of 5
(3,777 Views)

Thank you for your reply dennis.

I already have a vi which performs frequency sweep and accquires thress other sinals.

The problem is when i try to sweep through more frequencies,the program runs like 5/10 times and shows error because of lack of samples.

I am guessing its beacuse the daq assistant for accquiring signal doesnt have anything to accquire because the signal generations takes some time.I have attached the vi.

I would like to either make the current vi better in some way or try something else altogether like using text file.

I thought we could control the timing from labview.

and  i thinking of matlab because between frequencies i would like to have a pause where the voltage would be zero.I chose matlab just to make the text file.

0 Kudos
Message 3 of 5
(3,774 Views)

I apply a certain correction to the amplitude of the signal generated for certain frequencies.The coreection values are stored in a text file.And the vi stops  sometimes when I am applying the correction.

 

0 Kudos
Message 4 of 5
(3,760 Views)

Read this White Paper and never again use the DAQ Assistant.  You will be able to do more/better/faster, including (probably) programming a Frequency sweep (or at least a step-wise approximation to one).

 

Bob Schor

0 Kudos
Message 5 of 5
(3,726 Views)