Achieving tight trigger timing in DAQ session under Win 7 64-bit
Show older comments
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?
Answers (1)
Phillip
on 1 Nov 2012
0 votes
Categories
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!