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