Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can USB-6211 generate analog triangle wave?

I need to build a system that requires some analog inputs, digitial I/O, and I need to generate a triangle wave from +-10V with an anolog output.  I currently have a USB 6009, and tried the attached example to generate a wavefrom, but it cannot generate a triangle wave of the desired frequency (between 25 and 75 Hz) because of the software timing.  I was wondering if the 6211 could generate the triangle wave.  Am I correct in assuming that what I need perform this task is that the DAQ device must have a counter/timer, and not just a counter as the 6009 has?  Are their any other DAQ card suggestions?  I could also use a PCI, since it is going to work on a desktop computer, but I think the USB is cheaper since I don't need anything too fast or high resolution.  Thanks in advance for any help.
0 Kudos
Message 1 of 7
(4,036 Views)
The 6211 can easily generate the triangle wave. You would not use the 1 Samp mode. You would use the multiple same waveform. The analog out of the 6211 is 250ks/sec. This timing has nothing to do the presence or lack of a counter/timer.
0 Kudos
Message 2 of 7
(4,031 Views)
Thanks Dennis.  Would the waveform be software timed and therefore depend on the wait of the while loop as discused in the example? If I understand what you are saying it still would be a software timed output?  Isn't the only way to not have softare timed output is to have a counter/timer (not just a counter) directly inside the DAQ device?  The  250ks/sec can be updated with more than enough time for my requirement, I just want to make sure that I can send a command and it will continously generate a continous triangle wave and not depend on the limitations of the while loop speed, or at least have a good ideas as to what those limitations would be.

Should I be able to do this with the USB-6009 too?  I modified the example that I attached beforfe by replacing steps 4 and 5 with the Triangle Waveform.vi and I changed the DAQmx write.vi to Analog Wfm 1Chan Nsamp.  I was able to get the triangle waveforem over the 0-5V range.  How can you tell from the specs what the available frequencies should be?  Is this a software timed output also?  It looks like the 6211 has a voltage range of -10 to 10V has and update of 250ks/sec, and 16bit resolution, are their any other differences between the 6009 and 6211 analog outputs?  Are their some better DAQmx examples than the one I found to generate the triangle wave?  Thanks in advance for any help.
0 Kudos
Message 3 of 7
(4,021 Views)

The 6211 is capable of being hardware timed. Do not confuse the counter/timer measurement circuit with a clock for the analog output.

The analog out of the 6009 does not have a hardware clock. It can only be software timed.

There are a lot of shipping examples for hardware timed output. Just start up the example finder and open up Hardware Input and Output>Analog Generation>Voltage. Start with something basic like Gen Cont Voltage Wfm-Int Clock. The requirements window in the example finder list the hardware that is capable of running the VI.

0 Kudos
Message 4 of 7
(4,019 Views)
Thanks again Dennis.  How can you tell from looking at the spec sheet wheither it is hardware timed output?  I do see what you mean by looking at the examples, that definitly helps.  I was looking at the examples of the 6211 and I don't see the Write Dig examples?  Doesn't the 6211 have 4 DO that I can use?  Thanks.
0 Kudos
Message 5 of 7
(4,008 Views)

In the case of the inexpensive 6008/6009, the sepc sheet says the analog output is software timed. I think you can probably assume that if it doesn't say that, then the analog output is hardware timed.

You can use the digital I/O examples with some modifications. For example, the Write Dig Chan lines is line0:7 and the data is an 8 bit Boolean array. change the lines and make the Boolean array only 4 elements and it should be okay. I'm not sure if the Write Dig Port needs to be changed at all.

0 Kudos
Message 6 of 7
(4,004 Views)

Hi kcb4365640,

The Write Dig examples can be found in the Example Finder (Help » Find Examples…) if you browse by task to Hardware Input and Output » Digital Generation. If they aren’t appearing there, make sure that you deselect the ‘Limit results to hardware’ checkbox in the lower left corner of the Example Finder. Because of the 4 line DO limitation, these examples won’t run as expected without some modification and therefore, will not appear if you limit your search by hardware.

Write Dig Chan.vi will require you to resize the array to be 4 elements and change the Line value to be something like dev1/port0/line0:3.

Write Dig Port.vi can be left as is since there is no U4 representation. Any value greater than 15 (decimal) will be represented modulo 16.

Please post back if you have any more questions. Have a great day!

Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments
0 Kudos
Message 7 of 7
(3,984 Views)