How to reset the load cell to zero condition before start running?
5 次查看(过去 30 天)
显示 更早的评论
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;
0 个评论
回答(1 个)
Satwik
2025-2-18
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simultaneous and Synchronized Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!