NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving VIs Current Values as Default when called from TestStand

Solved!
Go to solution

Hello,

While trying to figure out how to Save Current Values as Default of the VI that is being called form the TestStand, I've run into a bit of a problem:

I have a Primary VI, here it is, fairly simple for testing:

SaveCurrentValuesAsDefault.PNG

It is being called from the 'Wrapper' vi, so I can call on the method while original vi in editing mode:WrapperForSCVADdotvi.PNG

When Wrapper called from LabView, it works as expected: loads the 'Primary' vi, waits for it to finish then saves the current values of the controls as default.

When Wrapper called form TestStand, it loads and runs the Primary vi, then when it's Stop button is pressed, the Wrapper disappears, leaving the Primary vi loaded e.g. the window stays open. Apparently the Wrapper crashes on "Default Vals.Make Curr Default" call and leaves me with this message: 

Error.PNG

Even more strange, but, perhaps not relevant at a moment, if I ignore (clear) that error and run the Save.Instrument I get this:

Error2.PNG

Huh? Runs fine when ran from LabView...

Anyway, if anyone knows how to fix it or at least what that all means, I'd greatly appreciate the help.

 

Thank you.

0 Kudos
Message 1 of 6
(2,227 Views)

Is the called VI part of a library?  Somehow TestStand has it reserved, keeping any edit functions from occuring.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(2,193 Views)

Not that I intentionally made it part of the library...

But here is what's going on now: This morning I noticed 'Edit VI' (as well as bunch of others) button in TestStand was grayed out and prompting me I needed to configure LV adapter to use Development System. I could swear I've used that 'Edit VI' yesterday at least a hundred times. So I went to configuration, sure enough, its set to use Run-Time Engine. After I changed it to Development the error went away, everything runs as intended. Tried going back to Run-Time, and the error was back. Does that mean I won't be able to use this technique on the machine that doesn't have development environment?

I wonder if there is a way to manipulate VI, e.g. call invoke method or change property right from the TestStand, so I don't need to use wrapper.

0 Kudos
Message 3 of 6
(2,151 Views)
Solution
Accepted by topic author alemberskiy

@alemberskiy wrote:

Does that mean I won't be able to use this technique on the machine that doesn't have development environment?


That is correct.  You are trying to update a VI.  If you want this to work in a run-time environment, you need to save the values in a configuration, text, XML, JSON, etc type of file and have the VI update its values based on that file when it starts to run.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(2,144 Views)

Hello,

 


Does that mean I won't be able to use this technique on the machine that doesn't have development environment?

Check the LabVIEW help about the properties and method you are using, some of them are not available in Run-Time Engine (without LabVIEW development environment). This is the case for Default Values:Make Current Default and Save:Instrument methods (see in Remarks section).

 

Regards,

0 Kudos
Message 5 of 6
(2,121 Views)

Come to think about it, it makes perfect sense - 'Edit's are not available at Run-Time:)

Thank you!

0 Kudos
Message 6 of 6
(2,096 Views)