05-12-2020 02:44 PM
Hello,
I'm unable to automatize the configuration of a step "Action" in a TestStand, with the API in Labview.
I create automaticaly ma sequence with LabView, and add some steps, as Action step.
I 'm able to set the VI path.
But I can't set inputs !
I have an answer on an older post of this forum :
Where the solution is :
But in my case , there is no " LoadPrototype" method.
If I look TestStand, I have to click on "Reload VI Prototype" to set Inputs Variables.
So, How to programmaticaly do "Reload VI prototype", and / or why is there no LoadProtype method in my Method node, as you can see :
Than you ,
Solved! Go to Solution.
05-12-2020 03:24 PM
If you open up TestStand Help and search LoadPrototype you should see what you are looking for. In the newer versions of TestStand instead of having LabVIEWModule.LoadPrototype, as well as CommonCModule.LoadPrototype, SequenceCallModule.LoadParameters, etc... they consolidated it into one call, Module.LoadPrototype. That's what you should be calling instead I imagine.
05-13-2020 01:22 AM
Hello,
thank you for your answer.
I think you're right. I found too this way.
But now 'have a new problem I can't resolve now: Version Issue
I have LabVIEW 2016 32bits, and TestStand 64 bits.
And, the TestStand Engine is not able to run 32bits VI with the API.
( I can run VI with TestStand application, but not "reload VI prototype", with the API).
When I use the module's Load prototype method, LabView give me the error -18001.
As soon as possible, I install TestStand 32 bit on my computer, and I assume it will resolve my problem.
Thank you again !
05-14-2020 04:22 AM
Hello,
my problem is still here 😞
At the moment I'm on a computer wich have Labview 2017 32bit and TestStand 2017 32 bit too.
When my VI is launched I have the error : -2147467262 "Variant into data" as you can see in the next image :
I have absolutely no idea of the reason of new problem ( I had not those on the other computer). I do my convertion with an "object" TSAdp.LabVIEWModule ( see next image)
If you want, you can take a look on the vi I join ( I saved it for Labview 2010).
Thank you by advance for your help.
05-14-2020 03:28 PM - edited 05-14-2020 03:28 PM
Hi,
In your original code, an empty string was passed for the adapterKeyNameVal parameter.
Text from TS's help for NewStep states that if an empty string is passed for the parameter and if the step type does not designate an adapter, the Engine will use the Adapter that is currently configured. Also, the Action Step type does not designate an adapter
TS's help for NewStep -
adapterKeyNameVal As String
[In] Specifies the key name of the module Adapter object to use to create the step. Pass an empty string to use the adapter the step type designates or, if the step has no designated adapter, to use the adapter the Engine.DefaultAdapter property specifies.
So, if your adapter is configured as LV when the code is executed, you will not get an error, but will get an error for all the other adapters.
The fix is to pass the LV adapter key name for parameter. I used the TS API Strings Constants.vi from the TS's palette.
Regards,
Anand Jain
National Instruments
05-18-2020 03:21 PM
Thank you à lot ! It was the solution !
At the moment, i have no more issue.