2/11/2020 2:50 PM | |
Joined: 4/7/2016 Last visit: 7/3/2024 Posts: 172 Rating:
|
It is not possible for me to be certain what you are looking for Matthew, but I think I might understand what it is you are driving at. The problem is that the subject is not that simple. Actually, I am not sure that there is such a thing as a definitive ‘best case’ way of doing it. On this, as with anything else, there will be different opinions and philosophies. And the problem with me offering you any of the code I use is that the way I have alarms working may not be exactly what you want. But I can make a couple of points about the technique that I use. If nothing else, it might generate some discussion that will be helpful for you. So the key point about the technique I use is that I word handle the alarms. I don’t handle them as individual bits. The reason for that is that, if you have a significant number of alarms and you handle them all individually, you can finish up with some horrendously long program blocks full of essentially the same code repeated for each alarm. I have seen many programs that have exactly that. So I have a function that takes a 16 bit word value and handles the detection, acknowledging, and resetting of individual alarms using masking. Obviously, each detection bit must be coded individually, and depending on how acknowledging works for you, there might be the need to have some access to the individual acknowledgement bits. I’m thinking that a few screenshots might be the best way to convey what I am talking about. You can, of course, organise your words functionally – so a word of device fault alarms, a word of analogue value out-of-limits alarms, that sort of thing. As you will see, my organisation is by the actual equipment – using the S88 standard concepts of unit modules and equipment modules – if that means anything to you. AttachmentAlarm Handling Screenshots.docx (581 Downloads) |
Follow us on