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.
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.
07-22-2020 03:52 AM
Hello,
in my Teststandmodel i am using SeqFileload and SeqFileUnload
SeqFileload -> external SequenceCall INIT.seq
SeqFileUNload -> external SequenceCall CLOSE.seq
In the INIT.seq is a labview-vi that opens a session to an instrument an retruns a session-id which is saved in a labview global variable.
In the CLOSE.seq is a labview-vi that uses this labview global variable as input to close the session to the instrument.
What now happens is that when executing is that the labview global is somehow set to 0 which is an invalid session.
BUT when moving the labview-vi from the external sequence direct into the SeqeunFileUload-seqeunce of the model then it is working.
Question is: Why is the global set to 0? Is there somewhere an option to "unload/clear all labview variables" when unloading teststand?
Thanks for help
10-27-2020 04:43 AM
Why aren't you trying to use FGVs in LV rather than Global Variable?
10-27-2020 06:27 AM
When you unload a sequence, you are removing all of its called code from memory, including the global variable. Now when your external sequence is ran, it will reload the global variable. When this happens, the global will have the default value. A simple solution might be to simply store the value in TestStand and pass it to the external sequence when it is called.
@Gevor wrote:
Why aren't you trying to use FGVs in LV rather than Global Variable?
Global Variables work just fine. FGVs are not a cure-all replacement unless you are protecting critical sections of code. That does not apply to this situation.
10-27-2020 06:53 AM
zur Info - das ist die Antwort vom NI-Support:
#######
nach meiner Meinung fällt das von Ihnen beobachtete Verhalten unter unerwartetes Verhalten von Teststand
- Wird das Modell im laufenden Userinterface geschlossen, dann funktioniert der SequenceFileUnload Callback wie erwartet.
- Wir das Modell durch schließen der UI geschlossen, dann werden nur die default Werte zurückgeliefert.
Ich habe dies an unsere Entwickler weitergegeben. Als Workaround würde ich weiterhin die Daten über Teststand Globals weitergeben.
Der ich an dieser Stelle nichts weiteres für Sie tun kann werde ich das Ticket im Anschluss an diese Email schließen.
#########