07-28-2011 05:39 AM
Hi all,
I have changed the Multi Function Sync AI/AO program as shown in the attachment. I want to control
the amplitude of Analog output signal in real time just by changing the value on the Panel as shown in the
attachment.
The problem which i am facing is that when i press the start button, the code inside the while loop
generates the error -200279. " Attempted to read samples which are no longer available."
Can anyone please tell me how to use DAQmxReadAnalog64 and DAQmxWriteAnalog64 functions in a single loop so that
i can change the amplitude of analog output signal during running of the code?
Any help will be greatly appreciated.
07-29-2011 11:06 AM
It sounds like you are executing your DAQmx Read before the Write executes. Step 1 is to create and start the task before the loop begins. If you want to change the write amplitude while running, you will need to stop the task inside the loop based upon the user change, and then start the task again in the loop that will then have the new waveform amplitude. Let me know how it goes!
Regards,
Ben
National Instruments