11-30-2011 01:34 PM
I am using a CRIO 9074, with NI 9411, NI 9263, and (3) Ni 9474. I am trying to generate a pulse train from 0 to 10 kHz(variable) and uto 80% duty cycle. I have the Scan Engine set to 1ms. I was told this was easily possible with the hardware selected. I am unable to get ubove 200Hz with 1 DO channel, and the processor is at 99%. is there an easy way to generate a pulse train upto 10khz?
01-05-2012 03:03 PM
Are you completely set on using the Scan Engine or can you do a little bit of FPGA programming? If you are OK using FPGA, you can quickly write an application that will simply flip the value of the DO line in a loop. By using two timers with controls wired to them, you can control the frequency and duty cycle of the pulse train.
If you need to use Scan Engine, you can right-click the module in your project and select Properties. If you then select Specialty Digital Configuration on the left, you will have the option to set the Specialyt Mode to Pulse-Width Modulation where you can then control the frequency. However, there is not an option to set the duty cycle and I don't believe you can programmatically update the frequency, only in configuration mode.
Hope this helps.
01-07-2012 11:26 AM
01-10-2012 01:36 PM
After further investigation, you can programmatically control both frequency and duty cycle. To set duty cycle, change the module to PWM mode through the module properties and then the value you wire into the IO node (0-100) determines the duty cycle. See the example PWM - cRIO IO Scan.lvproj in the NI Example Finder for an example of this. To set the frequency, use a variable IO property node to change the frequency for each channel. See the attached image for an example.
01-10-2012 01:42 PM
All,
Thank you for taking the time to help me. I ended up using the FPGA to be able to get to the 10kHz (1 Hz step) requirement. Having never used the FPGA module before, this was REALLY easy. Using the FPGA also kept the processor usage low.
01-10-2012 02:02 PM
Glad to hear you got it working, especially since this reply came a little late...sorry about that. Hopefully the information will help someone else looking for it anyway.
01-10-2012 02:08 PM
I had some amazing help from Daniel Herrington at NI......took me longer to figure out I needed the FPGA than it did to program it! This platform is being used to simulate the signals from a diesel engine and simulate our CVT in order to advance the shift control system.
Thanks Again to all who replied,Daniel Herrington, and the rest of the NI staff!