Odometer with PV450
- taylorsscott
- Posts: 7
- Joined: Sat Aug 20, 2011 11:54 am
Odometer with PV450
I have a customer requirement for a odometer yet I do not have SPN 1032 Total ECU Distance nor SPN 245 Total Vehicle Distance available. Has anyone came across this and created a way to calculate total distance based off other CAN parameters to display on a PV450?
- ksaenz
- Enovation Controls Development
- Posts: 263
- Joined: Thu Aug 19, 2010 7:53 am
Re: Odometer with PV450
Hello taylorscott,
Here is a configuration that calculates Total Vehicle Distance from "J1939.Engine.Wheel Based Vehicle Speed".
The variable "UserDefinedVariable.Distance.Total" holds the value.
It is calculated by executing this calculation event every second:
The variable is saved to non-volatile memory ever 60 seconds.
"J1939.Engine.Wheel Based Vehicle Speed" has an event in fire on change that causes the transition to the loop that executes the calculation event every second. This is to make sure that "J1939.Engine.Wheel Based Vehicle Speed" is valid because if it is invalid, the result of the calculation event will also be invalid.
Regards,
ksaenz
Here is a configuration that calculates Total Vehicle Distance from "J1939.Engine.Wheel Based Vehicle Speed".
The variable "UserDefinedVariable.Distance.Total" holds the value.
It is calculated by executing this calculation event every second:
Code: Select all
"UserDefinedVariable.Distance.Total" + ( ( "J1939.Engine.Wheel Based Vehicle Speed" / 60 ) / 60 )
"J1939.Engine.Wheel Based Vehicle Speed" has an event in fire on change that causes the transition to the loop that executes the calculation event every second. This is to make sure that "J1939.Engine.Wheel Based Vehicle Speed" is valid because if it is invalid, the result of the calculation event will also be invalid.
Regards,
ksaenz
- Attachments
-
- Accumulated and Average.db3
- (3.02 MiB) Downloaded 35 times
- taylorsscott
- Posts: 7
- Joined: Sat Aug 20, 2011 11:54 am
Re: Odometer with PV450
I am trying to implement the code you provided into my Configuration, but I am running into errors on state "Initialize Distance and Speed" and also "Calculate Distance and Speed."
Can you please help resolve these errors?
Regards
S. Scott Taylor
Can you please help resolve these errors?
Regards
S. Scott Taylor
- Attachments
-
- Error msg to Murphy.docx
- (108.07 KiB) Downloaded 17 times
- ksaenz
- Enovation Controls Development
- Posts: 263
- Joined: Thu Aug 19, 2010 7:53 am
Re: Odometer with PV450
I think the problem was a partial download:
viewtopic.php?f=7&t=117
When I downloaded the file it was smaller than the 3.02 MB so tried again and the second time it downloaded the full file and I was able to create the configuration without errors.
Regards,
ksaenz
viewtopic.php?f=7&t=117
When I downloaded the file it was smaller than the 3.02 MB so tried again and the second time it downloaded the full file and I was able to create the configuration without errors.
Regards,
ksaenz