There may be a good reason behind doing this...
Eric, I suspect that the purpose is PLC programming training.
I like the idea! Is that complicated to do within the rungs of this program? I would love to add it if you could give me guidelines Lancie.
First, allocate some memory words to save a record of WHICH alarm bits occurred. Normally an alarm light and horn system functions for many different alarms, each with a PLC input or logic condition. You simply save the NAMES of each alarm bit, either in a String file, or if the alarms are in similar Input addresses, simply use an Integer file to save the bit Input number address of each alarm.
In your case, you appear to only have one alarm bit, so you could not store alarm events without more information about what caused each alarm.
You set up X-number of PLC memory storage locations, say for the last 20 alarms. Each time a new alarm happens, you copy all previous alarms downward in the file, eliminating the oldeset and adding the newest. Then you can display or view or print out the last 20 alarms at any time. Sometimes additional memory locations are added to also save the date and time for each alarm. Many operator interface programs such as Factory Talk View or RSView have built in alarm history file set-ups that work with the PLC to save the alarm history.
Here is the problem description:
For future use, it is best to start off your questions on this site with the exact problem description. Your Post #15 is the FIRST place where you made it clear how the alarm lights are supposed to work. Normally for an alarm, a person like me could and did make certain assumptions about missing data, but in your case, your alarms are not normal or usual, so those assumptions are useless for a non-standard case.