forked from Lucast85/BMSino-Matlab-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Read_BMSino2.asv
61 lines (57 loc) · 1.42 KB
/
Read_BMSino2.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
clear all
clc
delete(instrfindall);
test_info=test_setup();
pause(1)
while(1)
test_info.BMSino.setBalancingStatus([0 0 0 0 0 0]);
test_info.BMSino.getBalancingStatus
GetBalSts1= test_info.BMSino.CellsBalancingStatus;
pause(1)
test_info.BMSino.getBMSTemperature
test_info.BMSino.getTemperatures
test_info.BMSino.getVoltages
test_info.BMSino.setBalancingStatus([0 1 0 1 0 0])
test_info.BMSino.getBalancingStatus
pause(1)
end
% myBattery=Battery('BMSino');
% myBattery.COMinit(test_info.BMSINO_BAUDRATE, test_info.BMSINO_SERIALPORT);
% figure
% h = animatedline;
% ax = gca;
% ax.YGrid = 'on';
% ax.YLim = [65 85];
% stop = false;
% startTime = datetime('now');
% while ~stop
% % Read current voltages value
% myBattery.getVoltages
% myBattery.getTemperatures
% temp = max(myBattery.CellsTemperatures);
%
% % Get current time
% t = datetime('now') - startTime;
%
% % Add points to animation
% addpoints(h,datenum(t),myBattery.TotalVoltage)
% % Update axes
% ax.XLim = datenum([t-seconds(15) t]);
% datetick('x','keeplimits')
% drawnow
% % Check stop condition
% if input('\n')== 1
% stop = 1;
% end
% end
%myBattery.getVoltages
%
% myBattery.getTemperatures
%
% %myBattery.setBalancingStatus([1 0 0 0 0 0 0 0])
%
% myBattery.getBalancingStatus
%
% %myBattery.setBalancingStatus([1 0 0 0 0 0 0 0])
%
% myBattery.getBMSTemperature