Hello,
I am writing some small drivers to control a Real 30 Thermal Chamber. I ran into the following issue, and I was wondering what I might be missing. So I have the enclosed For Loop with a case statement inside. The idea being that I can initialize the TCP address and Remote port as shown, and then later I can send any additional commands (via additional cases) to the chamber via "Real 30 Chamber Control". (Via the reference in the shift register) This is when things got a bit strange.
I can run this vi one time to "Init", and that works fine. Then I run the program again, for any of the other states, and I get an Error 1. It appears that the next time I run the program, it has lost it's reference in the shift register somehow.
Just to prove this to myself, I took the whole vi, created a test program where I used three instances of the same .vi, and set the first one to "init", then one of the other cases, and then "close" case. (All instances were connected via the error line). This worked without errors through many attempts.
I had thought that the contents of a shift register are supposed to survive a .vi shutdown, as long as Labview itself is still running? If that is not the problem, does it have something to do with losing the reference to the TCP init function after a program stop? I hope I have described this problem ok. This .vi will be used as a call in a Teststand sequence, so it will work fine as it is, I was just curious why I was getting this unexpected result when I ran the .vi multiple times by itself. Thanks....