NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Full operator interface user privileges vs Custom UI

Hi all,

I am creating a custom UI with LabVIEW (started with simple OI) and ran into a situation where I need to have user privileges set. I have them set correctly in the teststand user section and they work fine there but in my custom UI they do not work properly. I read several pages about using them and checking the engine but dont know how to get it working properly. I then tried the full OI and it works perfectly there as well. I then started digging in the code and I cannot figure how they got it to work. Can someone please enlighten me on how to use user privileges in a new custom UI so that I can properly set the right click menus and single pass buttons.

 

Also another weird thing is on my UI the sequence file view does not show the setup and cleanup steps but in the full featured OI it does.

 

Thanks for the help.




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 1 of 14
(682 Views)

Please see this post about the User Manager. 

 

Try various settings until you get the behavior you want.

0 Kudos
Message 2 of 14
(664 Views)

That post you linked was absolutely zero help. As explained in my post the settings in the user manager are correct. What i dont know is WHY when I create a custom UI the user privileges are ignored, and WHY when I use the simple OI or the full featured OI they work. I believe to have everything connected the same as these OI's but I am obviously missing something. 




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 14
(637 Views)

Just trying to help.

Are you using a custom User.ini location or global; most setups use global.

eejallen_0-1725637952154.png

 

 

Are you using the Global environment?

Please review your source code; verify that your UI is loading an environment.

 

C# example loading an environment during Main(string[] args):

 

//if using a custom environment set environmentPath to full filepath/name of the .tsenv file
var environmentPath = string.Empty;
var engineInitializationSettings = new EngineInitializationSettingsClass();
// when environmentPath is an empty string TestStand engine will load the GLOBAL environment
engineInitializationSettings.SetEnvironmentPath(environmentPath);

 

0 Kudos
Message 4 of 14
(626 Views)

Global. The custom UI is a modified version of the basic UI with UIMessages that ships with test stand. I don’t see a way in any of the examples that ship with test stand to load the environment as you stated. UI is done LabVIEW. 




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 14
(611 Views)

Are you using the LabView UI example from "C:\Users\Public\Documents\National Instruments\TestStand nnnn (nn-bit)\Examples\Modifying User Interfaces\Creating a Basic User Interface"?

 

When running the UI, the first thing it should do is prompt you to login. Are you able to login with the Basic example?

 

I can't run/compile the basic example as I don't have Labview.  However, I ran the LabView UI from "C:\Users\Public\Documents\National Instruments\TestStand 2019 (32-bit)\UserInterfaces\Simple\LabVIEW"

I get a user login prompt, and I was able to run a demo sequence.  You might want to compare the Basic example and the Simple example source files with your project to see what is different.

 

 

0 Kudos
Message 6 of 14
(602 Views)

Also, look at your AxApplicationMgr object.  Make sure you set the LoginOnStart property node to true.

 

On the C# Basic Example, I set the property to false and then ran the UI.  I was unable to run or open a sequence and the UI has no menu to be able to login.

0 Kudos
Message 7 of 14
(600 Views)

Also another weird thing is on my UI the sequence file view does not show the setup and cleanup steps but in the full featured OI it does.

 


The AxSequenceFileViewMgr property node StepGroupMode needs to be set to StepGroupMode_AllGroups

0 Kudos
Message 8 of 14
(592 Views)

Thank you. That did it. 




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 9 of 14
(586 Views)

Yes I get the login screen with all the users. 




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 10 of 14
(579 Views)