I am trying to use two analog channels and one digital channel on a daq. I am passing the daq session_info a file called "trial_sequence" with a matrix called flicker_info of 3 columns of 0's and 1's, one column per channel. I know that the matrix file works becasue I've troubleshooted by using 3 analog channels and it works, but I need the third channel to go to a digital output.
However, I keep getting the following error:
"The hardware you are trying to use is already reserved"
Is there a way to queue digital output or not rely on outputSingleScan?
timeStarted = cputime;
session_info = daq.createSession('ni');
session_info.IsContinuous = true;
sample_rate = 100000;
session_info.Rate = sample_rate;
addAnalogOutputChannel(session_info,'Dev1', [2 3], 'Voltage');
filename = 'trial_sequence.mat';