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!
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.
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?
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
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.
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.
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.
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.