03-26-2015 10:33 AM
Hi,
I have been working to try to generate a PWM wave using the Digital I/O card NI 9403 with no success. Does anyone have any ideas as to how to do this?
Thanks!!!
03-26-2015 10:45 AM
03-27-2015 10:22 AM
Thank you!
In regards to writing to the digital I/O, how would I write the value HIGH and LOW? Do I use a I/O Method node or just the I/O node? (This is in regards to FPGA with the cRio, not using the DAQx)
03-27-2015 10:23 AM
03-27-2015 11:12 AM
Is there any way constantly be reading the value that the NI 9403 is outputting in order to see if the wave is turning off and on at the right points? For example, is there a way to read the value to make to sure that at a 50% duty cycle, the wave is off for 1/2 of the time and on for 1/2 the time?
I know that I can run it to the target hardware and check using an oscilloscope however I am using a sensitive motor controller and do not want to fry it. I have attached my code for reference.
03-27-2015 11:29 AM
Hi bets,
don't you rely on your FPGA to handle things correctly (and in time)?
I would attach a scope before the motor is connected to check the PWM function! No need to read back any values from the FPGA. (Ofcourse you can create indicators to hold your current LOW/HIGH tick counts - just to make sure the FPGA correctly does the math before your sequence structure…)
03-27-2015 01:05 PM
Hi,
Yes I did just that, I am getting this result from my O-scope with a 50% duty cycle. For some reason, it is not holding at 5v. Also, when the value is supposed to drop down to 0V, it spikes down to -5V.
03-28-2015 04:13 AM