Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Start data acquisition in NI-USB 6501

Hi,

 

I am trying to send triggers to two trigger devices (BioSemi EEG and Delsys EMG) connected to NI-USB 6501. I want to be able to start the data acquisition in both simultaneously. I am using the following MATLAB code to send triggers:

 

s=daq.createSession('ni');
addDigitalChannel(s,'Dev1','Port1/Line0:3','OutputOnly');
addDigitalChannel(s,'Dev1','Port2/Line0:3','OutputOnly');
outputSingleScan(s,[0 1 1 1, 0 0 0 1]);
 
However the 4 bit trigger codes for starting and stopping the acquisition keep changing with every run. Is it possible to have one set of code for starting the acquisition and one for stopping.
 
Thanks,
Neelesh
0 Kudos
Message 1 of 2
(2,864 Views)

Neelesh,

 

We have some text-based examples for DAQmx which can be found here: http://www.ni.com/example/6999/en/#.NETDIO 

 

The Digital I/O examples may be similar for triggering. However, we don't have experience with MATLAB and thus cannot guide you on how specifically to do this.

Disclaimer: MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.



0 Kudos
Message 2 of 2
(2,823 Views)