Page 1 of 1
MBE Canbus Setup
Posted: Sat Feb 27, 2016 1:29 pm
by fitdes
Hi all,
I've been setting up CAN logging on my RCP mk2 for my MBE 975 and I'm getting good success.
One thing I've noticed is that when I turn on the ECU without interfacing with the ECU software, CAN messages are not transmitted from the ECU. After I interface with the ECU software CAN messages are transmitted and continue to be transmitted even when I disconnect the ECU software interface until I power down the ECU.
Do I need to send a message to the ECU from RCP to initialize transmission from the ECU. I guess this is what the ECU software interface is doing.
What are your thoughts?
I will submit a script and write up on interfacing with the MBE ECU when I have completed the debugging
regards,
FitDes
Posted: Mon Mar 07, 2016 7:00 pm
by CarpeForza
Please update us on this forum. I will be going through the same setup on my MBE 992 (Radical SR3). If I figure anything out, I'll post it on here.
Posted: Sun Mar 13, 2016 11:03 pm
by Ali
Based on what Race Technology says, you need to activate the outbound information using the ECU software.
https://www.race-technology.com/wiki/in ... lInterface
Posted: Thu May 05, 2016 10:11 am
by fitdes
The MBE interface to the ECU is Can based. It sends Can messages and the the ecu starts responding and sending out Can messages that Racecapture can then read. It continues even when the MBE interface is disconnected.
Further issues with number of channels
Posted: Sun May 15, 2016 3:30 pm
by fitdes
Some progress being made but have run into an issue where the Canbus results flicker/jbberish when I configure MBE to output more than in CANID of data. My AIM dash noes not have this issue. Data coming off the bus looks like this.
814.0, 3.0, 129.0, 129.0, 200.0, 200.0, 10.0, 0.0, 30.0,
814.0, 2.0, 40.0, 0.0, 20.0, 255.0, 61.0, 0.0, 0.0,
814.0, 1.0, 97.0, 136.0, 2.0, 34.0, 24.0, 179.0, 81.0,
Also I did a log when I connect the ecu interface. Log below.
213782785.0, 3.0, 4.0, 0.0, 13.0, 247.0, 191.0, 255.0, 254.0,
213778705.0, 16.0, 13.0, 228.0, 0.0, 13.0, 35.0, 57.0, 55.0,
213778705.0, 33.0, 53.0, 103.0, 99.0, 57.0, 57.0, 48.0, 0.0,
814.0, 1.0, 109.0, 0.0, 0.0, 42.0, 48.0, 150.0, 84.0,
814.0, 4.0, 110.0, 78.0, 176.0, 101.0, 110.0, 5.0, 0.0,
814.0, 3.0, 129.0, 129.0, 158.0, 158.0, 18.0, 0.0, 115.0,
814.0, 2.0, 40.0, 0.0, 20.0, 255.0, 156.0, 0.0, 0.0,
Think the secret to initializing Can broadcast by the MBE ecu for both Racecapture and my AIM dash are in getting Racecapture to broadcast the messages for ID213782785
MBE Canbus Gains and Offsets
Posted: Sun May 15, 2016 8:21 pm
by fitdes
After a bit of searching through the Microsoft Access based database for AIM Mxl software I believe I've managed to isolate the gains and offsets required to convert the Canbus stream into something useable
Posted: Sun May 15, 2016 8:38 pm
by fitdes
Is the raw stream on Canbus from MBE different?
The address ID does not increment but the first bit becomes the offset.
How can I script to ensure Racecapture can read this properly
Address ID is in RED
Offset is in Blue
814.0, 3.0, 129.0, 129.0, 200.0, 200.0, 10.0, 0.0, 30.0,
814.0, 2.0, 40.0, 0.0, 20.0, 255.0, 61.0, 0.0, 0.0,
814.0, 1.0, 97.0, 136.0, 2.0, 34.0, 24.0, 179.0, 81.0,
Posted: Mon May 16, 2016 10:27 am
by fitdes
Had a chat with a friend in work who has said that MBE is using a multiplex. The first code after the address refers to the offset. Looks like I will have to set up an if statement to seperate the data
Mux Script
Posted: Mon May 16, 2016 8:45 pm
by fitdes
Tried the script below to try deal with the Multiplex problem but with no luck. Any help would be gratefully accepted!
--This example configured for MBE 992CAN mapping
--how frequently we poll for CAN messages
tickRate = 30
--the CAN baud rate
CAN_baud = 500000
--CAN channel to listen on. 0=first CAN channel, 1=second
CAN_chan = 0
--add your virtual channels here
--format addChannel(<name>, <sample rate>, <precision>, <min>, <max>, [units])
muxId = addChannel("Mux", 10, 0, -30, 130, "C")
coolantId = addChannel("tCoolant", 10, 0, -30, 130, "C")
rpmId = addChannel("RPM", 10, 0, 0, 20000)
rpm2Id = addChannel("RPM2", 10, 0, 0, 20000)
tpsvId = addChannel("vTPS", 10, 2, 0, 5)
tpsId = addChannel("rTPS", 10, 2, 0, 16, "#")
batId = addChannel("vBatt", 10, 1, 0, 20, "#")
airtId = addChannel("tAir", 10, 0, -30, 130,"C")
gearId = addChannel("Gear", 10, 0, 0, 6,"#")
oilpId = addChannel("pOil", 10, 1, -30, 130,"C")
oiltId = addChannel("tOil", 10, 0, 0, 8,"bar")
ignId = addChannel("iOut", 10, 1, -20, 60,"deg")
injId = addChannel("zInjection", 10, 0, 0, 720,"deg")
lamId = addChannel("lMeasured", 10, 3, 0, 2,"#")
manId = addChannel("pManifold", 10, 1, 0, 300,"kPaA")
lamsId = addChannel("lSetpoint", 10, 3, 0, 2,"#")
lauId = addChannel("Launch", 10, 3, 0, 2,"#")
----------------------------------------
--customize here for CAN channel mapping
--format is:
--[CAN Id] = function(data) map_chan(<chan_id>, <data>, <CAN offset>, <CAN length>, <multiplier>, <adder>, [filter])
----------------------------------------
CAN_map = {
[814] = function(data)
if map_chan(muxId, data, 0, 1, 1, 0) == 1 then
map_chan(coolantId, data, 1, 1, 0.62745, -30)
map_chan(rpmId, data, 2, 2, 1, 0)
map_chan(tpsvId, data, 4, 1, 0.019608, 0)
map_chan(tpsId, data, 5, 1 , 1, 1)
map_chan(batId, data, 6, 1, 0.078, 0)
map_chan(airtId, data, 7, 1, 0.62745, -30)
elseif map_chan(muxId, data, 0, 1, 1, 0) == 2 then
map_chan(oilpId, data, 2, 1, 1, 0)
map_chan(oiltId, data, 3, 1, 0.62745, -30)
map_chan(mapsId, data, 4, 1, 1, 0)
end
end
}
function onTick()
processCAN(CAN_chan)
end
--===========do not edit below===========
function processCAN(chan)
local msg = 0
repeat
local id, e, data = rxCAN(chan, 0)
if id ~= nil then
local map = CAN_map[id]
if map ~= nil then
map(data)
end
end
msg = msg + 1
until id == nil or msg > 100
end
--Map CAN channel, little endian format
function map_chan(cid, data, offset, len, mult, add, filter)
if offset + len > #data then return end
offset = offset + 1
local value = 0
local shift = 1
while len > 0 do
value = value + (data[offset] * shift)
shift = shift * 256
offset = offset + 1
len = len - 1
end
local cv = value * mult + add
if filter ~= nil then cv = filter(cv) end
setChannel(cid, cv)
end
initCAN(CAN_chan, CAN_baud)
setTickRate(tickRate)
Posted: Mon May 16, 2016 9:20 pm
by fitdes
Thought this might work. Still no luck. No idea now
processCAN(chan)
local msg = 0
repeat
local id, e, data = rxCAN(chan, 0)
if data[0] == 1 then
if id ~= nil then
local map = CAN_map1[id]
if map ~= nil then
map(data)
end
end
end
if data[0] == 2 then
if id ~= nil then
local map = CAN_map2[id]
if map ~= nil then
map(data)
end
end
end
msg = msg + 1
until id == nil or msg > 100
end
Latest update on my MBE 992
Posted: Tue Jun 14, 2016 3:34 pm
by CarpeForza
I have been going through this for the last week and I think I'm getting close. I'm not sure if my car setup makes any difference, but the 992 ECU has a 998 ECU piggybacked for gearchange and wheelspeed, and I also have the 995 mini-dash that works off the CAN BUS.
The steps are similar to yours above:
1) Setup the MBE 992 Output for data collections with Easimap 6, using the documentation from AIM sports
2) Use the RCP Mk2 as a CAN Sniffer to see any CAN messages
3) With my setup, the 995 mini-dash uses the CAN BUS to cycle through 7 different screens: Gear, Oil Temp, Oil Press, Fuel Press, RPM, Water Temp, and Battery Voltage. When I run the CAN sniffer, I happen to also get 7 different CAN ID's. The values run from 0 to 66,600. At this point, I can't figure out which is which.
4) Tonight, I'll run my engine a while and go through a cycle while logging the data. Hopefully the data will make sense on which CAN ID equals which parameter I see on the dash. Then it's a matter of using the gain and offset to get something that makes sense.
Posted: Sun Oct 09, 2016 8:01 pm
by brentp
So, is the multiplex ID a form of a "sub ID" that is paired up with the main CAN ID?
Posted: Mon Oct 10, 2016 6:34 pm
by fitdes
Yes, effectively the ID is generated by the first address "814.0" and the offset being the second entry "1". The ecu output will then cycle through up to 8 different rows of information on the 1 CAN address with a total of up to 56 channels of data.
Posted: Mon Oct 10, 2016 7:10 pm
by brentp
Understood. In that case you would need to customize the script to switch the mapping between sub IDs for a given CAN ID - so altering the logic in our existing script template. It is definitely possible with the right amount of work!