PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading PWM Pulses in LabVIEW FPGA Target

Solved!
Go to solution

Hi, 
I have been trying to read PWM pulses in LabVIEW through FPGA (via NI PXIe-7856R). The PWM pulses are given from a Launchpad for controlling a motor. The pulses obtained in the waveform chart are non-uniform and saw tooth pulses which is actually square pulses when viewed from oscilloscope.

I have also tried adding a delay to balance the sampling rate of FPGA, but still the pulses are non-uniform. Does anyone have any idea to solve this? I have attached the VI used. Thanks in advance.

0 Kudos
Message 1 of 3
(359 Views)
Solution
Accepted by topic author anjalihari

Hi there,

 

I've worked with NI's FPGA boards in the past.  It looks like the FPGA and PC timing isn't lining up correctly.  The trick is to use a FIFO to buffer up the points sampled on the FPGA, and then read them as an array from the PC, instead of individual points.  I don't have LabVIEW FPGA in front of me, but there are actually good shipping examples for this FIFO structure.  Take a look at the Analog Input continuous acquisition examples for the PXIe-7856R.  In fact, you can compile an analog shipping example, and use it as an oscilloscope.  Use this to check if you can read the correct pulse waveform from your motor.  Once this VI has been verified to work, you can replace the analog FPGA I/O nodes with digital ones.  Good luck!

 

BR

John

Add motion to LabVIEW in 30min or less - TENET EMotion
Finding it hard to source NI hardware? Try NI Trading Post

Message 2 of 3
(335 Views)

Hi John,
Thank you for your response. I tried like you said and I got the PWM pulses correctly.
I am new to LabVIEW and don't have much experience with these graphs. I actually wanted these 6 pulses in separate graphs, but the digital waveform shows it altogether. Do you have any idea how to extract it? 

Also, this model, the data acquisition takes place in FPGA Target and the remaining portion is done in My computer target. Will there be any data loss in such case?

Thanks and regards,
Anjali

Download All
0 Kudos
Message 3 of 3
(303 Views)