10-06-2014 11:05 AM
Hi All
I am using a NI USB-6211, and I have already used the two counters to do PWM in my project. I have a need to do one more that does not need tight control. Does anyone have code to use a standard output, not a counter, for PWM control?
Thanks
Bob
Solved! Go to Solution.
10-06-2014 11:24 AM
Try the "Square Wave PtByPt" VI. I posted an example here that outputs to a chart, which could be easily changed to output to a digital output instead.
10-06-2014 01:11 PM
You'll want to use analog output (assuming it is still available) rather than digital output since the 6211 only supports software-timed digital I/O.
Best Regards,
10-07-2014 09:04 AM
Sorry both Analog out being used, which is why I am trying to use a digitial out.
10-07-2014 11:50 AM
In that case, the closest you could get is to toggle a digital output line with software-timed delays. It's far from ideal, but I guess depending on what exactly you mean by "does not need tight control", maybe it would be good enough for your application? I'd be pretty nervous about using this to control anything important though... software timing on Windows isn't terribly consistent (and the added bus latency of USB isn't doing you any favors either).
Best Regards,
10-07-2014 03:24 PM
Hi John
I think it will be ok, I just need to control a stirrer in a bath to keep the tempeture constant. The walls of the bath will be controled, the bath is only about 1/2 foot cube. The operator will put in an RPM but it does not have to be real close.
Thanks
Bob
10-10-2014 08:53 AM
Thanks nathand
I got the code you gave to work for what I needed.
Thanks again!