LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM: Bulb/Fan doesn't turn off when stopping program

Hello Labview Community,

I've made a small program PWM program in Labview. The user can control a fan or bulb, to get a desired temperature.

The fan and bulb is also regulated by their duty cycle (%). So far my program works as i want it to. But the problem is, that if I stop the program while the duty cycle is =100%, the bulb/fan doesn't turn off; it stays on.

But if i stop the program when the duty cycle is <100, there is no problem. The bulb/fan turns off with no problem.

 

Can anyone explain what's going on here, and what the solution is?

0 Kudos
Message 1 of 6
(3,108 Views)

DAQ devices will continue to output whatever voltage it was last set at when you stop your program.  Chances are with your VI it is finishing with a voltage other than 0.

 

Just make sure you wire a 0 to the voltage out channels before you stop the VI.

0 Kudos
Message 2 of 6
(3,086 Views)

You may want to leave the fan on.

 

Shutting down cooling while a heating element is still smoking hot won't win you many friends at the local fire station.    Just saying...


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(3,075 Views)

Thanks for the answer!

Even though it sounds simple, i can't find the voltage channel for my fan or bulb. Should it be at in the DAQ assistant icon?

0 Kudos
Message 4 of 6
(3,055 Views)

0 percent duty cycle would do.

 

A PWM always ends on an OFF state unless the darn thing is at 100 percent.  Bill is just used to typical analog voltage outputs


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(3,049 Views)

Use the IdleState Property of your PWM channel to set it either to High or Low. Low should mean, that the PWM is "off" when the system is idle.

0 Kudos
Message 6 of 6
(2,888 Views)