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

2 views (last 30 days)
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
Phillip on 1 Nov 2012
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).

Categories

Find more on Digital Input and Output 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!