LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making a square wave analog output with a Daq 6008, is it possible?

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. 

 

 

 

 

0 Kudos
Message 1 of 16
(4,622 Views)

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.

0 Kudos
Message 2 of 16
(4,619 Views)

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.

0 Kudos
Message 3 of 16
(4,614 Views)

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?

0 Kudos
Message 4 of 16
(4,605 Views)

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.

0 Kudos
Message 5 of 16
(4,598 Views)

@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.

0 Kudos
Message 6 of 16
(4,585 Views)

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. 

0 Kudos
Message 7 of 16
(4,576 Views)

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.

0 Kudos
Message 8 of 16
(4,566 Views)

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. 

0 Kudos
Message 9 of 16
(4,550 Views)

 

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. 

0 Kudos
Message 10 of 16
(4,545 Views)