08-16-2024 09:01 AM
Hello,
I'm currently working on a VI that ramps up a sinusoidal waveform and then holds the final amplitude indefinitely. However, I would like to adjust the amplitude of the sinusoidal waveform in real-time. While the attached VI does allow for this adjustment, the changes take a long time to take effect (~ 1 MINUTE)
Do you have any suggestions on how I can make the amplitude changes immediate while maintaining the sampling rate at 250 kHz? Your insights would be greatly appreciated.
08-16-2024 10:07 AM
Please attach the VI in LV2019 or older as most regular LV users are not up to date on the latest LV release.
The trick is to put the DAQ into continuous sampling mode, write 1 cycle of the waveform, let the HW loop over the samples for 1-cycle, update the 1-cycle waveform as needed.
08-16-2024 11:30 AM
Thank you so much for sharing this with me. I've attached the 2019 version of the VI for your reference. I didn't fully grasp the trick you mentioned—could you please elaborate a bit more? I would greatly appreciate your insights.
08-16-2024 01:21 PM
I would recommend the Dynamic Signal Generation (DSG) Soft Front Panel (SFP).
DSA Soft Front Panels Download - NI
It is field-tested and free.
08-16-2024 02:07 PM
I would check how quickly your while loop is iterating. You're generating 10 samples per iteration and writing that to the output, but if the DAQmx function isn't blocking you may be writing a lot more data to the DAQmx buffer than you think.
If that's the case then it may take a while for you to see a difference in the output because you've built up a big buffer of output data that the output needs to work though first.