01-17-2020 01:58 PM
I am using Matlab 2019b with a NI DAQ6363 and cannot queue output data using both analog and digital outputs simultaneously. I am passing the daq a file called "trial_sequence" with a matrix called flicker_info of 3 columns vectors of 0's and 1's, one column per channel. OutputSinglescan does not work for this application because the rewardpump attached to the digital channels requires a sead 100ms of signal from the ttl pulse. Any suggestions would be appreciated.
clear; clc; %clear everything
timeStarted = cputime;
daqreset; %reset DAQ
session_info = daq.createSession('ni');
session_info.IsContinuous = true; %for continuous background
sample_rate = 100000; %sample rate is 100k
session_info.Rate = sample_rate; %pass the sample rate to the DAQ
addAnalogOutputChannel(
% add rewardpump channel where input 0 = off, 1 = 1
addDigitalChannel(session_
filename = 'trial_sequence.mat';
load(filename);
queueOutputData(session_info, flicker_info);
session_info.startBackground()