05-28-2018
05:57 AM
- last edited on
12-09-2024
01:47 PM
by
Content Cleaner
Hi everyone,
I'm trying to modify the Testand Simple UI in order to make it simpler.
In order to run the sequence file with the Teststand Simple UI I have to first Log in then I have to search for the file in my computer.
And at the End I have to click Test UUTs.
What I want to do is just run the Simple Teststand UI and save some clicks. The Ideal case is to run the UI and start the Test automatically.
I read Working with the TestStand Simple User Interface - LabVIEW and I understand it the following way:
The main Job that LabVIEW here does is to connect the Visible Controls and the Manager Controls, if you click the visible controls they to whatever they have to do, independently from LabVIEW.
LabVIEW waits until you click close/Terminate/or something that finishes the Test, then LabVIEW closes the references and so on.
Is that correct?
I tried to modify the Testand Simple UI in order to not wait for me to open the Sequence and Run it.
I found an Example on the forums that is very simple and I took one part of it.
I did the following changes:
In order to start it
and then to shut it down
But it doesn't run automatically it just loads the file, ready to click Test UUT's.
Is it possible to do what I want to do?
Thank you very much.
Solved! Go to Solution.
05-29-2018 04:09 AM
Hi,
What I would do in your program is to use the DoClick method of TestStand buttons.
For example, create a ref of the Test UUT button and use the DoClick method. It will simulate a click on that button and so execute the sequence
Regards
05-29-2018 06:23 AM
I want to correct myself the code above does Run the sequence file but when it closes it I got warnings at the end related to incorrect closed References.
By the method you told me apparently I don't get any errors but it only works if I disable the Login from Teststand.
The problem is that the code does "click" on the button, but it does it so fast, that it does it before I can click the OK in the Login Window.
Do you know if there's any way to disable the Login function programmatically or any way to log in programmatically?
Thanks
05-29-2018 06:33 AM
Almost all the action available in TestStand can be done with the API.
To disable the login, set Engine.StationOptions.EnableUserPrivilegeChecking to false
Regards
05-29-2018 10:01 AM - edited 05-29-2018 10:13 AM
Thanks that works pretty good, it ignores the login input. Do you know if there's some method to avoid showing the Login Window?
05-29-2018 10:11 AM
Sorry, I don't understand your question. The login window is not displayed with the property Engine.StationOptions.EnableUserPrivilegeChecking to false
I looked at your code, you should close the references after you use it
Regards
05-29-2018 10:47 AM
Thanks for your answer.
Are you sure? Because I did what you said and the Login Window keeps poppin up.
It does ignore when I Login and starts the process independently but the window is still there.
@Laurent_B
I looked at your code, you should close the references after you use it
Which references do you mean exactly?
I'm not sure but I think the StationOptions reference is closed when I close the Teststand Engine reference.
Or do you mean the Button reference ?
Do you know if it's correct to close a reference, the way I did with the Teststand Engine reference?
05-29-2018 10:59 AM
Ok
You may try Engine.StationOptions.LoginOnStart or Engine.StationOptions.RequireUserLogin
You must close all references that you opened dynamically, that mean with a method. So in your code, you should at least close the Station.Options ref
Regards
05-30-2018 03:13 AM
It worked thanks a lot!