Table Of Contents

Custom Device Library

Last Modified: June 10, 2021

The Custom Device library is a LabVIEW library that contains the configuration and engine VIs for a custom device. The configuration and engine VIs may optionally be distributed in different LabVIEW libraries.

Custom device library VIs configure the initialization behavior of the custom device, its interaction with the VeriStand Engine, and the user interface for the custom device in System Explorer.

Custom devices also include a separate library, called the Custom Device API library, which contains the type definitions, template VIs, and the LabVIEW API that a custom device needs to interact with VeriStand.

The Custom Device library contains the following sets of VIs to modify your custom device.

VIs for Configuring the Custom Device

The configuration of a custom device defines how you add and configure the custom device within the system definition file. Together, these VIs form the Configuration.llb for the custom device.

In a custom device, pages are the configuration pages that appear when you select the custom device or various sub-items of the device in System Explorer. The configuration page that an operator sees is the front panel of a page VI.

VI Description
Initialization VI

Prepares the custom device for first use. This VI defines the initial list of channels and/or sections that appear in System Explorer, as well as sets their initial properties.

The VI runs in the background every time an operator adds the custom device to the system definition file. It reads information from the Custom Device XML file and uses the data to add an instance of the custom device to System Explorer. The instance runs in the execution mode you specify and loads the correct dependency files. If the operator adds multiple instances of the device to the same system definition file, this VI runs for each new instance.

Main Page VI

Runs when the operator selects the custom device in System Explorer. The front panel of this VI serves as the configuration page for the custom device. You can modify this VI to add additional controls and indicators to the configuration page, and to configure responses to user events, such as when the operator enters a new item property value.

Extra Page VIs

Provides custom configuration pages for the sections and channels that appear under the custom device in System Explorer. You can configure these VIs in the same way you configure the Main Page VI. Every extra page you configure must have an entry in the <Pages> section of the Custom Device XML file.

If you do not specify an extra page for a section or channel, VeriStand displays a default section or channel page when you select the item. You can use the Set Item GUID VI to change the page associated with an item at run time.

Action VIs

Allows the custom device to perform custom actions when specific events occur, such as when the system definition is loaded in System Explorer.

Shortcut Menus

Appears in a shortcut menu when a custom device item is right-clicked in the System Explorer. These may also appear as toolbar buttons.

VIs for Customizing the Custom Device Engine

The custom device engine defines the real-time behavior of the custom device on the target. The RT Driver VI runs on the target regardless of the target's operating system.

You can have more than one RT Driver VI depending on the needs of your custom device. For example, if your custom device must support multiple real-time operating systems, you can add additional RT Driver VIs for each additional operating system the custom device must support.

VI name Description
RT Driver VI

Runs after the operator deploys the system definition file. You can add code to this VI to handle any run-time requirements of the custom device. Use this code to configure initialization, steady-state, and shutdown behavior for the custom device engine. This VI handles timing information and the exchange of data between the custom device and the rest of the VeriStand system.

Recently Viewed Topics