03-19-2015 09:58 AM
Hello,
I am trying to output a PWM wave from the NI 9403 using FPGA to control a motor. I have attached the FPGA file below however I am still not getting any motor movement. I need to generate a wave between 3.0ms and 100 ms so I set the period to a fixed value of 50ms in the host vi. Does anyone know what my problem may be or how to generate this wave using LabView FPGA on a cRio using the NI 9403?
Thanks
03-19-2015 10:02 AM - edited 03-19-2015 10:02 AM
Hi bets,
THINK DATAFLOW!
Right now your FPGA will never recognize a change in "duty cycle" due to DATAFLOW!
Hint: You can check the PWM output with an oszilloscope.
I would do the math in the RT host, it's easier to calculate wait times here…
03-19-2015 11:09 AM
Hi GerdW,
Thank you for your response. I am still new to LabView so I don't quite understand what you mean by DataFlow... I changed around the output i/o nodes as well. I don't know if this was effective or detrimental either
03-19-2015 11:11 AM
I also attached an oscilliscope to measure my results! 🙂 So far only a bunch of noise but I at least can get some accurate measurements. Thanks for the tip!
03-19-2015 11:25 AM
Gerd's point was that your code on the host will not have any effect on the pulse generated because the controls are outside the while loop on the FPGA.
Consider the following: what happens to the results during execution of this VI if you change Outside Loop and Inside Loop?
03-19-2015 12:38 PM
Ahhh, yes that makes more sense. Does this mean that you cannot pass the output data from the calculation into the sequnce structure to control the timing as well?
03-19-2015 01:59 PM