You can use the alarms() function to gather alarms based on a dateRange.readAll(equip or point).alarms(today) ---> this will return all of the alarms generated by programs that are running on equipment or point.If you want to simply return the number or count of those alarms you can append .size().readAll(equip or point).alarms(today).size() ---> this will return a number.To clear all alarms for today use. Recommended to restart service after.finDeleteAlarms(today)
If you want to change the alarms based on equipment types, you can simply change the filter from equip to equip and chillerPlant or whatever the appropriate filter is for the equipment.