Achieving tight trigger timing in DAQ session under Win 7 64-bit

1 回表示 (過去 30 日間)
Phillip
Phillip 2012 年 10 月 25 日
I'm attempting to port legacy code written using the old 32-bit DAQ toolbox, into 64-bit under the new DAQ 'Session' mentality. My old code allows me to send manual triggers with minimum delay between issuing the command and the signal being generated.
The old code:
ao = analoginput('nidaq','Dev1');
chanHandle = addchannel(ao,0);
set(ao,'TriggerType','manual')
start(ao)
... (do some other things, then decide I need to send a signal with minimum delay i.e. RIGHT NOW)
trigger(ao)
Under the 64-bit system, I'm not sure how to achieve the desired minimum delay. Actually I'm not sure how to issue a software trigger at all, or whether they even exist. The documentation is awful :(
I imagine I will have to do something along the lines of:
ao = daq.createSession('ni');
chanHandle = ao.addAnalogOutputChannel('Dev1',1,'Voltage');
ao.queueOutputData(data);
L_handle = ao.addlistener( ???, @(src,event))
ao.startBackground
Can anyone point me on the right path?

回答 (1 件)

Phillip
Phillip 2012 年 11 月 1 日
The only solution I've found to this so far, is to run 32-bit Matlab on 64-bit Windows, which still uses the legacy drivers. This is not ideal due to memory restrictions (although 4 GB is available, as opposed to 2-3 GB when using a 32-bit OS).

カテゴリ

Help Center および File ExchangeDigital Input and Output についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by