This question is closed. Reopen it to edit or answer.
Data in the Analog Output buffer vanishe before generation
1 view (last 30 days)
Show older comments
Luc Gendre on 4 Jan 2012
Closed: MATLAB Answer Bot on 20 Aug 2021
I wish a happy new year to every one!
I'm using a National Instrument PCI-6120 (Driver NIDAQmx 9.4) with a BNC-2120, with MatLab 2010a. I'm trying to synchronize the generation of a signal with an acquisition. Easy peasy... as it should be...!! But I have an issue with the analog output (AO)! Here is how I configured AI and AO so that they are synchronized:
So theoretically, on a negative edge of PFI0, both AI and AO should start running, right?!
So I put some data into the AO buffer (using "pudata" function), and I execute start(ai) and start(ao) so that they get ready and wait for a trigger. But then, after having executed start(ao), and before any trigger happens, the AO returns to the initial state: no data in the buffer and AO waiting for start. I don't understand. And the most impressive thing is that if I plug a scope at the output of the AO, I don't see any signal being generated! It's like I didn't do anything! The data in the AO buffer simply vanished.
Does anybody have a clue...?
Thanks a lot in advance.
Walter Roberson on 4 Jan 2012
It appears you would need R2011b to use the PCI-6120 with the session-based interface, so no point in trying to work around the problem with the session-based facilities. Ah well.
Manisha on 9 Jan 2012
Any chance you can upgrade to R2011b or R2012a pre-release? With session-based interface, starting 11b, your analog input and analog output channels on the same device will be synchronized automatically if added to the same session.
Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!