why matlab hangs up when i use 2 channels from analog discovery with data aquisition toolbox

1 view (last 30 days)
clear
s = daq.createSession('digilent')
ch = addAnalogOutputChannel(s,'AD1', 1:2, 'Voltage')
rate = 1e6;
s.Rate = rate;
outputData(:,1) = linspace(-1,1,1000);
outputData(:,2) = linspace(-2,2,1000)';
queueOutputData(s,outputData);
startForeground(s);
hi,
i whant to generate signals on two channels with analog discovery divice, with data aqisition toolbox. While using one channel there are no problems occuring. When i use two channels (with the code below) the signals gets generated, but then matlab dont stops running and i can unly quit when closing matlab.
I am very grateful for help

Answers (1)

Sai Deepesh Pokala
Sai Deepesh Pokala on 8 Jun 2018
When you install MATLAB, there is a cap on the RAM that it is allowed to occupy. Therefore, if your code involves creating temporary high-dimensional arrays or matrices, chances are it might reach that limit. Try eliminating unwanted loops or assignments. Good luck!

Categories

Find more on Data Acquisition Toolbox Supported Hardware 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!