Designed to modify the login process of your operator interface only, this example does not affect the login behavior of the sequence editor. This example demonstrates one method of how to login all users of your operator interface with Operator privileges by creating a new User object based on the existing Operator profile. Then, the example uses the User object to login to the TestStand operator interface.By default, the login and logout process is executed in the LoginLogout sequence in the <TestStand>\Components\NI\Callbacks\FrontEnd\FrontEndCallbacks.seq file. This document shows you how to modify your FrontEndCallbacks.seq file to achieve an automatic login process. Attached is a modified FrontEndCallback.seq file which describes the changes necessary.When you use the operator interface, you may find it useful to automatically login users with certain privileges. One method of achieving this is to modify the <TestStand>\Components\Users\Callbacks\FrontEnd\FrontEndCallbacks.seq file. If you do not have this file in your Users directory, copy the file from the <TestStand>\Components\NI\CallBacks\FrontEnd\ directory to the Users directory. National Instruments recommends that you only modify sequence files that you have copied to the <TestStand>\Components\Users\ directory.
After opening <TestStand>\Components\Users\Callbacks\FrontEnd\FrontEndCallbacks.seq, you will see two default steps, Login and Logout, in the LoginLogout sequence. Add the precondition, RunState.IsEditor, to the Login step.This precondition determines whether the LoginLogout sequence is executed within the operator interface or the sequence editor. This ensures that the Login step is executed in the sequence editor only. When you add a new precondition to the Login step, TestStand prompts you to select Insert AllOf or Insert AnyOf because the Login step contains an existing precondition. Insert AllOf or Insert AnyOf determines whether to logically AND or OR the existing precondition with the new precondition. Select Insert AllOf. Your final precondition should now resemble Figure 1.Note The Logout step must be executed in the sequence editor and your operator interface. The Logout step is executed when you shut down the operator interface and sequence editor.
Follow the steps below to create a UserProfile step.
Follow the steps below to create the Create New User step.
The final step peforms the login using the newly created User object. Follow the steps below to create the Login Operator step.
Once you have created a User object using the Create New User step, you can use additional steps to modify properties of the User object before you login. For example, you could set the name of the User object to "Default User".You may want to make use of one other additional modification. When set to True, the Parameters.isInitialLogin property in the LoginLogout sequence tells you if you are logging in for the first time. If you use this property as a precondition for certain steps, you can restrict the automatic login of your operator interface to the first login of the application. In this manner, a user with more priveleges could login by selecting File»Login after the application has launched.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.