06-14-2017 05:46 AM
Hello,
How to generate square wave using NI USB-6008 in LabVIEW.
Thanks,
Shini K N
Solved! Go to Solution.
06-14-2017 05:57 AM
06-15-2017 12:42 AM
Thanks for the reply.I have done for single output channel. How to proceed with multiple channels with frequencies and duty cycle?
Frequency range 100 to 500Hz
Thanks
06-15-2017 01:35 AM - edited 06-15-2017 01:36 AM
Hi sk,
How to proceed with multiple channels with frequencies and duty cycle?
Then you need to generate those "multiple channels" at desired freq/duty and output them using DAQmx… (It's not a big deal to go from "1 channel" to "n channels"!)
Frequency range 100 to 500Hz
Here you are lost: get a better hardware suited to your requirements! Please read the user manual to learn about the specs/limits of the cheap USB6008 hardware…
With your USB6008 both AO and DO are just "software timed", so you are limited to <=100Hz output rate. As I said: it's cheap hardware…
08-18-2017 09:13 AM
Hi,
I tried to solve this problem to output (AO) an array of a pulse (0 to 5 volts) of 200, 500, and 2000 msec at a frequency of 1 KHz and succeeded (feeding 200 samples for 200 msec, 500 samples for 500 msec, and 2000 samples for 2000 msec). The way I did it was to save a copy of the DAQMx vi (DAQmx Write (Analog 1D DBL 1Chan NSamp).vi) with an other name, set its execution propriety to "Critical (highest)" and make my program call this vi. I checked the result by acquiring the signal in another DAQ card and the timing was perfect. Maybe this is the case because the only change in the signal is at the beginning and at the end (transition going from 5 to 0 volt and vice-versa). Everything else seemed to work without problem.
08-18-2017 10:44 AM - edited 08-18-2017 10:45 AM
08-18-2017 12:17 PM
Hi Gerd,
It is a question of precise (sort of) timing of duration of activating a device (on/off) and I had only this card (USB-6008) on hand for it until I realized it couldn't do "standard" output buffering. Because some other tasks are running I didn't want to do a polled loop for that since the execution of the sub-vi which sends the command is asynchronous (timing between 2 calls IS different). So, once I send the command I don't have to deal with it furthermore. I know there's many ways to skin a cat but the solution I implemented for THIS project was the least invasive. 😉