NI VeriStand Add-Ons Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Easy Custom Device Tool

This tool is provided to help a LabVIEW developer to create custom devices for NI VeriStand. Using this tool, one can create a custom device without knowing any custom device specific development details. The tool will abstract all the custom device details from the developer, letting them focus on the functionality.

Due to the abstraction, a developer can create a custom device in a fraction of the time typically required. However, much of the advanced functionality of custom devices will be unavailable.

To use the tool, first generate a blank custom device with the custom device template tool that ships with NI VeriStand. Then, run the provided Edit Custom Device Project.vi to modify it into the Easy Custom Device Framework. An example walkthrough is provided in a separate document.

After creating the custom device, the developer can create the functionality by modifying the strict type defined controls and the provided custom device VIs.

Strict Type Defined Controls

Configuration Data

This cluster contains the data that you want to the user to configure from the NI VeriStand System Explorer. It will be displayed in the System Explorer for the user to configure. Items in this cluster could include run time settings like file paths, hardware names, and so on.

Channel Data

This cluster contains the data that the NI VeriStand engine must access as channels. It contains a cluster of Inputs and a cluster of Outputs. The controls in this cluster are added as channels in the System Explorer under the custom device. They represent the inputs and outputs of the custom device at run-time.

Real-Time System Data

This cluster contains data or references that are used during the execution of the VeriStand engine. Place any references that you need to use at run-time, as such file references or DAQmx tasks.

Custom Device VIs

Init VI

Once the custom device is deployed and running on the VeriStand engine, this is the first VI to execute. It should initialize values, set up tasks, or open references.

Start VI

This VI executes before the looping structure of the custom device. It should start any tasks that must begin before the loop.

Sub VIs

If you will be using sub-VIs in your custom device, the sub-VIs need to be added to the Custom Device library created for your custom device. Adding the sub-VIs to this library includes the VI in the libraries namespace, allowing VIs of the same name to be used across multiple custom devices.

Execute VI

This VI executes within the looping structure of the custom device. Each iteration, the latest value of the custom device input channels are provided to this subVI in the channel data cluster. The Execute VI can write these input values to hardware, log them to file, or perform other operations on the data. After the Execute VI finishes, the output values in the channel data cluster are used to update the output channels of the custom device.

Stop VI

This VI executes when the custom device is stopped. It should close references, resolve errors, and perform shut-down tasks.

Support and Contact

This add-on 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.

National  Instruments does not support this code or guarantee its quality in any  way. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY  KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH  IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).

Stephen B
Comments
TengWu
Member
Member
on

Hi,

 

I am trying to follow the example walk through but the Custom Device API.lvlib file is password locked so I can't add a new VI to it, as said in the walk through. What is the password to the file?

 

Edit: I found my mistake. Disregard this question.

spiyah
Member
Member
on

Is there anyway to input a string into a custom device. I am trying to update this tool but it looks it looks like channels of a custom device can only be doubles. Is that true?

Ravi_Beniwal
Member Member
Member
on

Hi spiyah, I know this is probably way to late for your need, but here it is for others landing on this page, like I did.

 

The VeriStand engine only supports doubles. On the UI side, these doubles could be converted to/from enums, booleans, etc., but under the hood, everything is a double.

Contributors