I used Mr Michael's code to implement SPWM in LabView. I sent the output to the digital channel of ELVIS II kit. At low frequencies upto 10 Hz, my code outputs proper values. However as I increase the frequency, the output waveshape is correct but the frequency is wrong. While the output should occur at 2000 Hz, the scope shows a reading of 15 or 16 Hz. Please help me troubleshoot. I am attaching the corresponding vi.
I think I'm going to ned a little more information on your precise set-up. What troubleshooting steps have you tried so far? Is it the ELVIS II+ oscilloscope that you are viewing the signal on? How do you know that for low frequencies the code is giving the correct values?
I have made different codes for removing the problem of low frequency but every program outputs only low frequency. I am attaching one more code which has the same problem. The ELVIS oscilloscope was ON during the whole duration. When I dumped the output on the Analog channel of ELVIS, the output was of correct magnitude and proper frequency. However since I require atleast 8 output signals and ELVIS has 2 analog channels hence I need to output at the digital channel only. Till 10Hz the output signal frequency matches the expected value and the same is obtained on the scope.