Jump to content
  • 0

1208LS issue with reading analog inputs




I am using the 1208LS to read 6 potentiometer analog voltages through MATLAB, and I am experiencing major throttling in data acquisition. I believe the problem has something to do with the differential/single ended modes, where I first tried to switch the configuration in Instacal, but a3-a0 stayed on differential and a7-a4 went to single ended. I then tried to switch the configuration in the script, and the software registered all ports as single ended, but it still throttled my sample rate and kept sending these two warnings. 

Warning: Vendor Driver command failed and returned
Status code: 33031
Diagnostic: 'To perform any operation on this device, all channels in this subsystem must have the same terminal
configuration setting'

Warning: Cannot support range of -20 to +20 Volts.  Range set to -10 to +10 Volts. 

I have tried to check wiring and voltages, I have my 6 wiper pins in a7-a2, all of them only go between 0 and 5 V, I am using the ground pin next to the +5 V source and the +5V source as the power for the potentiometers, I was able to run calibration through Instacal successfully. I have tried my setup in both and Arduino and a different DAQ, and it worked without issue. below I have attached a simple setup and log data script that is giving me the errors, but these commands were taken straight from MATLAB. If there is any configuration steps that I am missing, or just something I can do to force all of the ports to be single ended that I haven't tried, or if it is some other issue, any support would be great.

d = daq('mcc');

[adtheta1,id1] = addinput(d,"Board0","ai7","Voltage");
[adtheta2,id2] = addinput(d,"Board0","ai6","Voltage");
[adtheta3,id3] = addinput(d,"Board0","ai5","Voltage");
[adtheta4,id4] = addinput(d,"Board0","ai4","Voltage");
[adtheta5,id5] = addinput(d,"Board0","ai3","Voltage");
[adtheta6,id6] = addinput(d,"Board0","ai2","Voltage");

adtheta1.TerminalConfig ='SingleEnded';
adtheta1.Range = [-10.0 10.0];
adtheta2.TerminalConfig ='SingleEnded';
adtheta2.Range = [-10.0 10.0];
adtheta3.TerminalConfig ='SingleEnded';
adtheta3.Range = [-10.0 10.0];
adtheta4.TerminalConfig ='SingleEnded';
adtheta4.Range = [-10.0 10.0];
adtheta5.TerminalConfig ='SingleEnded';
adtheta5.Range = [-10.0 10.0];
adtheta6.TerminalConfig ='SingleEnded';
adtheta6.Range = [-10.0 10.0];

T = read(d);
B = table2array(T);

Edited by Ben993
question error
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

We do not provide MatLab support for MCC products. Instead, reach out to the Mathworks. With that said, you may be incorrectly adding channels. 

s = daq.createSession('mcc');
ch0 = addAnalogInputChannel(s,'Board0', 'Ai0', 'Voltage');
ch0.TerminalConfig = 'SingleEnded';        
ch0.Range = [-10,10];

A colleague wrote this script a while back using MatLab 2017 and USB-1408FS.

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...