Example Code

LabVIEW DSC Module: OPC Server Security Login Dialog Timeout

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW
  • LabVIEW Datalogging and Supervisory Control Module

Code and Documents

Attachment

Description

Overview

This VI pops up a login prompt that allows a user to log into their domain account configured with DSC Security Tool (Tools » Security » Domain Account Manager). The login screen disappears after a specified Login Timeout.

 

Description

The Main VI ([Main] OPC Server Security Login Dialog.VI) calls the Login Popup.vi configured as a dialog. In the Main VI the user can configure the timeout value for the login popup screen. The Login Popup SubVI is using the "NI Security Programmatic Login" VI from the DSC palette to allow the user to enter their NI Security credentials to log into their account.

The Login Popup SubVI has one while loop with a event structure inside. The event structure monitors the OK and Cancel button. It also checks in the timeout case how much time has been elapsed and displays the user the remaining time. Once the Login Timeout expires the Login Popup exists.

 

For more information on the LabVIEW DSC Module check out this link (https://www.ni.com/en-us/shop/product/labview-datalogging-and-supervisory-control-module.html). 

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • LabVIEW Datalogging and Supervisory Control Module (DSC) 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Open the [Main] ...VI and follow the instructions on the Front Panel

 

Additional Information or References

Login Popup - Front Panel.png

 

Login Popup - Block Diagram.png

 

In order for the login VI to work properly make sure you have a valid username/password configured the Domain Account Manager (Tools » Security » Domain Account Manager)

 
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
David G
Sales Engineer - SE Michigan & N Ohio
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.