11-13-2011 08:34 PM
Hi,
I am trying to generate a digital output with a user controlled duty cycle and (accurate) frequency. I am using an NI 9403 on the CRIO 9014 using FPGA. Do you have any suggestion from where to start with?? I will much appreciate any help.
Thanks,
Ajay
11-14-2011 12:40 AM - edited 11-14-2011 12:42 AM
Should be pretty simple if this is all you need to do on the fpga. The most basic way is wire a boolean into your loop and do a "not" on it. Then write this boolean to your DO node. Then wait for the duty cycle time you want then do a not on the boolean again. Then write this out to the same DO line. What this is doing is writing true then false but leaving the line high for the amount of time specified i.e. pulse width. Then use a wait until next ms multiple (can't remember if this is what its called on the fpga but it is the timing vi with an hour glass). Tell this to wait for a ms multiple that corresponds to your frequency. Then let your loop run. Sorry, but I currently don't have LabVIEW available to make a diagram.