From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What happened to my shared variable DSC alarms?

I would like to programmatically alter the alarm levels of my shared variables using the recommended datasocket write method, but for some reason my alarm levels disappear.  If I open Variable Monitor, sometimes the alarm data isn't there.  I have them configured, and sometimes they are there.  This also means that the Datasocket URL doesn't exist for the alarm levels.  Why is that?
Download All
0 Kudos
Message 1 of 4
(10,977 Views)
Hi Brian,

I am not sure what resource pointed you to using Datasocket Write to change the alarm levels of a shared variable programmatically, but that is not the recommended method.

One resource that you I suggest you check out is the example called Library Generation.lvproj, it is in the example finder under Toolkits and Modules->Datalogging and Supervisory Control->Fundamentals. This shows how to add variables to a library and set the alarms.

For an existing library, please check out this Knowledgebase article, which describes getting a shared variable reference. One you have the reference, you can use the property "Alarming..." to set Hi, Lo, etc. Then, once you're done, redeploy the library programmatically (Deploy Library.VI).

Best regards,

-Sam F, DAQ Marketing Manager
0 Kudos
Message 2 of 4
(10,900 Views)
I'm using property nodes to write the levels now.  That appears to work, but that doesn't explain why alarm attributes sometime disappear in the Varible Monitor.  I have all of the variable properties set correctly from the library.
0 Kudos
Message 3 of 4
(10,891 Views)
Hi Brian,
 
I am glad that you were able to get your application up and running using property nodes. I am also curious as to why your alarm attributes are disappearing from the Variable Monitor; could you post some simple example code that repeatably has this problem? Reproducing this issue on my end will help me to investigate further, and if necessary submit the problem to our R&D team.
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(10,223 Views)