Adding Extra Pages After Creating the Custom Device Project

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Custom Device Tips and Tricks

If you need additional pages for your custom device after running the Custom Device Template Tool, you must manually perform the actions that the Custom Device Template Tool would perform, including creating a page VI with the correct references, making the necessary declarations in the Custom Device XML file, and updating the custom device build specifications. To add an extra page to your custom device, complete all the steps listed in this topic.

Note  If your new page is not created properly, you will receive the following error when adding your custom device to the system definition: Custom Device Page Error: The following Custom Device page VI is not executable. The VI might not be found at the correct location, or it is missing dependencies that it requires to run. Please contact the Custom Device vendor for more information on this problem.

1. Create a Page VI with the Required References

The NI VeriStand API requires your page VI to have specific terminal references. The easiest way to create a new page VI with the correct references is to create a new VI from the template VI included in the Custom Device API library:

  1. Open the LabVIEW project (.lvproj) for your custom device.
  2. In the Project Explorer window, locate Page Template.vit by navigating to My Computer»Custom Device API.lvlib»Templates»Subpanel Page VI»Page Template.vit.
  3. Right-click Page Template.vit and select New from Template.
  4. From the front panel of the new VI, click File»Save, enter a name for the new page, and save the VI in the folder containing the other VIs for your custom device, such as RT Driver VI and Main Page VI. This folder is where you saved your custom device LabVIEW project to when you ran the Custom Device Template Tool.
  5. Save and close the VI.
  6. In the Project Explorer window, click and drag the new VI to the Custom Device library (<Name> Custom Device.lvlib).

2. Declare the Extra Page in the XML

You must declare the extra page in the XML file of the custom device:

  1. Open the LabVIEW project (.lvproj) for your custom device.
  2. In the Project Explorer window, locate the XML file of your custom device by navigating to My Computer»Custom Device <Name>.xml and open it.
  3. Locate the <Page> section for the main page of your custom device under the <Pages> section of the XML file. 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.
  4. Copy the information between <Page> and </Page>, including the <Page> and </Page> declarations, and paste it between the <Pages> and </Pages> declarations.
  5. Replace the information between the <eng>, <loc> with the name of the new page. For example, if you saved your page VI as, enter ExtraPage.
  6. Replace the information between the <Path> tags with the file path to the new page. You should only need to replace the last token in the path, <Name> Main, with your page VI.
  7. Create a GUID for the extra page. You can find a GUID Generator VI at <vi.lib>\NI Veristand\Custom Device Tools\Custom Device Template Tool\Custom Device Template Tool.lvlib:GUID Before you run the GUID Generator VI, you must set its execution priority to normal, and in the Custom Device Template Tool.lvlib\subVIs, change the access scope of the project library to public.
  8. Change the GUID between the <GUID> tags to match the GUID you created for the extra page.
  9. Save and close the XML file.
Tip  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.

3. Add the Extra Page to the Build Specifications

  1. Open the custom device LabVIEW project (.lvproj) file.
  2. In the Project Explorer window, expand the Build Specifications node, and double-click Configuration.
  3. In the Category menu, select Source Files, and in the Project Files tree, expand <Name> Custom Device.lvlib.
  4. Select the new page VI, and click the Add Item () button to add the VI to the Always Included section.
  5. In the Category menu, select Source Files Settings, and in the Project Files tree, expand the <Name> Custom Device.lvlib.
  6. Select the new page VI, and from the Destination drop down box, select <Name> Configuration LLB .
  7. Click OK to close the build specification.
  8. Save the LabVIEW project.
Note  After adding the extra page, you need to restart NI VeriStand. NI VeriStand will not read the modified XML until you restart it.

Related Links

Custom Device Framework

Custom Device Pages

Custom Device XML


Not Helpful