We have a PLC5/20 with a local rack of 120VAC I/O's and a RIO connection to a PV. Once in a while, if we power down the PLC to do maintenance work, the program would get erased when we power it back up. There's a line filter in front of the PLC power supply. This happens randomly and once we re-download the program, everything is ok again. Before I change out the power supply and the rack, is there something else I may be missing? Could the IO module be the cause as well? And yes, the battery is ok.