So I cleared everything and put the script in and now I get this message:
running lua script len(1455)...lua: startup script error: ([string "startup"]:13.0: malformed number near '00a0')
done
AEM infinity CAN BUS data
SO i got it to work but not all channels are displaying. I have attached the script and the can bus data log. Also, how do i pull the RPM data for the shiftx script. I see everyone using getRPMtimer but i am assuming everyone is tapping the Tach wire where i am pulling it from CAN.. Thanks.
- Attachments
-
- config 091315.txt
- (2.92 KiB) Downloaded 210 times
-
- 091315.txt
- (37.99 KiB) Downloaded 236 times
you probably need someone else to help out regarding debugging the CAN log, however I can see no "32546819" values in the stream. Either you don't have an o2 sensor hooked up or that value is streaming out somewhere on another value.
Also there are three "32546820.0" values in a row with different data. I'm not sure why but I think something is getting confused.
Actually looking at the data the first "32546820.0" value is actually the 32546819.0 one as it ends with 220 and 96 bits (which is 13.8 volts .. 220x256 + 96 = 13.
The second "32546820.0" value is the actual "32546820.0" data which contains the map, fps ,ops.
The third is only present sometimes which means it's being output at a lower frequency. It doesn't look like it contains any data except the last.
One last thing is the data is all even values... I suspect there is a rounding issue given the values are so high. You need to email the guys to see if there is something they can fix at their end.
Also there are three "32546820.0" values in a row with different data. I'm not sure why but I think something is getting confused.
Actually looking at the data the first "32546820.0" value is actually the 32546819.0 one as it ends with 220 and 96 bits (which is 13.8 volts .. 220x256 + 96 = 13.
The second "32546820.0" value is the actual "32546820.0" data which contains the map, fps ,ops.
The third is only present sometimes which means it's being output at a lower frequency. It doesn't look like it contains any data except the last.
One last thing is the data is all even values... I suspect there is a rounding issue given the values are so high. You need to email the guys to see if there is something they can fix at their end.
Hi,
Sorry I missed this.
madjak, thanks for your analysis. I think there might be something to investigate in the firmware where we might be dropping the bit on 29 bit CAN messages.
First thing I'll focus on is sending messages in loopback - from CAN 2 to CAN 1 to see if we're mis-reading the CAN ID when it's incoming.
Sorry I missed this.
madjak, thanks for your analysis. I think there might be something to investigate in the firmware where we might be dropping the bit on 29 bit CAN messages.
First thing I'll focus on is sending messages in loopback - from CAN 2 to CAN 1 to see if we're mis-reading the CAN ID when it's incoming.
you could probably program a work around by detecting if there a zero values in the data that correspond to set unique locations in the data chain.
32546820.0, 129.0, 0.0, 0.0, 0.0, 5.0, 48.0, 220.0, 96.0,
32546820.0, 3.0, 185.0, 0.0, 3.0, 3.0, 0.0, 0.0, 8.0,
32546820.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0,
So if the first value = 0 then discard, it's not required
Then if the second value = 0 the data 32546820.0, 129.0, 0.0, 0.0, 0.0, 5.0, 48.0, 220.0, 96.0 is the 32546819 data, if not then 32546820.0, 3.0, 185.0, 0.0, 3.0, 3.0, 0.0, 0.0, 8.0 is 32546820.
So something like this:
Bit nasty but it's at least one way to work around the issue.
32546820.0, 129.0, 0.0, 0.0, 0.0, 5.0, 48.0, 220.0, 96.0,
32546820.0, 3.0, 185.0, 0.0, 3.0, 3.0, 0.0, 0.0, 8.0,
32546820.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0,
So if the first value = 0 then discard, it's not required
Then if the second value = 0 the data 32546820.0, 129.0, 0.0, 0.0, 0.0, 5.0, 48.0, 220.0, 96.0 is the 32546819 data, if not then 32546820.0, 3.0, 185.0, 0.0, 3.0, 3.0, 0.0, 0.0, 8.0 is 32546820.
So something like this:
Code: Select all
CAN_map = {
[32546816] = function(data)
map_chan(rpmId, data, 0, 2, 0.39063, 0)
map_chan(tpsId, data, 4, 2, 0.0015259, 0)
map_chan(atsId, data, 6, 1, 1.8, 32)
map_chan(ctsId, data, 7, 1, 1.8, 32)
end,
[32546820] = function(data)
if data[0] ~= 0 then
if data[1] == 0 then
--run data (its 32546819)
map_chan(afrId, data, 1, 1, 0.057227, 7.325)
else
--run data (its 32546820)
map_chan(mapId, data, 0, 2, 0.014504, -14.6960)
map_chan(fpsId, data, 3, 1, 0.580151, 0)
map_chan(opsId, data, 4, 1, 0.580151, 0)
end
else
--drop data (its the third line)
end
end
}