This example uses a wheel based distance counter to calculate distance traveled. The sensor transmits a CAN message containing distance traveled in units of 1/10th of a meter and rolls over at 50meters.
An Activity Program is used to calculate the distance traveled and account for the rollover from 50 to 0 meters. It is assumed that distance will only be calculated when the vehicle is in Drive.
A separate Activity Program is used to manage when the odometer value should be stored in FLASH memory. Since FLASH memory writes consume a lot of resources and has a finite number of writes before a memory cell is no longer useable we want to minimize the number of writes to FLASH. There are several methods demonstrated in this example that can be employed in your application.
- On Ignition Off Event
- When vehicle goes from moving to stopped condition
- When vehicle is placed in Park mode
- Ona slow 10 second timer active only when vehicle is moving
Any number of these can be implemented in your application.
Download the example created in 2.9.23044 for a PV780B
If you use CANCapture here is a workspace that sends dynamic wheel distance data
Comments
0 comments
Please sign in to leave a comment.