NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

add button to TS Top Level VI

I would like to add a button to the TestStand (v3.5) operator interface Full OI-TopLevelVI.  What we want to do is have this toggle (off/on) indicate whether we're in a special debug mode or not.  I want to do two things
(1) grey out the button if the user is not of sufficient priviledge, (2) read value of button when Executing==True, (3) Set a Sequence File parameter/local variable to value of switch, (4) pass value of this parameter/local down to called VIs.
 
Any guidance as to (1) where (in Full OI-TopLevelVI.vi) it would be best to add such code, (2) what properties/methods would I need to make this happen?
0 Kudos
Message 1 of 6
(3,832 Views)
Hi,

You might want to take a look at this example:
Simple LabVIEW Operator Interface Without Menus,
http://sine.ni.com/devzone/cda/epd/p/id/2399

This may give you a good place to start when adding buttons to your OI.
Kristen
National Instruments
0 Kudos
Message 2 of 6
(3,810 Views)
I'm not really sure what I'm looking for in the example provided.  However, from studying the behavior of the Sequence View (of the TS3.5 code) at login, it seems that the type of behavior I'm looking for is already happening with the Test UUTs and Single Pass buttons based on the priveledge of the person logged in.  Basically, if you're not an operator, you'll see both buttons and they'll both be active.  As an operator, however, the Single Pass is greyed out.  Where ever that logic is located, that is where I need to add the logic for my new button.  I'll start looking in the code, but if you can direct me, I'd appreciate it.  Thanks.
0 Kudos
Message 3 of 6
(3,798 Views)
I couldn't find whee the TopLevel VI greys out the SinglePass button (right after loading a sequence) based on the user bering an "Operator".  Can someone provide assistance?
0 Kudos
Message 4 of 6
(3,777 Views)
The dimming of that button is controlled by its connection to the SequenceFileViewMgr. If I remember correctly, this connection is established in Full UI -  Configure SequenceFileView Manager.vi.
 
There is no visible code for this dimming logic, because the connection handles that automatically. However, you can piggyback of the connection logic for that button by handling the ConnectionActivity event. When the connection modifies the button, it fires this event. In your event handler you can check if the button is dimmed and dim any related buttons accordingly.
 
0 Kudos
Message 5 of 6
(3,756 Views)

Hi

There is an option in one of the User Priviledges relating to the Single Pass. The Operator user has this set to False and therefore can only select and run Test UUTs entry point.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 6 of 6
(3,732 Views)