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.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to release FGV Instrument

Solved!
Go to solution

Hi!

I have a funtional gloabal varaible (FGV) (in LabVIEW which i call from teststand) which has a strict type def enum with read, write and close. The initilizes is handeld by a unitzilized boolean shift register cheching if the vi has initilized.

My problem however is the closing part. I dont want to depend on that the trouble shooting enginer dont place a skip on the clean  up section since that is often used to prevent loosing power (power of is normaly placed in the clean up) when running multiple steps. I want it to  us a "dispose"  (C#) or destructor (C++) counterpart in LabVIEW. How is this done?

If some one can post a VI which display a hi dialog when teststand is closed and when all modules are unloaded I would be so extreamluy happy since i can use that for closing down the FGV.

 

  

0 Kudos
Message 1 of 6
(4,393 Views)

Hello,

 

I am Ed from National Instruments Applications Engineering. I am happy to assist you with your query in regards to using TestStand and LabVIEW in this manner.

 

Given the problem description, could you just clarify for me that:

 

You are using Teststand with a LabVIEW VI which you call in a sequence step.

 

This VI is a state machine, using a shift register to act as a FGV and retain settings and properties between TestStand step sequence calls.

 

Currently you have a step sequence whereby close is one action, however you would like rather than this being a step sequence, a property selection whereby the operator cannot avoid performing the close action through methods such as skip step if the FGV has been initialised and ran at least once, is this correct?

 

From what I can ascertain, you could setup in the step settings for the step making the call to the VI, under Properties and Post Actions, you could select that on a pass and/or fail, a sequence is called, within which you can make the call to the close action of the FGV.

 

Would this provide the functionality you are looking for and is an acceptable implementation to your application?

 

I hope that this is helpful and you are successful in your application.

 

Best regards,

 

Ed

0 Kudos
Message 2 of 6
(4,354 Views)

Hi,

Thank you for your effort.

 

You kind of understand my problem, but that is not sufficient (since i will be closing to often which cast test time which cost money). I don't want to close (since opening and closing takes time) unless the VI is unloaded (either by unload command (File -> Unload all components) or the sequence is closed down  or some other event which unload the VI). In text base programming language I want to have a singleton which have a "dispose"  (C#) or destructor (C++).

 

I have investigated using callbacks but have not found any way to register a callback for unloading the VI which I find kind of strange. This seams like a normal thing to do, at least from a text based programming background.

 

Once again thank you for your time.

0 Kudos
Message 3 of 6
(4,348 Views)

Hello,

 

Thank you for the further description, I believe I may have found what you need which if I could first clarify:

 

You would like to Unload the VI before TestStand is closed, programmatically through a format similar to File -> Unload all Modules? I have found a previous case whereby it was explained that Unload all Modules clears the memory of VI's, DLL's and so far. Meaning that an FGV would be cleared from memory and essentially start over as "Unitialised".

 

I believe this article linked below should provide the method you require:

 

http://digital.ni.com/public.nsf/allkb/B4FD0FA9B31DB1148625712B0006C0FB?OpenDocument

 

Is this towards what you are looking for?

 

Best regards,

 

Ed

0 Kudos
Message 4 of 6
(4,315 Views)
Solution
Accepted by JohanHoltby

Hi,

Sorry, you did missunderstand, but thankyou  for your efort. I have however had a suport case at NI in parralell whith this and they did realise it's not posible to do what i want to do with the curent state of LabVIEW.

 

If you are intrested in what i ment see http://www.tutorialspoint.com/cplusplus/cpp_constructor_destructor.htm or more specific the ~Line(void) function.

 

However since it's not posible we can leave it. Is there a way to close a topic?

 

If not let's see this as a close.

0 Kudos
Message 5 of 6
(4,301 Views)

Hello,

 

Ah Okay, sorry that it was a little difficult for me to grasp what it is you were asking for. I do understand constructors and destructors, in fact I've been programming in text-based languages alot longer than that of graphical. That being said TestStand is quite difficult to compare to that of text-based languages.

 

It's great that you decided to call us, it is definitely alot easier to communicate ideas via voice and telephone than text and forum, that being said, we do appreciate when our customers use the forum as this allows the community to assist which is a much larger resource, usually with decades of experience.

 

While a solution was not found you can select your previous post to be the solution as it does answer the question which will close this forum page.

 

Best regards,

 

Ed

0 Kudos
Message 6 of 6
(4,296 Views)