From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing Teststand Operator Interface in .NET

 
As part of the Operator interface customization, I would like to customize login screen as shown in the figure.
 
 
 
I have gone through the operator interface csharp source code, the login screen and its functionalities are taken from the COM dll.
 
 
In the above UI
Login functionalities can be as it is  in the  teststand.
I will handle the Execution mode   functionalities
 
Need of above UI:
 
1. Apart from the Teststand previllages we have to modes
Automated mode
Engineering mode
plz ignore(manufacturing mode)
 Automated mode:
whenever the user login in automated mode the operator interface should automatically load a sequence which is specified by the user and start executing the sequence.
finaly the user only see the results he is not allowed do anything other than the above specified.
so he just login, locate the seq and see the results. thats all.
Engineering mode :
he can debug, and execute the sequence in operator interface
 
I want to provide a switch mode options in operator interface. To implement that i have to customize login screen as well as enable/disable of debug menu options.
 
How do i  customize login screen as above shown UI and debug menu options as per my requirement???
 
 
Thanks in advance
sri
 
 
 
 
 
 
0 Kudos
Message 1 of 4
(3,530 Views)
Sri,

The image did not link correctly to the forum page.  It is usually easier to add image files as an attachment.

However, I think I get can get you started.  The Login and Logout is handled by a sequence call from the TestStand Engine.  Specifically, the FrontEndCallbacks.seq and its supporting C files are found in the <TestStand>\Componenets\NI\Callbacks\FrontEnd\ directory.  The C files are dependent upon the CVI Run Time Engine, which is freely distributed.  You are free to modify or replace the current Login/Logout structure.  It may be easiest for you to implement your own Login form, however I would take a look at the source files in the FrontEnd directory in order to understand the functionality.

The Login code activates a User from the Engine user list.  Users represent a TestStand user with a name, login information, and priviledges.  The priviledges allow the administrator to restrict or allow certain activities within TestStand.  Priviledges include debugging sequences, executing sequences, or editing sequences.  These priviledges can be set programatically, but the current user must have administrative priviledges in order to change User information.  For your case, when the user logs in as Automated mode, you could programmatically set the privledges to only allow execution.  For Engineering mode, the privledges can be reset to allow debugging and execution.  For more information on User management, check Chapter 7 of the TestStand Reference Manual.

If I am correct, the last part of your project is to programmatically load and execute a Sequence File.  The easiest way to open a Sequence File automatically is to use the Open Sequence File command.  Commands are analogous to functors in OO programming.  They are objects that represent an action to be handled by the OI manager controls.  The Manager controls automatically have several commands that perform common tasks such as Opening a Sequence File or Executing a Sequence File.  The Manager Controls have a method called GetCommand, which returns the reference to a command object.  Once the command object is acquired, you can call the Execute method to perform the command action.  The TestStand UI Help lists all the available Commands for the TestStand OI.  They are listed in an enumeration under CommandKinds.  CommandKind_OpenSequenceFile will open a dialog that allows the user to select a Sequence File.  The selected Sequence File is then automatically loaded into the SequenceFileViewMgr control.  You can use the CommandKind_RunEntryPoint to execute a Sequence from a given Process Model entry point.  The RunEntryPoint command expects an index into an Entry Point of the current Process Model.  If Single Pass is the first execution Entry Point of the Process Model, then the index is 0.

Let me know if you have any questions.

Thanks,

Tyler Tigue
NI
Message 2 of 4
(3,501 Views)
Thanks Tyler,
 
So Your telling like we can modify the login window. but it is in C. I am going to customize this operator interface in Csharp .NET. How can i modify the login screen in csharp. also i want provide two options in the login screen to choose which mode the user wants to login. (see the attachment).
 
also clarify me , If the operator interface doesn't support touch screen displays right? so i need to develop windows applications similar to operator interface but adapted to touch screen. in this case can is use the components used by operatorinterface(like ActiveX controlls,report viewer,File manager etc.,) in my windows forms??
 
also I have one major doubt
 
say for eg. i use the seq editor to create sequence files in a particular PC(say server). then i use operator interface to open the sequence(from server) and execute those created sequences in client PC. since the dlls related sequnece are in the server will it execute in client PC??
if not , Suppose  i put all dlls in client (in the same path as in the server ) will it execute??
 
TIA
Sri
 
 
 
 
 
0 Kudos
Message 3 of 4
(3,479 Views)
Sri,

You do not have to use the C login/logout code that is provided.  You can replace that code with your own .NET form, which looks like it will be easier in this situation.  The actual login/logout interaction with the TestStand Engine occurs through the ActiveX API, which you can implement within C# .NET.  In your case however, I would suggest taking a look at the C login.h and login.c in order to understand all that occurs for logging in and out.

I'm not quite sure how your touchscreen is implemented.  As long as Windows is registering the touch as mouse activity, or the touchscreen is sending Windows UI/Control messages, then the ActiveX forms should react fine to it.  If the touchscreen is implemented in an alternative way, then there may be issues.  That being said, you certainly can use the ActiveX controls provided from the TestStand UI libraries.  Take a look at the Simple OI and Full OI implemented in C# .NET to get started.

If you are running sequences on a client machine, then any DLL code modules should be on the client machine as well.  Any TestStand DLLs will automatically be on that machine because in order to implement a remote sequence execution, you must have at least the Base Deployment version of TestStand installed.  Chapter 5 of the Reference Manual discusses remote execution of sequences (starting on page 5-14).

Regards,

Tyler Tigue
NI
0 Kudos
Message 4 of 4
(3,445 Views)