How to reset the load cell to zero condition before start running?
10 ビュー (過去 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!