Sending Commands to a Custom Device From a LabVIEW VI

Updated Aug 25, 2025

Reported In

Software

  • VeriStand Custom Devices

Issue Details

Is it possible to send commands to a custom device developed in LabVIEW for use with VeriStand, for example, to check the current value of a parameter used inside the custom device?

Solution

You can send commands to a custom device used in VeriStand in the form of a string or byte array.

On the custom device side, it can receive the command along with data (if necessary) and return a response.

The LabVIEW VI can receive the response from the custom device as a string.

 

The mechanism for receiving commands is implemented in the Asynchronous example that can be selected in the Custom Device Template Wizard.

You can find it in the block diagram of RT Driver.vi, inside the event structure as a user event.

To create a program in LabVIEW VI to send commands, you can use the functions found in the function palette under:
NI VeriStand >> Execution >> Custom Device Communication

Using these functions, you can write a program like the example below:

In Open Custom Device Reference.vi, specify the Custom Device Path, which is the path to the custom device as shown in VeriStand’s System Explorer.

The Gateway IP Address can be set and confirmed during VeriStand deployment.

 

Additional Information

The Data input for Send Custom Device Message.vi is optional, but if used, it must be a string. Therefore, when sending values to the custom device in other data types, use a flatten-to-string function or appropriately convert them into a string.

Similarly, note that responses from the custom device will also be received as strings.