Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Broken Hour Meter
Message
From
01/12/1998 05:02:33
 
 
To
30/11/1998 21:47:04
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00162599
Message ID:
00162692
Views:
32
>>>I have an application that schedules Preventive Maintenance for equipment. Most of the equipment uses an hour meter. I log in the hour meter reading into a table and use that along with the last time the PM was done to schedule the PM's. From time to time a meter will break and the Maintenance person will replace it. We don't have a way to "run up" the new meter so it starts at 0. Now the problem is how to add in the last good meter reading to the file each time a new meter reading is taken. Does any one have any thoughts on this? Should I have a file with the broken meter reading and add that to any readings taken some how???
>>>
>>>
>>>Thanks
>>
>>How are you identifying the meter in the table?
>>A "meter history" table with a key of "location" or some such ID and I suggest a "meterid", "startdate" and "startreading" field be set up. Then when you do your PM calcs you use the details in this file to modfiy the calculations when readings cross over a change of meter barrier.
>>
>>HTH
>
>Hi David,
>
>The meter reading is identifyed by the AssetId field. All tables that relate to equipment use the AssetId field as the relation. I have a seperate meter reading table that has the AssetId and date and the meter reading for each time the meters are read.
>
>Are you saying that I could have a seperate field for meter adjustments in the equipment table and that I add or subtract (as needed) the value in the meter adjustment field??? Sounds good to me as I think about it. So if the meter adjustment field is 0 (ie. the meter has never been replaced) the calculations do nothing... If there is a value there then if I need total hours I add that value to the current reading... What do you think?
>
>Thanks

That sounds fine - as long as you allow for more than one "breakage" some how if necessary.
My point was essentially that when things get complex like this, as they always do in real life, a simple table structure rarely copes - a separate date/time-based table for the meters themselves will give you a basis for doing more accurate calculations, and give you a history of your meters.
Regards
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform