Custom Device Library
- Updated2025-12-15
- 3 minute(s) read
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.
The Custom Device library contains the following sets of VIs to modify your custom device.
VIs for Configuring the Custom Device
| 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. |
Related Information
- Custom Device API Library
The Custom Device API library is a LabVIEW library that contains type definitions, template VIs, and the LabVIEW API a custom device needs to interact with VeriStand.
- Automating Responses to User Actions with Action VIs
Use action VI templates with the custom device XML file to automate responses to user actions.
- Adding Custom Glyphs, Shortcut Menus, and Toolbar Buttons
Use elements in the Custom Device XML to configure custom user interface components, such as glyphs, toolbar buttons, and shortcut menus.