I have a slightly modified PWM code "Complete PWM.vi" I stole from: http://zone.ni.com/devzone/cda/tut/p/id/2991
I'm using a DAQCard-6024E and the Duty Cycle cannot be set to 0% just 0.001% or else I get an error. But even if I could set it to 0% as soon as the task stops the counter pin returns to a solid 5V.
I am controlling a heater in my application, and this is undesirable because I don't want the heater to be full on when the program is aborted

.
Is there a way to set the output of the counter pin to just 0V? I have tried using a pull down resistor w/ no luck. I've tried changing the counter into an input with no luck.
The only solution that I have found so far is using one of my digital IO pins.
1. Wire a digital IO pin to the ground of my circuit.
2. When program starts set the digital IO pin to be an output and set the value to 0. (not inverted).
3. Run the PWM loop with the digital IO pin sinking the current.
4. After the user stops the loop set the digital IO pin to 1 (5V) before terminating the program.
This works, however I have some problems with this setup:
1. I don't feel comfortable with this in regards to failure mode. If the digital IO pin fails to source 5V because of hardware failure and the counter pin sources 5V as it does by default then I have an out of control heater that is heating up.
2. It waists a digital IO pin.
3. I don't think that my digital IO pins can sink as much current as the digital ground pin can. I seem to be able to still assert my relay fine, but that bothers me.
Is there a work around for this so that the counter pin is grounded when not in operation?
thanks!
-Nickerbocker