Adding Custom Device Pages
- Updated2025-10-27
- 3 minute(s) read
Add pages to a custom device by creating the extra page VIs and GUIDs, adding the extra pages to the custom device build specifications, and defining the pages in the Custom Device XML file.
-
Create a page VI with the required reference
using the template VI included in the Custom
Device API library.
- Open the LabVIEW project for your custom device.
- In Project Explorer, browse to .
- Right-click Page Template.vit and select New from Template.
- From the front panel of the new VI, save the VI in the folder containing the other VIs for your custom device, such as RT Driver VI and Main Page VI.
- Close the VI.
- In Project Explorer, drag the new VI to the Custom Device library.
-
Declare the page in the XML file of the custom
device.
- Open the LabVIEW project for your custom device.
- In Project Explorer, browse to and open the XML file of your custom device.
-
Under the Pages section of
the XML file, locate the Page
section for the main page of your custom
device.
The declarations for the main page should be the first listed under the Pages section. The name of the main page corresponds to the name of the custom device.
- Copy the information between the Page tags, including the <Page> and </Page> declarations, and paste it between the <Pages> and </Pages> declarations.
-
Replace the information between the
<eng> and
<loc> decelerations with the
name of the new page.
For example, if you saved your page VI as ExtraPage.vi, enter ExtraPage.
-
Replace the information between the Path tags
with the file path to the new page.
Note You should only need to replace the last token in the path, <Name> Main Page.vi, with your page VI.
-
Change the GUID between the <GUID>
tags.
Note To reduce the risk of error when working with GUID string constants, consider using a LabVIEW global variable that is read only or creating a combo box control and saving it as a type definition.
- Save and close the XML file.
Note Every item with a unique page VI must have a page entry in the Custom Device XML file and a unique GUID. However, items with different GUIDs can reference the same page VI. If you want to create several configuration pages that are only slightly different, you can use the same page VI for each item by configuring the VI to check the associated item GUID at run time. For example, you can add a Case structure to the page VI with a case for each GUID. -
Add the page to the build specifications.
- Open the LabVIEW project for your custom device.
- In Project Explorer, expand Build Specifications, and double-click Configuration.
- In the Category menu, select Source Files.
- In Project Files, expand <Name> Custom Device.lvlib.
-
Select the new page VI, and click Add Item.
The VI is added to the Always Included section.
- In the Category menu, select Source Files Settings.
- In Project Files, expand the <Name> Custom Device.lvlib.
- Select the new page VI, and from the Destination drop down box, select <Name> Configuration LLB.
- Click OK to close the build specification.
- Save the LabVIEW project.
- Restart VeriStand.