So, I managed to get my throtramp value changing over CAN, however, I can't make any sense of the index.
Based on the below by entering command "list", throtramp should have an index value of 31. (index values added in excel)
Code: Select all
Ind Param
0 boost
1 fweak [Hz]
2 fconst [Hz]
3 udcnom [V]
4 fslipmin [Hz]
5 fslipmax [Hz]
6 fslipconstmax [Hz]
7 fmin [Hz]
8 fmax [Hz]
9 numimp [ppr]
10 ocurlim [A]
11 minpulse [dig]
12 udcofs [dig]
13 udclim [V]
14 udcmin [V]
15 udcmax [V]
16 iacmax [A]
17 idcmax [A]
18 idcmin [A]
19 tmphsmax [°C]
20 tmpmmax [°C]
21 throtmax [%]
22 throtmin [%]
23 ifltrise [dig]
24 ifltfall [dig]
25 chargeki [dig]
26 potmin [dig]
27 potmax [dig]
28 pot2min [dig]
29 pot2max [dig]
30 potmode [0=SingleRegen, 1=DualChannel, 2=CAN]
31 throtramp [%/10ms]
However, when I send the following CAN message to this index, it changed iacmax, which should be index of 16.
Code: Select all
msg.id = 0x601; //set parameter ID
msg.len = 8;
msg.buf[0] = 0x40; //CMD
msg.buf[1] = 0x00;
msg.buf[2] = 0x20;
msg.buf[3] = 0x1F;//index:boost=0, count down for index number
msg.buf[4] = 0xE0;
msg.buf[5] = 0x01;//value x 32
msg.buf[6] = 0x00;
msg.buf[7] = 0x00;
Can0.write(msg);
By some trial and error, I was able to arrive at index 46 for throtramp. Is this simply a likely matter of user error on my part that Im not seeing?
The following works correctly, setting the parameter value to 15.
Code: Select all
msg.id = 0x601; //set parameter ID
msg.len = 8;
msg.buf[0] = 0x40; //CMD
msg.buf[1] = 0x00;
msg.buf[2] = 0x20; //
msg.buf[3] = 0x33;//index:boost=0, count down for index number
msg.buf[4] = 0xE0; //value x 32 == 480 == 0x01E0
msg.buf[5] = 0x01;
msg.buf[6] = 0x00;
msg.buf[7] = 0x00;
Can0.write(msg);