NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add a button to the Toolbar of TestStand from C#

I want to add an 'OnLine/OffLine' button to the toolbar of TestStand.

 

In my sequence I am using instances of custom step types, some C# code is executed while running the sequence. The 'OnLine' button should be green if everything runs as expected. If an error occurs in de C# code modules, the 'OnLine' button should be red. So, the color of the button has to be set from C# code. When clicked on the 'OnLine' button, the status should be toggled, switching between 'OnLine' (Green) and 'OffLine'(Red).

If the button is clicked, some C# code should be executed to reinitialize some devices.

Is this possible?

 

Best regards

 

0 Kudos
Message 1 of 3
(3,159 Views)

Hi

 

in TestStand you can customize the toolbar but you can only add or remove existing toolbar buttons.

You can't create your own. So I think you better put the read/green button on a GUI made in C# (or Labview, CVI,...)

and let it run in parallel with your sequence.

Regards
DianaS
0 Kudos
Message 2 of 3
(3,150 Views)

Hi

 

it is also possible to drag your custom menu item to the toolbar (only if you click customize toolbar before)

But for your application you still better use a GUI from a code module.

Because otherwise you had to change the icon (green/red) with TestStand API and thats not possible I think.

Regards
DianaS
0 Kudos
Message 3 of 3
(3,146 Views)