04-09-2019 05:15 PM
Hello, I'm having a strange case of my VI connecting to some shared variables, but not to others from the same library. The attached code snippet shows the BD. All SV refnums are sent to the auto-indexing loop, where "Open and Verify Variable Connection" is executed for each SV in turn. A test indicator before the loop shows that all SV refnums are correct. However, the refnum array indicator after the loop only has some of the SV, not all of them (the missing SV names are just empty strings). At the first empty string the Error Out becomes "-1950678943: Open and Verify Variable Connection in States.lvclass: prepareSV.vi". The DSM shows that all SV are deployed. Why would "Open and Verify Variable Connection" complete successfully for some SVs, and not for others? I could not find any difference between them in the DSM. Any suggestions would be greatly appreciated!
04-10-2019 05:07 PM
Hi, could you give more information about the set up you have running in terms of hardware and software?
04-16-2019 09:13 PM
There is no particular hardware -- LabVIEW 14 running on Windows 7. Everything runs and is deployed on the same computer.
04-17-2019 10:13 AM
Have you checked the timeout of the variables?
http://zone.ni.com/reference/en-XX/help/371361P-01/lvcomm/veropenvarcon/
Maybe if you take it out, the shared variables will open when they can. The error is due to a timeout when opening them, so I think it is a good step to try.
04-17-2019 11:17 AM
I did try long timeouts (as long as 10 seconds) without success. I didn't know I can remove timeouts completely, will try that shortly. Thanks for the suggestions.
04-23-2019 04:56 PM
So I did some tests with the timeouts. Removing timeouts completely (i.e. wiring -1) results in the VI running forever, and never progressing past the Open and Verify Connection. Putting short timeouts (less than 45 ms) results in none of the SVs being connected to. Anything over 45 ms gives the same results -- successfully connects to some SV, but not to others from the same library.
04-24-2019 02:26 PM
Hello,
Are there any differences between the shared variables that are connecting and the ones that aren't?
04-24-2019 02:36 PM
That seems to be the $1000 question -- the only difference I see in the DSM is that most (but not all) of the SVs I can't connect to are in alarm as soon as they are deployed. I was planning on researching this. The same set of variables is deployed on another machine (and my VI connects to them fine), so there must be something that cause them to be in alarm and/or not allowing connections, that still escapes me.
04-25-2019 02:20 PM
Have you set any alarms for the Shared Variables or can we see the alarm configurations?
04-25-2019 02:32 PM - edited 04-25-2019 02:34 PM
Hello Niki B, I think that might be at least partially related. Most (but not ALL!) of the SVs I cannot connect to are in alarm -- I'm still trying to understand why. They are all Boolean with initial values set to false. I though that could be the reason, but when I removed "Set Initial Value" and re-deployed them, they're still in alarm, and unreachable. So that seemed to have been a red herring.
Yes, they all have alarming set.