LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM with USB-6211

Hi.  Is it possible to create a 10V pwm using an analog out channel on the USB-6211 (I actually need 0-12V).

 

Would I make a for loop and just wait a certain number of milliseconds?

 

Also, can the USB-6211 output 20mA?  I saw that it is rated for 2mA... this seems really low!

 

Thanks.

0 Kudos
Message 1 of 9
(5,514 Views)

Hello seascan,

 

The analog outputs of the USB-6211 are rated at ±10V, so you will not be able to get a signal more than 10V from ground so 0 - 12V isn't possible unless your connected device is completely floating.

 

The outputs are rated to ±2mA so you will not be able to achieve 20mA with this device.  The analog outputs are intended to generate analog waveforms, not to serve as a power supply.  You'll need an external current amplifier circuit in order to acheive 20mA.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 9
(5,513 Views)

Thanks Seth.  Does NI sell, "external current amplifier circuit in order to acheive 20mA"

 

Also, what is the best way to make a PWM signal on the output... a for loop with a X ms delay?

 

-terry

0 Kudos
Message 3 of 9
(5,511 Views)

The best way to do a PWM signal with the 6211 is to use the timer/counter digital output.  This will give you accurate high-speed PWM and you don't have to write an algorithm to do it.  You'll be limited by the digital output voltage (5V) but you can use the output to drive a solid-state relay that will switch any voltage you need.  Something like this (the result of a really quick search, you can probably find a better fit for your application) should work for switching 10V DC: http://www.alliedelec.com/search/productdetail.aspx?SKU=6820896

0 Kudos
Message 4 of 9
(5,505 Views)

Hi,

 

This problem still persists in current USB-6211 models ? As I also want to generate PWM signal for four devices

0 Kudos
Message 5 of 9
(4,022 Views)

Which "problem"? The 6211 isn't designed to do a 10V PWM signal. That's by design. If that's what you need, you should choose appropriate hardware.

 

The 6211 will not support 4 independent PWM outputs; it only has 2 timers.

0 Kudos
Message 6 of 9
(4,012 Views)

hi,

I am a newbie man. So much so that I am searching what is PFI etc. Yeah, I figured that out that we have to channels (timers for that). Someone suggested that I can use 'pulse out' (DAQmx>Digital Output) generation and use it like PWM.

0 Kudos
Message 7 of 9
(4,008 Views)

Yes, you can do "software-timed" PWM if your frequency is low and you don't care about precision in the duty cycle. That is, you can do a 50% duty cycle at 1hz, but it will sometimes be 45% and sometimes 55% and occasionally 90% or 0% if Windows - I assume you're using Windows - decides to do an update or some computationally intensive task.

 

To use the hardware PWM channels, look at the examples included with LabVIEW. Find the Example Finder under the Help menu.

0 Kudos
Message 8 of 9
(4,001 Views)

Hi,

 

I think the example available at www.ni.com/tutorial/2991/en/ is applicable on USB-6221

Anyway, I receive this error.

The original program needs to be connect with thermocouple and voltage source. I put DAQ and DAQ 2 as simulated analog signals for thermocouple and voltage but still is not working.

0 Kudos
Message 9 of 9
(3,980 Views)