LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Poor quality sinewave output with cDaq

Solved!
Go to solution

I have a cDaq 9174 with a 9263 analog output module. As part of a larger system I'm trying to create a sine wave generator but am having major problems getting anything like a reasonable waveform.

 

I'm using the sumulate sine express VI, then into the DAQ assistant analog output function and just feeding amplitude and frequency values into the sine function.

 

Above about 50Hz everything works fine, but from 50Hz down to 0.1Hz (the range that I need to use) the waveform is awful, non sinusoidal and sometimes chopped up. I have tried as many possible combinations as I can think of for settings of both the sine and analog output function, with no success. I have contacted NI about this and they have run my VI and say it works fine; but they don't have the same hardware as me to try it on. I have two lots of hardware and the same problem occurs on both, so it isn't a faulty hardware issue.

 

I'm using an external oscilloscope to measure the waveform and have tried two different units, with the same results on both.

0 Kudos
Message 1 of 15
(2,932 Views)

Hi,

 

Have you plotted the sine wave on a graph on the front panel to make sure that the function you're using to generate it is generating a clean signal?

 

Can you post your VI so we can look at your analog output settings?  Are you trying to do continuous generation?

 

It's kind of difficult to tell what's going on here without seeing the code.

d

0 Kudos
Message 2 of 15
(2,928 Views)

Hi,

 

No, I haven't plotted it out on a graph, but I will try that next, in the meantime the VI is attached.

 

At the moment the sine generator is set to 10k samples although I have tried it at much lower values with no success.

 

The analog output is set to give continuous samples, 100k samples at 10kHz - and again, I have tried much lower settings with no success.

 

 

 

0 Kudos
Message 3 of 15
(2,923 Views)

What happens if in the DAQmx Assistant you go to the 'Advanced Timing' tab, and change regeneration settings to 'do not allow regeneration'?

 

Dan

0 Kudos
Message 4 of 15
(2,916 Views)

Doug-

In your Simulate signal Express vi there is an option to generate integer number of cycles.  Check it and all will be well


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 15
(2,912 Views)

Julian,

 

If I check that option, then everything works ok and the waveform is fine, but I can only select whole number frequencies. I need to be able to select frequencies to 2 decimal places.

 

 

 

Dan,

 

It makes no difference if I select 'do not allow regeneration', I still get a chopped about waveform.

0 Kudos
Message 6 of 15
(2,893 Views)

Can anyone help with this? I've spent another fruitless day today trying to get a simple sine wave generator to work, with no success. I'm beginning to wish I'd just stuck with a PLC.

0 Kudos
Message 7 of 15
(2,879 Views)

Can you post a picture of the 'chopped up' waveform you are describing? Additionally, can you run the example vi, "Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi"?  Does it yield similar behavior?

 

Dan

0 Kudos
Message 8 of 15
(2,873 Views)

@Doug_1970 wrote:

Julian,

 

If I check that option, then everything works ok and the waveform is fine, but I can only select whole number frequencies. I need to be able to select frequencies to 2 decimal places.

 


 


why would that limitation exist?  Try that again-


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 15
(2,870 Views)

If I enter any value with a decimal place, then the frequency just defaults to the next highest whole number - i.e. if I enter 0.2Hz, then I get a 1Hz output.

0 Kudos
Message 10 of 15
(2,866 Views)