09-17-2019 04:10 PM
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:
It is being called from the 'Wrapper' vi, so I can call on the method while original vi in editing mode:
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:
Even more strange, but, perhaps not relevant at a moment, if I ignore (clear) that error and run the Save.Instrument I get this:
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.
Solved! Go to Solution.
09-17-2019 05:43 PM
Is the called VI part of a library? Somehow TestStand has it reserved, keeping any edit functions from occuring.
09-18-2019 01:33 PM
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.
09-18-2019 02:12 PM
@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.
09-19-2019 07:45 AM - edited 09-19-2019 07:47 AM
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,
09-19-2019 09:30 AM
Come to think about it, it makes perfect sense - 'Edit's are not available at Run-Time:)
Thank you!