# Reading data from Pressure Sensor

I am having trouble reading data from a pressure sensor using MATLAB. The pressure sensor is connected to an NI 9219 Analog Input Device. Firstly, i tested the device to make sure it is working using NI DAQmx (Measurement and Automation Explorer) software and below is a waveform of an output received : So i have tried a couple of things based on comments below, i have done 2 runs of the code changing only the addAnalogInputChannel settings:

1) First Run is using Voltage in the addAnalogInputChannel, i have attached a picture of my workspace and Waveform below:

2) Second Run is using Bridge in the addAnalogInputChannel, i have attached a picture of my workspace and Waveform below:

My previous code is shown below:

%% NI UST-9162 Interface %%
devices = daq.getDevices;
% disp(devices) %Identify devices (NI USB-9162 as 'Dev1')
s = daq.createSession('ni');

%ch0.BridgeMode = 'Full'; %Configures the bridge mode property of Honeywell
%ch0.NominalBridgeResistance = 5000; %Honeywell datasheet suggests 5 kOhm

ch.Coupling = 'DC';
ch.ExcitationVoltage = 2.5;
s.Rate = 2; %Scan rate per second
s.DurationInSeconds = 2; %Set data collection for S seconds
[data,time] = s.startForeground; %Start test data collection

%% Plot Captured Data %%
figure(1)
clf(figure(1))
grid on

plot(time,data,'-.','linewidth',2)
xlabel('Time (s)')
ylabel('Voltage')
legend('Honeywell')
xlim([0 s.DurationInSeconds])
ylim([-0.03 0.03])


I have listed the equipment below with links to datasheet:

3) MATLAB 2017b with Data Acquisition Tool Box

4) NI DAQmx

• Hook up a known voltage to the DAQ, then poll it from matlab, if your not getting anything then look at the software until you do. Oct 2 '19 at 21:13
• If i understand stand your response correctly, the first waveform does show a response in DAQ but does not show response in MATLAB, the settings for both are exactly the same
– sk95
Oct 2 '19 at 21:33