RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Customized CAN mirror (CAN1 -> CAN2)
Author Message
Reply with quote
Post Customized CAN mirror (CAN1 -> CAN2) 
I have an RCP that's going to be hooked into a system with a Haltech ECU, Haltech WBO2 and AiM dashboard. Unfortunately, the dashboard is an older MXL unit which has a "locked" firmware with fixed expectations for Haltech CAN messages (among other shortcomings).

Since I am only using the dashboard for display, and some of the field names can be customized, I am contemplating feeding the dashboard from RCP CAN2 and having the RCP log everything coming into CAN1. For any signal that needs to be "modified" to be displayed on the dashboard (for example, rolling several statuses off the Haltech and other vehicle conditions into a general MIL/CEL)

Judging from the Lua Scripting Guide it appears that you can both read and transmit on either CAN channel independently. So, I would think that you could do something like the following without a problem:

Code:

function onTick()
  readECUCanStuff()
  writeECUCanStuff()
end


Right?

View user's profile Send private message Visit poster's website
Reply with quote
Post  
Yup, that'll totally work. No conflicts on reading and writing to/from the same CAN channel, or bridging one to the other, etc.

Keep us posted on the project!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Bringing up a really old thread:

The LUA scripting area is only capable of a 30Hz onTick. If I was using txCAN() to send mirrored data, it sounds like the best I could do is send it at 30Hz?

In other words:

Code:

setTickRate(30)
function onTick()
  txCAN(1, 864, 0, {00,00})
end


I would only be sending this message 30 times per second?

View user's profile Send private message Visit poster's website
Reply with quote
Post  
Hi, you can actually run the Lua script onTick() at up to 1000Hz; we've recently fixed the documentation. However, this will be limited to how fast the script actually runs - if the script is doing a lot inside the tick handler, it may run slower than the set rate.

Hope this helps!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum