
CAN message gain
- Peter
- Posts: 320
- Joined: Fri Dec 14, 2018 9:07 pm
- Location: North West Lancs, UK
- Been thanked: 9 times
CAN message gain
HI Forum. Is it possible to set a divider in the gain area when mapping a CAN message ? I am transmitting 'Turns' to use for odometer but would like to divide the Turns value by 422 so Turns increments by 1 every 1/10th mile. Fingers crossed its possible
Thanks. Peter

- EV_Builder
- Posts: 1205
- Joined: Tue Apr 28, 2020 3:50 pm
- Location: The Netherlands
- Has thanked: 18 times
- Been thanked: 37 times
- Contact:
Re: CAN message gain
Cant the receiving party do that? makes perhaps more sense because they know the ratio?
If i understand correctly what you want you also would need something like a counter so when you have sended the message you reset to zero and next time you send the delta, not?
If i understand correctly what you want you also would need something like a counter so when you have sended the message you reset to zero and next time you send the delta, not?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Re: CAN message gain
Couldn't you use (1/422) as the gain? i.e. use a gain of 0.0023697 (that's 1/422) as the gain?Peter wrote: ↑Sun Jul 11, 2021 10:41 am HI Forum. Is it possible to set a divider in the gain area when mapping a CAN message ? I am transmitting 'Turns' to use for odometer but would like to divide the Turns value by 422 so Turns increments by 1 every 1/10th mile. Fingers crossed its possibleThanks. Peter
- Peter
- Posts: 320
- Joined: Fri Dec 14, 2018 9:07 pm
- Location: North West Lancs, UK
- Been thanked: 9 times
Re: CAN message gain
Thanks for the ideas. I can indeed divide the CAN by 422 in software but was trying to reduce the loop time on my Arduino.