LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Generating a single channel digital square waveform for NI 9403 with configurable frequency using CRIO 9014 and FPGA

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

0 Kudos
Message 1 of 2
(2,119 Views)

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.

0 Kudos
Message 2 of 2
(2,115 Views)