Jump to content
  • 0

Generate and acquire data with DT9857E




i'm trying to generate and acquire signals for a study using a DT9857E box, so i wrote a short code(using matlab and the DAQ Toolbox) to test wether the result could be satisfying or not. The code is written this way:

clear all, clc, close all
s = daq("dt");
fAbtast = 50e3;
s.Rate = fAbtast; %1000;
BoxName = 'DT9857E-16(00)';
addoutput(s,BoxName, '0', 'Voltage');
addinput(s,BoxName,'0', 'Voltage');

fIn = 1e3;
t = 0:1/fAbtast:1-1/fAbtast;
x = sin(2*pi*fIn*t);

Output_data = x'*1.2;
Input_data = readwrite(s, Output_data);
time_vec = seconds(Input_data.Time);
plot(time_vec, Output_data)
hold on
plot(time_vec, Input_data.Variables)
hold off
grid on
legend(["Output Signal","Acquired Signal"])

The result looks this way.


Any Idea on why the acquired signal does look that way? Since i just connected an output channel to an input channel, the same output signal or at least likely was expected to be acquired.

I even try to reproduce the example in the following matlab documentation: Simultaneously Acquire Data and Generate Signals - MATLAB & Simulink - MathWorks Deutschland

but the result did not look great :

%% Example from Matlab's documentation
% A session has been already defined
output = cos(linspace(0,2*pi,1000)');

data1 = readwrite(s, output);

hold on
ylabel("Voltage (V)") 
%title("Acquired Signal");
legend(["Output Data","Acquired Signal"])


below is an enlarged view of the acquired signal


Any suggestion to fix this will be greatly appreciated.

Thanks for your reply :)

I also attached a matlab file with the code if one may want to reproduce these results.


Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello everyone,

i'll really appreciate any suggestion to fix this issue with Matlab DAQ Adaptator and the DT9857E while trying to generate and acquire signals.

Thanks for your reply! 


Link to comment
Share on other sites

  • 0

Hello Fausto,

thank you for replying. So i'll have to revert to DT Open Layers v 7.8.2 to fix this issue.

Thanks a lot

Best regards,


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...