Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Data in the Analog Output buffer vanishe before generation

1 回表示 (過去 30 日間)
Luc Gendre
Luc Gendre 2012 年 1 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello folks!
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:
set(ai,'TriggerType','HwDigital')
set(ai,'HwDigitalTriggerSource','PFI0')
set(ai,'TriggerCondition','NegativeEdge')
set(ao,'TriggerType','HwDigital');
set(ao,'HwDigitalTriggerSource','PFI0');
set(ao,'TriggerCondition','NegativeEdge')
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.
Luc
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 1 月 4 日
That's the Legacy interface, right, not the session-based interface?
Walter Roberson
Walter Roberson 2012 年 1 月 4 日
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.

回答 (1 件)

Manisha
Manisha 2012 年 1 月 9 日
Hi Luc,
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.
Thanks,
Manisha

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by