06-27-2012 12:53 PM
Hi all I'm painfully new at this, and i'm not even sure where to begin with my vi.
I need to create a square wave analog output through my daq, and be able to adjust the frequency, amplitude and duty cycle. I need to be able to have this output run for a set amount of time (that I can vary). I also need the output to stay at 0 V while the vi is not running.
I have tried using built in square wave generators but I dont know how to get the data into a form where my daq will give me output voltages. Anything else i've tried has been even more convoluted than that.
I'm not sure what information you need, so ask anything and I will answer as best I can.
06-27-2012 01:26 PM
A 6009 is very unsuited for analog output since it is software timed. You can perhaps do very low frequencies. You would use one of the square wave generators and wire the data into a for loop with a DAQmx Write/DAQ Assistant set for single sample or On Demand timing. A Wait(ms) or Delay function inside the loop would give rough control of the frequency.
06-27-2012 01:52 PM
Going to need some specs and build the system from there. The 600x is all software-timed, so it's not going to be all that accurate. For lower frequencies (a few Hz) it's fine, but if you're trying to do motor control or something that needs some clock speed... the 600x is not the right DAQ for that.
621x series has on-board timing and pulse-train generation.
But if all you need is low-frequency signals, the 600x may do what you want it to.
06-27-2012 02:55 PM - edited 06-27-2012 02:56 PM
So it looks like I will have to upgrade my Daq. The frequency and duty cycle need to be reliable.
Would I be able to do a similar thing with the digital I/O ? would it be more accurate? say frequencies in the range of a few kHz?
06-27-2012 03:06 PM
No. Have you ever looked at the specs. It is also software timed and of course you would not be able to vary the amplitude.
06-27-2012 04:51 PM
@Dennis_Knutson wrote:
No. Have you ever looked at the specs. It is also software timed and of course you would not be able to vary the amplitude.
Unless you use an analog output.
06-27-2012 05:56 PM
I can't seem to generate high frequency square waves at all, with just the software (no daq). I presume I need a programmable function generator (or a better daq) to be able to generate good waveforms over long periods of time.
06-27-2012 06:21 PM
Hard to say with what little info you've posted so far. What are your timing requirements? How long does it have to run for... a few mS, or days/weeks? What are you controlling? There's motor controllers available that can generate PWM signals.
Maybe the 600x is fine. Maybe a 621x would be a better option. Maybe a programmable arbitrary function generator is the right tool. But without knowing specifications, nobody here can help you make that decision.
06-28-2012 01:49 AM - edited 06-28-2012 01:52 AM
I need it to be able to run for a range of times ms to hours, duty rates of 50% 75% and 90% and frequencies of 1Hz up to kHz range.
The signal is used to trigger a laser.
06-28-2012 03:15 AM
Quote - Dennis_Knutson
"06-27-2012 01:26 PM
A 6009 is very unsuited for analog output since it is software timed. You can perhaps do very low frequencies. You would use one of the square wave generators and wire the data into a for loop with a DAQmx Write/DAQ Assistant set for single sample or On Demand timing. A Wait(ms) or Delay function inside the loop would give rough control of the frequency."
How would I set up this vi? sorry but I am clueless.