How to reset the load cell to zero condition before start running?

10 visualizaciones (últimos 30 días)
Azmi Mohammad
Azmi Mohammad el 19 de Nov. de 2020
Respondida: Satwik el 18 de Feb. de 2025
Hi,
I am working with load cell as analog input connected NI module. Initial condition, i applied compression load on the force load manually. Then I want to set the load cell reading to zero before applying vibration load on the load cell. How to reset the load cell?
%start session
ai1Session = daq.createSession('ni');
chi1 = addAnalogInputChannel(ai1Session,'cDAQ1Mod1', 0 , 'Bridge');
ai1Session.Rate = 2000;
%input setting force cell
chi1.BridgeMode = 'Full';
chi1.NominalBridgeResistance = 700;
chi1.ExcitationVoltage = 10;
chi1.ExcitationSource = 'Internal';
ai1Session.DurationInSeconds = 10;
[data1,time1] = ai1Session.startForeground;

Respuestas (1)

Satwik
Satwik el 18 de Feb. de 2025
To zero the load cell reading before applying a vibration load, you can perform a tare operation. This process involves capturing the current load value and then subtracting it from future readings to reset the load cell to zero.
Here is an example of such an implementation:
% Start session
ai1Session = daq.createSession('ni');
chi1 = addAnalogInputChannel(ai1Session, 'cDAQ1Mod1', 0, 'Bridge');
ai1Session.Rate = 2000;
% Input setting for force cell
chi1.BridgeMode = 'Full';
chi1.NominalBridgeResistance = 700;
chi1.ExcitationVoltage = 10;
chi1.ExcitationSource = 'Internal';
ai1Session.DurationInSeconds = 10;
% Acquire initial load cell data to determine offset
[data1, time1] = ai1Session.startForeground;
% Calculate the average of the initial data to use as an offset
offset = mean(data1);
% Display or log the offset value
fprintf('Offset (tare value): %.4f\n', offset);
% Now, when acquiring new data, subtract the offset to zero the reading
[data2, time2] = ai1Session.startForeground;
% Zero the data by subtracting the offset
zeroedData = data2 - offset;
I hope this helps!

Categorías

Más información sobre Simultaneous and Synchronized Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by