NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

simple OI with create new user

Solved!
Go to solution

I follow the "createdeleteuser.seq" and add it to the tool menu via "custom" action

it said that when I build a deploy, this menu item will be in the user interface,

however, I use the "simple OI" and it does not have a menu bar, how do I have createdeleteuser

in the "simple OI"?

0 Kudos
Message 1 of 13
(4,900 Views)
Solution
Accepted by topic author trout00

Hi trout00,

 

You have two options. I would suggest option one for a clean and professional appearance.

1. Follow the implementation of the LabVIEW Menu in the Full-Featured UI example. The Full Feature UI implements a menu bar similar to the bar in the TestStand Sequence Editor.

2. Create a normal LabVIEW button on the OI, and implement the Event Case below for when the button is pressed. I placed the Event Case on the Simple OI - Top-Level VI.

 

Hope this helps trout00.

 

 

Message Edited by Nestor_G on 11-26-2008 04:41 PM
Nestor
0 Kudos
Message 2 of 13
(4,880 Views)

Thank Nestor,

I will try this method next week.

regards

0 Kudos
Message 3 of 13
(4,858 Views)

Hi Nestor,

I went ahead and tried to place the OK button on the Simple OI - Top-Level VI.vi.

It went well, click the button and the Adddeleteuser sequence is working.

 

So, even in the Simple OI, there is no menu, but the menu is there, it just is not displayed, is this correct?

 

In your picture/graphic, why do we need to feed an empty/blank to"editArgParam"?

 

How do I ghost/gray out the button if the log in user is not Administrator or developer?

 

Thank you for your good advice

0 Kudos
Message 4 of 13
(4,821 Views)

Hi trout00,

 

Below I created an example to ghost/gray the button based on user privileges. Essentially, I created a User Event to handle the UserChanged event posted by the Application Manager. In the User Event, I then check the user's privilege and update the button accordingly. By using event handling, I will not poll and consume precious CPU cycles.

 

Steps:

  • User Changed Event (user event) is created in Step 2
  • To detect a login/logout, I use the UserChanged event callback posted by Application Manager. Please see Simple OI - Configure Event Callbacks.vi
  • In the UserChaged callback, I then fire the User Changed Event to update the button appearance. Please see UserChanged Event Callback [UserChangedCallback.vi].

 

Unfortunately the TestStand API does not have a method to easily get a user's group. However, please read the get group name of currently logged in user forum post for a workaround.

 

Note that the Simple OI does not have the code to create the menu. However, you can implement the code necessary to display the menu. This is what developers did to show the menu in the Full-Featured UI. Nevertheless, the capabilities do exist.

 

The GetRunTimeToolMenuItems editArgsParam is optional and hence does not require an input. However, the same parameter for InvokeItem is required and hence requires an input. It's empty because there is no concern of an active/selected UI item.

 

Hope this example helps trout00

Message Edited by Nestor_G on 12-03-2008 06:44 PM
Nestor
0 Kudos
Message 5 of 13
(4,783 Views)

Thank you Nestor,

 

I found that the user manager has the capability to prevent non admin level from add/delete user.

 

Now, after I add the button and the block diagram, when I create the deployment package, what do I add to my project file?

 

   testexec.uir

   testexec.exe  (the current one) I believe that the current one will not have the new added " OK button"

 

or do I need to compile the newly created simple OI. vi  into an executable file and then include it to the project file?

 

if yes, then is there any instruction for recompile simple OI?

 

0 Kudos
Message 6 of 13
(4,753 Views)

Hi trout00,

 

Yes, you will need to recompile TestExec to include the changes in the code. Assuming you are using LabWindows/CVI because of the uir file, please open CVI and select File >> Open >> Workspace to load TestExec.cws; this will load the entire simple OI project. Then select Configuration >> Release. Then Build >> Create Release Executable to create the new exe.

 

For testing and debugging you may choose to create a debuggable executable. However, for efficiency and speed, please create a release executable when ready to deploy. Please reference the CVI help for any details.

Nestor
0 Kudos
Message 7 of 13
(4,724 Views)

Nestor

 

Hm, I use LabVIEW 8.61f.  so I just compile to exe,  do I need to include any additional file besides simple OI-level.vi?

what about the top level.vi?

0 Kudos
Message 8 of 13
(4,722 Views)

Hi trout00,

 

The Simple OI shipped with TestStand already has the necessary structure to easily update and compile the code to a new executable. That said, simply open the LabVIEW project, Build Script.lvproj, and compile. The project will load the Simple OI - Top-Level VI.vi and all the dependencies found in TestExec.llb.

 

The attached picture shows that you may simply right-click on the executable to recreate TestExec.exe.

 

Message Edited by Nestor_G on 12-09-2008 11:08 PM
Nestor
Message 9 of 13
(4,696 Views)

Nestor,

Thank you I had the button added and compiled the testexec with the new button in LabVIEW 8.6.1 and TestSTAND 4.1

In my development system, things went well.

Builtd the complete deploy project

 

Installed on a different pc.

 

The new user added/deleted button is there, the complete teststand system ran good under "evaluation 7 days".

 

We have the license in hand, just do a fast "evaluation 7 days" to try out.

 

We met two snags in the deployed pc, worked fine in the development system.

1) the text report with the message

    "Unable to load the XML report.  At line 438 end tag 'reports' does not match the start tag report."

    well in my developmetn system, I selected text report, no fancy HTML or XML stuff, so I don't know why there is XML report

    I also chose the disable database.

 

2) When I click the added button to Add/delete user, the program jumped right out to NI MAX.

     what is going on?

 

trout00

0 Kudos
Message 10 of 13
(4,685 Views)