In my code, I try to get a reading from a thermocuple on Ch11. Whenever I use Ch11, the rest of my values from other channels are skewed.
ch11=addinput(dq,'Board0','Ai11','Voltage');
ch11.TerminalConfig="SingleEnded";
MAT = mean(Volts.Board0_Ai11, "all")*20;
app.IntakeManifoldTempCEditField.Value = MAT;
So when I comment Ai11 out and use Ai4 for example, the weight of my bucket and voltage from Ai5 are correct. When I tried to use Ai11 for a manifold air temperature reading, I get negative weights or my bucket through Ai5.
ch4=addinput(dq,'Board0','Ai4','Voltage');
ch4.TerminalConfig="SingleEnded";
MAT = mean(Volts.Board0_Ai4, "all")*20;
app.IntakeManifoldTempCEditField.Value = MAT;
Its important to note that I need the thermocouple of Ai11 to be used instead of the pressure trandsucer. The code runs fine when ch11 is commented out. Even if i use Ai4 for the code and Ai11 is not commented out - I get errors.
Here is where I configure all of my devices.
ch0=addinput(dq,'Board0','Ai0','Voltage');
ch1=addinput(dq,'Board0','Ai1','Voltage');
ch2=addinput(dq,'Board0','Ai2','Voltage');
ch3=addinput(dq,'Board0','Ai3','Voltage');
ch4=addinput(dq,'Board0','Ai4','Voltage');
ch5=addinput(dq,'Board0','Ai5','Voltage');
ch6=addinput(dq,'Board0','Ai6','Voltage');
ch0.TerminalConfig="SingleEnded";
ch1.TerminalConfig="SingleEnded";
ch2.TerminalConfig="SingleEnded";
ch3.TerminalConfig="SingleEnded";
ch4.TerminalConfig="SingleEnded";
ch5.TerminalConfig="SingleEnded";
ch6.TerminalConfig="SingleEnded";
ch7.TerminalConfig="SingleEnded";
ch8.TerminalConfig="SingleEnded";
ch9.TerminalConfig="SingleEnded";
ch10.TerminalConfig="SingleEnded";
ch11.TerminalConfig="SingleEnded";
If I use Ai1 for the input, it works fine. For some reason Ai7 throguh Ai11 give me errors.
When I comment any of these out.. I get errors