Mhrs application

Discuss issues and ideas you have to configuring displays with PowerVision
alb
Posts: 43
Joined: Wed Dec 15, 2010 1:30 pm

Mhrs application

Post by alb » Thu Jan 20, 2011 6:19 pm

I've got a working Machine Hours Meter on my display and I believe it only runs if Engine Speed > 500rpm using conditional transition events and some recurring timers. Increments then stores every 360000ms - 0.1hrs.

I think I'm only verifying the engine's running every 6 minutes too but I'm not worried about 6 minutes gained or lost on this hours meter.

I added a state to reset the hours meter with a button in a hidden menu. "Reset Machine Hours" State in attached picture. This works.

I added another state to sync the machine hours meter to some other data/variable. I want to be able to calibrate the hours meter with another button in a hidden menu. This doesn't work.

Does the Mhrs application have exclusive access to UserDefinedVariable.Mhrs.machineHours ?

Thanks all.
Attachments
Mhrs Attemp1.JPG
Update Machine Hours State Machine
Mhrs Attemp1.JPG (59.75 KiB) Viewed 92 times
dwills
Enovation Controls Development
Enovation Controls Development
Posts: 26
Joined: Fri Jul 30, 2010 8:27 am

Re: Mhrs application

Post by dwills » Mon Jan 24, 2011 10:27 am

The Mhrs application only writes the variable. It keeps an internal copy of the machine hours variable that is initialized from a file at boot time, this copy is then maintained with the increment and store actions. Other users may write the variable, but these writes have no affect on the Mhrs appliaction or the data that it is tracking.

It would be fairly straightforward to duplicate the Mhrs application with scripting. This would allow the flexibility to synchronize the data. The downside to this is that the machine hours file would be lost with a software upgrade.

In scripting, one script could be used to open a file and initialize a user defined variable. A separate script would be created for sync, increment and store. These scripts would be executed from the state machine, just like the Mhrs application.