Waterppk Posted August 13, 2009 Report Share Posted August 13, 2009 Alright, so the latest project is to drive a throttle body type valve with Pulse Width Modulation (http://en.wikipedia.org/wiki/Pulse_width_modulation). I have a number of PCI cards to choose from (using PCI-6123 counter 0), and am able to correctly run my valve through MAX. I'm having trouble running a VI and controlling the duty cycle through it. The valve needs to be driven at 128 Hz and varying duty cycle between 5% and 95%, which I've tested through MAX and it works great. The attached VI will run the valve, but it won't update: so I can input a duty cycle, run the VI and it will move to the requested position, but when I change the duty cycle in the front panel control it doesn't change the valve position or the PWM output. I have any test tools available if they're needed, but this looks to be a problem with my understanding of how to control a counter's output duty cycle in a VI. Any ideas? Available hardware devices are (if you have something against using a 6123 for some reason): PCI-6122 PCI-6123 (currently using ctr0 and works fine) PCI-6601 cRIO: 9211 9481 9481 9203 9265 9411 SCXI: (Can't use, too slow) 1102B 1102B 1520 1124 1520 Gen_Dig_Pulse_Train-Continuous-Variable_Freq_LV86.vi Quote Link to comment
Daryl Posted August 14, 2009 Report Share Posted August 14, 2009 Here is an example that I think I downloaded from NI.com a while ago or something. It works good. PWM_Output.vi Quote Link to comment
Waterppk Posted August 14, 2009 Author Report Share Posted August 14, 2009 Here is an example that I think I downloaded from NI.com a while ago or something. It works good. Works great and makes sense, thanks for the VI and the help! Quote Link to comment
Daryl Posted August 14, 2009 Report Share Posted August 14, 2009 Works great and makes sense, thanks for the VI and the help! No Problemo, enjoy! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.