I have seen custom solutions and to tell you the truth it is much easier to implement a downtime monitoring system from a data side. In other words use something like factorysql or some other database software that already has the downtime functionality built in. All you usally have to do is define a digital input to signal when the event is occuring. The software takes care of duration and start/end time and puts it into the database of your choice. The way that I have done it in the plc is to generate a structure (record for the downtime event) and create a ring buffer of a predefined size. When an event runs it course the start time, duration, and event code can be recorded (could use end time but I have found most operation people are interested in duration and not start and end time). Duration is easier to store than a serial date/time field (especially if it is ASCII). If you have the time it can be a good excercise in data handling and buffering. If you want the easy way, go buy a software package that does the work. Best of luck.
Craig
QUOTE (Duffanator @ Oct 20 2009, 12:02 PM)

Hey all,
I am trying to make a downtime tracking system with a A2SH PLC (that's what's already there) and I was wondering if anyone had a better way of doing this:
I want to be able to store a maximum number of about 30 events that would have a time stamp and error code associated with it (like line stopped due to e-stop being pressed or something like that) and it would record this data into a slot and the next time an event occured it would go to the next empty slot. I will also be pulling that info out periodicly with Citect so I will have to tell Citect what slots are "full" and then tell the PLC that those slots have been "emptied" by Citect reading out the data.
I can do this will long rungs of code with a bunch of M contacts that represent each "slot" but that would be huge, does anyone have another idea of how to do this that would be a little less tedious or use less steps in the program? The program in the PLC is a little over 2K steps and the maximum size is 14K (I think) so I have the room but I'd like to keep it as simple as possible. Thanks in advance for the ideas!
