Modbus reading events and alarms

Hey i have a panel(rs232) and i want to save alarms and events on my pico, if power is off the list of alarms and events is still when the power comes back so its some permanent data where it can be stored?, what modbus function might get me that data?