If you add 6 rungs at the top of your "Main Timer Routine", and make them like the attached file, then I think you can successfully reset the horn buttons when a new HMI button is pressed. To do it, you have to create a new set of proxy relays (LAST_ON_SOUND_x) that are set ON by a one-shot immediately as each new button is pressed. Then use these proxy relays to reset all horn buttons EXCEPT the last one pressed.
If this does not reset your OLD HMI TOGGLE (or Alternating) buttons each time a NEW HMI button is pressed, then it is because the HMI is writing a "1" to the buttons on each scan of the PLC. If that is the case, then you cannot reset the HMI buttons from the PLC (without using a special HMI Button Reset bit that some HMIs have for this purpose). If you had a true Momentary-Contact button, then this would not be a problem.
If this does not reset your OLD HMI TOGGLE (or Alternating) buttons each time a NEW HMI button is pressed, then it is because the HMI is writing a "1" to the buttons on each scan of the PLC. If that is the case, then you cannot reset the HMI buttons from the PLC (without using a special HMI Button Reset bit that some HMIs have for this purpose). If you had a true Momentary-Contact button, then this would not be a problem.
Last edited: