MATLAB Answers

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

1 view (last 30 days)
Phillip
Phillip on 25 Oct 2012
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?

  0 Comments

Sign in to comment.

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).

  0 Comments

Sign in to comment.

Sign in to answer this question.