The NI VeriStand Asynchronous Messaging User Interface (NIVS AMUI for short) example program demonstrates mechanisms that facilitate rapid LabVIEW User Interfaces (UI) development to get and set NI VeriStand channel data.
Combined with other functionality in the Execution API, you can build an efficient LabVIEW-centric user interface to channels in the NI VeriStand engine much quicker than if developing with the Execution API directly. This functionality is commonly used to augment or replace the Workspace with native LabVIEW front panels in NI VeriStand systems. The NIVS AMUI originated with customer UI requirements, and has evolved over months of feedback and use. The NIVS AMUI has three primary goals.
Consider the workflow in this graphic.
In this workflow, the operator logs in and selects which system to deploy from a launch pad. The operator needn't know what a system definition is, or that NI VeriStand is running in the background. The launch pad deploys the appropriate system definition to the execution target and starts the corresponding LabVIEW UI on the execution host.
The LabVIEW UI is used in lieu of, or in tandem to, the NI VeriStand Workspace. The UI consists of various data types, such as floating point indicators for analog input channels and Boolean controls for digital output channels. It also consists of various control images, such as tanks and hoppers to indicate process volumes and valves to indicate flow control. The UI communicates channel values, alarm conditions, physical states, and other aspects of the deployed system to the operator. The LabVIEW block diagram supplements the UI with code to launch pop-ups and dialogs, lock out certain controls, etc.
The operator can quit the UI and return to the launch pad. The process is repeated. This is a simple example.
Note: NIVS AMUI leverages advanced LabVIEW tools including XControls and LabVIEW Object Oriented Programming. If you use the NIVS AMUI example program without understanding the basics of XControls and LVOOP, you will likely not have a pleasant or supportable experience. While it's not necessary to completely understand these tools to make use of NIVS AMUI, you must understand them well to debug or extend NIVS AMUI.
The NIVS AMUI is divided into four main parts.
Now we'll discuss the basic operation of the NIVS AMUI.
Updating the Data Repository
Note: The Workspace manager maintains a lossless connection with the engine's Communication Receive Loop. This is a low priority loop. Updates to the channel in the engine are only guaranteed when the entire NI VeriStand engine is running on-time.
Updating the XControls
|Shutdown||When the Common Process detects that all NIVS AMUI XControls have left memory, it cleans up references and shuts itself down.|
To use the NIVS AMUI example program, first install AMC for LabVIEW 2010. Start NI VeriStand and open the Sinewave Delay.nivsproj. Assuming the shipping example has not been changed, run the NI VeriStand project. Extract the attached ZIP file to your computer and open the NIVS AMUI.lvproj. Open Basic Demo.vi. You should see a pop-up that a required operation is being performed.
In LabVIEW's application group in the taskbar, you should see two VIs: Basic Demo.vi and NIVS AMUI Common Process.vi. The Common Process is running and should not be stopped because it is the interface between NI VeriStand and the NIVS AMUI XControls. Run Basic Demo.vi. You'll see the value of the two numeric controls change as the Sinewave Delay system updates the value of the Alarm Count user channel. If you place Basic Demo next to NI VeriStand's Workspace, you'll see all three Alarm Count indicators (two in LabVIEW and one in NI VeriStand) update at the same time. You can also set the value of Alarm Count from Basic Demo and the value will reflect in the Workspace. The Radio Button is mapped to the same channel. If you set the Alarm Count to 0, you'll see the Radio Button go false. When Sinewave Delay increments Alarm Count, the radio button will go true. Stop and close Basic Demo.vi. NIVS AMUI Common Process.vi should stop and close automatically.
|Here's a walk through of the example that ships with NIVS AMUI.||Here's a walk through of using the NIVS AMUI to develop a LabVIEW UI for an NI VeriStand System.|
To use the example program, download the attached ZIP file. Unzip the add-on files to your machine. Download the error file and place it in <user.lib>\errors.
All attempts have been made to provide an add-on compatible with the NI VeriStand shipping examples. The nature of some add-ons requires additional software or hardware to function.
You'll need the Asynchronous Message Communication (AMC) Reference Library to run the NIVS AMUI example program.
This example program was created for use with NI VeriStand 2010. To use this example program you must have the following software installed:
This add-on requires the following hardware.
You'll find a documentation folder in the ZIP. Please refer to the Extending NIVS AMUI for further instructions.
Here I'll keep track of changes to the example program.
Known issues with the NIVS AMUI example program.
Bug fixes as they are implemented.
This example program is provided as open-source software. If it does not meet your exact specification, you are encouraged to modify the source code to meet your needs. It is not officially supported by National Instruments.