01-27-2017 06:46 AM - edited 01-27-2017 06:52 AM
Hi
I want to generate a 40kHz square wave (analog) from my DAC-assistant but I don't really understand what "Samples to write" and "Rate" is supposed be.
I'm using the Generate Signal.vi to produce the square wave with the following parameters:
Frequency = 40kHz
Samples per second = 4M
Numbers of samples = 100
is there a way of calculating the "Samples to write" and "Rate" parameters of the DAC-assistant?
Solved! Go to Solution.
01-27-2017 06:53 AM - edited 01-27-2017 06:56 AM
Hi Wallberg,
Generate Signal.vi to produce the square wave with the following parameters:
Frequency = 40kHz, Samples per second = 4M, Numbers of samples = 100
So you want to output a waveform with a samplerate of 4MS/s, consisting of just 100 samples?
What's the content of the waveform? (How does it look like on a graph? How many "squares" does it show?)
Hint: If you would use basic DAQmx functions instead of the DAQAssistent ExpressVI it could be much easier than you might think! Examine the example VIs coming with LabVIEW and read about the basics…
01-28-2017 02:20 PM
You do realize, I hope, that a Digital Waveform is simply an Analog Waveform that takes on two values, typically 0 and +5v. It is so much simpler to generate Digital Waveforms than Analog (for one thing, you only need to send an output when it changes from low to high or high to low, and your "Data" consist of Booleans instead of Dbls or I32s). If you need a (fixed) output voltage other than +5v, you can use a (fixed) amplifier or Voltage Divider (a few resistors).
Bob Schor