Izze Racing Brake Temperature Sensors
Izze Racing Brake Temperature Sensors
I ordered four of these today (http://www.izzeracing.com/products/brak ... nsors.html). Does anyone else have these working with their RCP? If so, how did the integration with the RCP go?
We have customers using these already, and one of our dealers (RaceElectronic) provided CAN mapping information for the sensors.
https://wiki.autosportlabs.com/Izze_Rac ... re_Sensors
Keep us posted with how it works!
https://wiki.autosportlabs.com/Izze_Rac ... re_Sensors
Keep us posted with how it works!
I had a chance to get these working today. There is one problem though. My sensors are setup for 16 channels each. I had to trim the script in the link above quite a bit because I was getting an out of memory error from lua. Even with trimming I was only able to get the front two sensors working. I can setup the sensors to use 8 channels but then I won't be able to do anything else with lua. Is there something I am missing here? I'd hate to think I can't use the ShiftX and Zeitronix scripts I have too. Here is the script I have working.
Code: Select all
--This example is configured for IzzeRacing CAN-bus TireTemp-Sensors
--by www.race-electronic.com
setTickRate(30)
BDF1Id = addChannel("BDF1", 10, 0, -20, 950, 'degC')
BDF2Id = addChannel("BDF2", 10, 0, -20, 950, 'degC')
BDF3Id = addChannel("BDF3", 10, 0, -20, 950, 'degC')
BDF4Id = addChannel("BDF4", 10, 0, -20, 950, 'degC')
BDF5Id = addChannel("BDF5", 10, 0, -20, 950, 'degC')
BDF6Id = addChannel("BDF6", 10, 0, -20, 950, 'degC')
BDF7Id = addChannel("BDF7", 10, 0, -20, 950, 'degC')
BDF8Id = addChannel("BDF8", 10, 0, -20, 950, 'degC')
BDF9Id = addChannel("BDF9", 10, 0, -20, 950, 'degC')
BDF10Id = addChannel("BDF10", 10, 0, -20, 950, 'degC')
BDF11Id = addChannel("BDF11", 10, 0, -20, 950, 'degC')
BDF12Id = addChannel("BDF12", 10, 0, -20, 950, 'degC')
BDF13Id = addChannel("BDF13", 10, 0, -20, 950, 'degC')
BDF14Id = addChannel("BDF14", 10, 0, -20, 950, 'degC')
BDF15Id = addChannel("BDF15", 10, 0, -20, 950, 'degC')
BDF16Id = addChannel("BDF16", 10, 0, -20, 950, 'degC')
BPF1Id = addChannel("BPF1", 10, 0, -20, 950, 'degC')
BPF2Id = addChannel("BPF2", 10, 0, -20, 950, 'degC')
BPF3Id = addChannel("BPF3", 10, 0, -20, 950, 'degC')
BPF4Id = addChannel("BPF4", 10, 0, -20, 950, 'degC')
BPF5Id = addChannel("BPF5", 10, 0, -20, 950, 'degC')
BPF6Id = addChannel("BPF6", 10, 0, -20, 950, 'degC')
BPF7Id = addChannel("BPF7", 10, 0, -20, 950, 'degC')
BPF8Id = addChannel("BPF8", 10, 0, -20, 950, 'degC')
BPF9Id = addChannel("BPF9", 10, 0, -20, 950, 'degC')
BPF10Id = addChannel("BPF10", 10, 0, -20, 950, 'degC')
BPF11Id = addChannel("BPF11", 10, 0, -20, 950, 'degC')
BPF12Id = addChannel("BPF12", 10, 0, -20, 950, 'degC')
BPF13Id = addChannel("BPF13", 10, 0, -20, 950, 'degC')
BPF14Id = addChannel("BPF14", 10, 0, -20, 950, 'degC')
BPF15Id = addChannel("BPF15", 10, 0, -20, 950, 'degC')
BPF16Id = addChannel("BPF16", 10, 0, -20, 950, 'degC')
CAN_map = {
[1220] = function(data) map_chan(BDF1Id, data, 0, 2, 0.1, -100)
map_chan(BDF2Id, data, 2, 2, 0.1, -100)
map_chan(BDF3Id, data, 4, 2, 0.1, -100)
map_chan(BDF4Id, data, 6, 2, 0.1, -100) end,
[1221] = function(data) map_chan(BDF5Id, data, 0, 2, 0.1, -100)
map_chan(BDF6Id, data, 2, 2, 0.1, -100)
map_chan(BDF7Id, data, 4, 2, 0.1, -100)
map_chan(BDF8Id, data, 6, 2, 0.1, -100) end,
[1222] = function(data) map_chan(BDF9Id, data, 0, 2, 0.1, -100)
map_chan(BDF10Id, data, 2, 2, 0.1, -100)
map_chan(BDF11Id, data, 4, 2, 0.1, -100)
map_chan(BDF12Id, data, 6, 2, 0.1, -100) end,
[1223] = function(data) map_chan(BDF13Id, data, 0, 2, 0.1, -100)
map_chan(BDF14Id, data, 2, 2, 0.1, -100)
map_chan(BDF15Id, data, 4, 2, 0.1, -100)
map_chan(BDF16Id, data, 6, 2, 0.1, -100) end,
[1225] = function(data) map_chan(BPF1Id, data, 0, 2, 0.1, -100)
map_chan(BPF2Id, data, 2, 2, 0.1, -100)
map_chan(BPF3Id, data, 4, 2, 0.1, -100)
map_chan(BPF4Id, data, 6, 2, 0.1, -100) end,
[1226] = function(data) map_chan(BPF5Id, data, 0, 2, 0.1, -100)
map_chan(BPF6Id, data, 2, 2, 0.1, -100)
map_chan(BPF7Id, data, 4, 2, 0.1, -100)
map_chan(BPF8Id, data, 6, 2, 0.1, -100) end,
[1227] = function(data) map_chan(BPF9Id, data, 0, 2, 0.1, -100)
map_chan(BPF10Id, data, 2, 2, 0.1, -100)
map_chan(BPF11Id, data, 4, 2, 0.1, -100)
map_chan(BPF12Id, data, 6, 2, 0.1, -100) end,
[1228] = function(data) map_chan(BPF13Id, data, 0, 2, 0.1, -100)
map_chan(BPF14Id, data, 2, 2, 0.1, -100)
map_chan(BPF15Id, data, 4, 2, 0.1, -100)
map_chan(BPF16Id, data, 6, 2, 0.1, -100) end,
}
function onTick()
processCAN(0)
end
function processCAN(chan)
repeat
local id, e, data = rxCAN(chan)
if id ~= nil then
local map = CAN_map[id]
if map ~= nil then
map(data)
end
end
until id == nil
end
function map_chan_be(cid, data, offset, len, mult, add, filter)
offset = offset + 1
local value = 0
while len > 0 do
value = (value * 256) + data[offset]
offset = offset + 1
len = len - 1
end
local cv = (value * mult) + add
if filter ~= nil then cv = filter(cv) end
setChannel(cid, cv)
end
map_chan = map_chan_be
initCAN(0, 1000000)
Last edited by gizmodo on Tue Jun 06, 2017 10:28 pm, edited 1 time in total.
Great you got it to work!
But, first suggestion, I would just ditch the script and use the built-in CAN mapping capabilities available in the latest 2.11.0 firmware.
https://wiki.autosportlabs.com/CAN_Bus_Integration
Seriously, it should work much better for you and save your Lua script for other custom integrations.
But, first suggestion, I would just ditch the script and use the built-in CAN mapping capabilities available in the latest 2.11.0 firmware.
https://wiki.autosportlabs.com/CAN_Bus_Integration
Seriously, it should work much better for you and save your Lua script for other custom integrations.
I've had no luck getting this to work with the CAN Mapping. Regardless of what I put in for values I get a reading of 0. If I add the lua script back in I can see those values changing, so I must be missing something on the mapping setup. According to the documentation the transfer function is x/10-100.0 where x is the 16 bit channel. It also says Termination: None. Would this matter? I don't think so since it works in lua.
Here is the CAN section from my configuration:
Here is the CAN section from my configuration:
Code: Select all
"canCfg": {
"baud": [
1000000,
500000
],
"en": 1
},
"canChanCfg": {
"chans": [
{
"add": -100.0,
"bigEndian": true,
"bm": false,
"bus": 0,
"div": 10.0,
"filtId": 0,
"id": 1220,
"idMask": 0,
"len": 2,
"max": 950,
"min": -20,
"mult": 1.0,
"nm": "DFBrake1",
"offset": 0,
"prec": 0,
"sr": 10,
"type": 0,
"ut": "C"
},
{
"add": -100.0,
"bigEndian": true,
"bm": false,
"bus": 0,
"div": 10.0,
"filtId": 0,
"id": 1225,
"idMask": 0,
"len": 2,
"max": 950,
"min": -20,
"mult": 1.0,
"nm": "PFBrake1",
"offset": 0,
"prec": 0,
"sr": 10,
"type": 0,
"ut": "DegC"
}
],
"en": 1
},
I made a bit more progress on this. After power cycling the RCP and restarting RaceCapture (I'm using the Windows version, 1.9) I was able to get readings using the setting above. However, when I tried to add more channels, either by editing the settings file and rewriting or adding channels through mapping I would only get value on the first two (in order of creation) CAN channels. For my event I went back to Lua scripting and only used 8 channels from each sensor and that seemed to work okay.
You should be able to use the UI for certain. However, we've received reports that the CAN mapping required a power cycle - which I haven't been able to reproduce yet.
If you can, try adding a few channels and power cycle after writing to RCP and see if that wakes it up.
If it still doesn't work, send me your config and I'll try to simulate the data on my end with a 2nd RCP (I don't have the same sensors as you)
If you can, try adding a few channels and power cycle after writing to RCP and see if that wakes it up.
If it still doesn't work, send me your config and I'll try to simulate the data on my end with a 2nd RCP (I don't have the same sensors as you)