I am trying to implement a running average function using ladder logic in an AB PLC5. I have a digital input that pulses. Every minute I need to get the last five minute average pulse count (i.e. total count over last five minutes / 5). Can this type of thing be done easily with ladder logic or should this type of calculation be performed outside of the PLC? I'm updating a system that previously used a desktop computer with an i/o card that ran a c program to do this calculation. I'm upgrading the system with the PLC and I'd like to avoid doing any external manupulation of the data if possible. Anyone have any ideas? I'm new to PLC programming... hope this all makes sense. Thanks.