06-27-2020 03:09 AM
I have searched builtin help and online but can't find an examle how to write a shared variable (SVE) in LabView NXG 5.0. I would really appreciate if someone can provide a pointer how to do it. I know how to do it in LabView but not NXG.
Solved! Go to Solution.
06-27-2020 12:32 PM - edited 06-27-2020 12:33 PM
You've seen this help topic, then? You should probably be using tags, anyway. At least according to the help file.
06-27-2020 09:21 PM
Yes, I have re-read that so many times but I couldn't figure out how to use it. I was hoping to see an example.
06-27-2020 10:35 PM
It's pretty straightforward. But then again, I have used NXG long enough to anticipate what they are trying to do, so maybe that's why it seems straightforward to me. What is it that you are having trouble with?
06-28-2020 10:11 PM
I am not able to write to shared variable. I am translating what I have been doing using LabVIEW (the old one).
For example, in the LabView you create a project library to hold the shared variable. I don't know how to do this in NXG.
This is what I have tried so far, not working. Note I am using PSP Variable - I am not sure if I should use PSP Variable Engine. I am totally lost here.
06-28-2020 10:23 PM
I am using the link below as my reference for using Shared Variable Engine
http://www.ni.com/tutorial/3742/en/
06-28-2020 11:09 PM
You might try adding ni.var.psp: in front of the URL. I did a quick test with the snippet below and it works as expected.
I did have to create the shared variable and process manually using Distributed System Manager. I don't think NXG offers a way to create and deploy shared variables directly.
07-01-2020 02:19 AM
Thanks @MichaelBlazer! It worked.
Note: For some reason it was not working initially. After I deleted the variable in NI Distributed Manager and then re-created the same variable name, it worked.