04-23-2010 11:43 AM
04-23-2010 11:46 AM
Hi Barry,
Can you post your code?
Thanks,
Keith Shapiro
National Instruments R&D
04-26-2010 03:36 AM
Hi Keith. I'm reading the data from a file as per the following code.
My script is:
Script myscript1
repeat forever
generate mywfm
end repeat
end Script
Rgds,
Barry
04-26-2010 08:53 AM
Hi Barry,
It's definitely not a memory issue. You'd have received an error trying to load the waveform onto the card.
Just to double check - your clock rate is 500kHz, clock source is Onboard Clock?
Do you get any errors when you stop the device from generating?
Keith Shapiro
National Instruments R&D
04-26-2010 09:03 AM
Hi Keith,
I'm running the clock at 38MHz to give me a DAC update rate of 500KHz (need 76 clocks per DAC word). I have tried both the on-board clock and an external ClkIn.
I have also tried a much slower clock, down to a few hundred kHz.
I don't get any errors when I stop the device from generating.
Regards,
Barry
04-26-2010 11:27 AM
Hi Barry,
Are you repeating each sample 76 times in the waveform you download to the 6552? The 6552 outputs one sample per edge of its sample clock. To get your 500KHz update rate, you'd need to duplicate each sample in the memory 76 times...
This would definitely exceed the memory of your device if you have 1M samples.
Keith
04-27-2010 05:21 AM
Hi Keith,
That was my problem. I had created my array of DAC words to be 1M long, when in fact it should have been 1M x76 to accomodate all codes (although this would be too long for the on-board memory).
So what was happening was I was writing 1M/76 = 13k words and then starting again so the full sinewave had not completed, which was giving me my discontinuities.
When I reduce my number of DAC words to 16384 it works fine (16384 x 76 x 4 bytes/word = 5M).
One final question. The default data width for the 6552 is 4 bytes. Can I reduce this to 1 byte? This would allow me to increase my number of codes by a factor of 4.
Regards,
Barry
04-27-2010 12:14 PM
Hi Barry,
The output engine on the 6552 does not permit changing the data width. (This can be a bit confusing, since you can use 1-byte, 2-byte and 4-byte acquisition width on input.)
Do you need the oversampling? The 6552 can run at 500KHz, allowing you to output one sample per clock.
Also, if you're just doing a single sine wave repeated multiple times, could you make your output only have a single cycle and then use scripting to achieve the same goal?
Hope that helps,
Keith Shapiro
National Instruments R&D