필터 지우기
필터 지우기

How to create a hardware-timed task for NI USB-6363 DAQ?

조회 수: 2 (최근 30일)
Islam Elnady
Islam Elnady 2021년 10월 22일
편집: Islam Elnady 2021년 10월 22일
I'm trying to output an ordinary sinewave from MATLAB via NI USB-6363 DAQ and displaying it on an oscilloscope. The output frequency of the signal shown on the oscilloscope is way smaller than the required. I've configured the frequency at 1000 Hz, but the output is coming around 6 Hz only. I suppose I have to create a hardware-timed task.
I'm sure the oscilloscope is properly configured.
Any help how can I do the task?
Here is what I've tried:
clear;
clc;
d = daq("ni");
addoutput(d,"Dev1","ao0","Voltage");
d.Rate = 1000000;
t = 0; % Starting time
tt = 25; % Total time
dt = 0.00001; % Time step
f = 1000; % Signal Frequency
while t < tt
out = 5*sin(2*pi*f*t); % Resolver Signal
write(d,out);
t = t + dt;
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simultaneous and Synchronized Operations에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by