04-11-2020 10:39 AM
Hello,
I am trying to use Alarms and Events feature of DSC module. So, I have seen the given examples in the NI example finder. So, that gave me a basic overview of how alarms and events show info for a shared variable or Tag. But still am clear about using these features.
Queries -
1. If I see DSC palette, Alarms and Events functions give similar outputs means the same Alarms data cluster. (Attached Screenshot.) So, how these events and Alarms function differ? I am new to using the DSC module. Reading LV context help confuse me somewhat.
2. Suppose, in my system, there are 100 Shared Variables which are linked to some PLC controllers I/O say..4-5 devices are connected. So, I have enabled Alarming functionality for each shared variable (HI_HI, LO, Badstatus etc) in shared variable settings. Now, I want to monitor alarms and events for each shared variable and I want this functionality in a parallel running thread...so that user will be notified instantly on GUI. So, any idea about designing this architecture wise? I have my own thoughts like
1. Create a separate thread running parallel, Register User events for each shared variable (But using DSC alarms and Event functions), and Some other Main loop will listen to these User events, So if any alarm or event occurred, then it will be notified to user on GUI. How about that?
04-11-2020 11:40 AM
Alarms are a special type of event which represents an abnormal condition, while events in general represent just a meaningful piece of information.
Read:
https://zone.ni.com/reference/en-XX/help/371618K-01/lvdscconcepts/alarms_and_events/
For how to monitor for alarms, I'd be inclined to go with a separate loop reading the alarms and/or events. But I think you'd be able to register for user events as well. Pick which one you feel most comfortable with and implement it looking at just a few of the variables. If it seems to work okay, then expand it to the rest.