Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a 20KHz PWM using NI 9478

Hi,

 

I am a rookie on compactRIO and LabVIEW. Currently I am trying to use NI 9478 to control a DC-DC converter.  Here is my problem:

 

Can I generate a 20KHz PWM using NI 9478(with a minimal resolution of 1024)?  How?  Since NI 9478 does not support single-cycle timed loop(SCTL). I am really stuck.

 

Thank you very much!

 

Goffy

 

PS:           RT Controller: cRIO 9024    Chassis: cRIO 9114

0 Kudos
Message 1 of 5
(6,486 Views)

Hi Goffy,

 

You can generate the PWM using the FPGA of the cRIO with the NI 9478 module.  I recommend that you use one of the examples that ships with LabVIEW.  You can access the example finder by going to Help > Find Examples.  Then go to Hardware Input and Output > CompactRio > FPGA Fundamentals > Counters > PWM.  The example "PWM Out, Simple - cRIO.lvproj" has an example of how to do this.  It will have to be modified for your application.  

 

I hope this helps!

 

Regards,

 

Dayna P.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 5
(6,463 Views)

9478 has an update rate of 20 Khz.  you will not be able to use this module to generate a 20 KHz PWM signal.

use one of the high speed digital modules.

Stu
0 Kudos
Message 3 of 5
(6,455 Views)

Hi, Dayna

 

Thank you very much for your reply!  I have figured out this problem. Turn out that NI 9478 can generate 20KHz PWM, as long as the duty cycle is in the range of (1/8~7/8) (approximately!). I have tested that the upper limit frequency for the NI 9478 is around 150KHz, which means that the state change of NI 9478 can never be faster than 1/150KHz=6.66us.  Wished that I had ordered NI 9474 instead of NI 9478.

 

Best wishes,

Goffy

0 Kudos
Message 4 of 5
(6,454 Views)

Hi, Stu McFarlane

 

Thank you very much for your reply!  I have learned this in a hard way. I have ordered a NI 9474 today, hopeing it would not disappoint me.

 

Best regrads,
Goffy

0 Kudos
Message 5 of 5
(6,452 Views)