11-08-2008 03:55 AM
I am using Shared Variable to log data and for alarms, if i acknowledge the Shared Varible in the Alarms and Events Window, It is changing the state to be acknowledged, but i want to update the Shared Variable Value as this variable i will use to start the process if user had acknowledged the value.
11-10-2008 09:56 PM
Hello M_Atif,
Thank you for contacting National Instruments! After reading your post I am a little bit confused exactly what you are trying to accomplish. Can you try to explain in a little more detail exactly how you want to configure your shared variables? If you have any screenshots or example code that will also help me assist you in troubleshooting. Please post your reply here and I will be happy to help you. I look forward to hearing from you! Have a great day!
11-11-2008 12:17 AM
Sir, I want to reset my shared varaible value on the user acknowledgement. In this attached project, i have one START button if i press it will raise the alarm (Alarm value to True), and showing the Alarm in the alarm window, and i am expecting that if i acknowledge this alarm in the alarm window it should reset the value for the the shared variable.
No i this example i have added another control (Acknowledge). So now i want to remove this ack button and reset my value based on the acknowledgement in the alarm windows.
Thanks.
11-13-2008 09:05 AM - edited 11-13-2008 09:06 AM
Hi,
I think you may have a misunderstanding of the nature of alarms. Normally, customers do not create a variable to be an alarm. Rather, alarms are defined on real data. So rather then make some sort of logic to set a boolean variable to true when some double (or whatever) value goes above or below a value in order to throw an alarm, you can simply configure an alarm on your data variable in order to throw an alarm at some condition. This eliminates the need for you to create the logic you are currently working on. This will also explain why acknowledging the alarm does not change the data value (if the data were real, perhaps gathered from a DAQ board, this would corrupt your values.) Instead, we allow you to acknowledge the alarm, which changes its status, but until the variable moves back into a safe range, the notification will remain.
With this said, I don't understand your application completely and can't speculate on your architecture decisions. And there may be times you would want to check if an alarm has been acknowledged. So we provide a function in the DSC pallet which will provide you with the status of your alarms. From this, you can find weather they are acknowledged or not, and then reset the value of the variable. The function is "Alarm Status.vi"
You might try inserting this into your loop and modifying your logic based upon its outputs.