Search found 18 matches

by fitdes
Wed May 23, 2018 7:32 pm
Forum: CAN mapping discussion
Topic: AEM Infinity Decoding Bit Word
Replies: 1
Views: 5062

AEM Infinity Decoding Bit Word

Hi all,

I'm trying to decode Can byte 7 where every bit represents a digital state. Could you please help me with this. Believe its bit mode but I can't get a handle on it.[/img]
by fitdes
Wed Apr 26, 2017 8:27 pm
Forum: Lua Scripting
Topic: Big endian txCAN
Replies: 13
Views: 11706

Made some more progress on splitting Longitude into individual bytes by using code above. This data is to be transmitted to my AEM Infinity ECU. I think my issue is I don't know how to create the conversion to 32 bit float with degree referencing. Please see extract from AEMnet pdf. Anyone got any i...
by fitdes
Wed Apr 26, 2017 8:21 pm
Forum: Lua Scripting
Topic: Big endian txCAN
Replies: 13
Views: 11706

initCAN(0, 500000) tickRate = 1000 function onTick() function splitWord16(value) return bit.band(value, 0xFF), bit.rshift(bit.band(value, 0xFF),8) end function splitWord32(value) return bit.band(value, 0xFF), bit.rshift(bit.band(value, 0xFFFF),8), bit.rshift(bit.band(value, 0xFFFFFF),16), bit.rshift...
by fitdes
Sun Jan 15, 2017 4:54 pm
Forum: Lua Scripting
Topic: Big endian txCAN
Replies: 13
Views: 11706

Hi MikeD,

thanks for the help. I gave the code a shot but using printl within Racecapture to verify if the code was splitting Latitude into 8 bit segments but no luck. I'm not sure if Lua allows for cascaded commands
by fitdes
Tue Jan 10, 2017 8:58 pm
Forum: Lua Scripting
Topic: Big endian txCAN
Replies: 13
Views: 11706

Hi all,

was wondering if anyone has an idea how to split a 32bit message into 8 bit sections for Can transmission.

Regards and thanks,

Des
by fitdes
Mon Dec 26, 2016 2:08 pm
Forum: Lua Scripting
Topic: Big endian txCAN
Replies: 13
Views: 11706

The script below is verified to send Racecapture Pro2 Canbus data to an AEM Infinity 506 to simulate an AEM Vehicle Dynamics Module. The only channels that are not transmitted are: latitude (unsure how to send a 32 bit message) longitude (again unsure how to send a 32 bit message) GPSTrueCouse (don'...
by fitdes
Sun Dec 25, 2016 12:22 pm
Forum: Lua Scripting
Topic: Big endian txCAN
Replies: 13
Views: 11706

Excellent thank you Brent, I'm trying to emulate AEM's vehicle dynamics module using the RCP. So far my code looks like this but I'm still unsure of how I would create a 32bit message using bitwise. See attachment for description of message. initCAN(0, 500000) tickRate = 10 function onTick() lat,lon...
by fitdes
Sat Dec 24, 2016 4:29 pm
Forum: Lua Scripting
Topic: Big endian txCAN
Replies: 13
Views: 11706

Big endian txCAN

Hi all, How do you send CAN messages that are more than 8 bit long in Big endian format? I am trying to send can message to my AEM Infinity ECU and can send 8 bit messages but I'm struggling with 16bit. I want to do this to allow for AEM native logging which allows me to create math channels in AEM ...
by fitdes
Mon Oct 10, 2016 6:34 pm
Forum: Lua Scripting
Topic: MBE Canbus Setup
Replies: 13
Views: 10428

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.
by fitdes
Mon May 16, 2016 9:20 pm
Forum: Lua Scripting
Topic: MBE Canbus Setup
Replies: 13
Views: 10428

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...
by fitdes
Mon May 16, 2016 8:45 pm
Forum: Lua Scripting
Topic: MBE Canbus Setup
Replies: 13
Views: 10428

Mux Script

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 CA...
by fitdes
Mon May 16, 2016 10:27 am
Forum: Lua Scripting
Topic: MBE Canbus Setup
Replies: 13
Views: 10428

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
by fitdes
Sun May 15, 2016 8:38 pm
Forum: Lua Scripting
Topic: MBE Canbus Setup
Replies: 13
Views: 10428

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, ...
by fitdes
Sun May 15, 2016 8:21 pm
Forum: Lua Scripting
Topic: MBE Canbus Setup
Replies: 13
Views: 10428

MBE Canbus Gains and Offsets

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
by fitdes
Sun May 15, 2016 3:30 pm
Forum: Lua Scripting
Topic: MBE Canbus Setup
Replies: 13
Views: 10428

Further issues with number of channels

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,...