05-09-2012 12:04 PM
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.
Solved! Go to Solution.
05-09-2012 12:18 PM
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
05-09-2012 12:28 PM
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.
05-09-2012 12:53 PM
What happens if in the DAQmx Assistant you go to the 'Advanced Timing' tab, and change regeneration settings to 'do not allow regeneration'?
Dan
05-09-2012 01:31 PM
Doug-
In your Simulate signal Express vi there is an option to generate integer number of cycles. Check it and all will be well
05-10-2012 02:22 AM - edited 05-10-2012 02:22 AM
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.
05-10-2012 09:53 AM
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.
05-10-2012 10:07 AM
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
05-10-2012 10:10 AM
@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-
05-10-2012 10:16 AM
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.