PV780
PowerVision 2.7.10475
I am monitoring the RPM of the engine via a J1939 message and assumed that change of validity would cause the "Fire on change" event to be raised but this doesn't seem to be happening. Do change events get raised on the changing of validity?
Thanks,
Andy
Fire on change and validity change
- andymartyn
- Posts: 25
- Joined: Wed Oct 29, 2014 4:51 am
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Fire on change and validity change
Hello Andy,
You are correct, if a parameter is not being received and the variable goes invalid, the On Change event will not be fired.
We have to use the IsValid() function in the calculation event or if you are using a script, you can check the return of the smRead() to determine if a parameter variable is valid.
You are correct, if a parameter is not being received and the variable goes invalid, the On Change event will not be fired.
We have to use the IsValid() function in the calculation event or if you are using a script, you can check the return of the smRead() to determine if a parameter variable is valid.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- andymartyn
- Posts: 25
- Joined: Wed Oct 29, 2014 4:51 am
Re: Fire on change and validity change
That's unfortunate, I assumed a change in validity was classified as a change and thus, I expected it would trigger. Also, the in validity then changes the value to 0, which is a change and not triggered so this behaviour isn't what I expected
I was a bit cooncerned that too many timers would impact performance but without reegular testing as their is no change event in these circumstances a calculation event won't help so it appears having a periodic timer is the only approach?
I was a bit cooncerned that too many timers would impact performance but without reegular testing as their is no change event in these circumstances a calculation event won't help so it appears having a periodic timer is the only approach?
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Fire on change and validity change
Hello Andy,
I have made the same assumpution you have, that going valid/invalid would be a change. I too, had to go back and put in a validity check on the parameter variables that I needed to monitor. I have been assured that timers are not that costly, it is what we do with the timer event that will impact the performance.
Sometimes, I have been able to fire the validity check as an action on an existing recurring timer. There are several different approaches you can use now that you know how it works.
I have made the same assumpution you have, that going valid/invalid would be a change. I too, had to go back and put in a validity check on the parameter variables that I needed to monitor. I have been assured that timers are not that costly, it is what we do with the timer event that will impact the performance.

Sometimes, I have been able to fire the validity check as an action on an existing recurring timer. There are several different approaches you can use now that you know how it works.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls