How to reset the load cell to zero condition before start running?
조회 수: 7 (최근 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!