Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage offset problems with the NI-9401 for a PWM signal output

Solved!
Go to solution

I am using the NI-9401 module in the NI cRIO-9073 chassis, and am attempting to create a 20kHz PWM signal to drive a motor control circuit. Generating the PWM signal works. For some reason the voltage offset changes as the duty cycle is increased. This is less effective for the motor driver, as you can imagine.

 

The code I am using comes from the Example finder, for PWM generation on an FPGA, and is attached.

 

I thought this was working previously but may have used the PWM output of the NI-9505 instead to test my circuit. This would be overkill for me to do this as a permanent fix.

 

The problem can be summarised as such: with an increase in the duty cycle the voltage base-line (offset) of the output signal shifts into the negative (according to dCRO) or down. The Vpp of the signal is correct and does not change. From 0 ticks to the maximum of 2000 ticks (duty cycle IN), the voltage offset shift is such that at 100% duty the full voltage level is at 0V.

 

Any ideas as to why this voltage offset shift is happening ??

 

0 Kudos
Message 1 of 2
(3,799 Views)
Solution
Accepted by topic author David_NMRSA

Be not dismayed, I have worked out the problem. There was a connection problem - I thought I had ground connected as reference but it wasn't clipped on properly.

0 Kudos
Message 2 of 2
(3,797 Views)