LabVIEW VI Call Parameters

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

String Parameters

When you configure calls to VIs that use strings as parameters, you can specify to store the string data as a binary string when reading the data from the VI or when passing the data to the VI. This option is necessary because LabVIEW strings can contain binary data, including NUL characters, but TestStand strings cannot contain NUL characters.

Use the ring control in the Type column of the VI Parameter Table on the LabVIEW Module tab to select ASCII String or Binary String. The default value is ASCII String. TestStand does not modify the values of ASCII strings it passes to or from VIs.

Select Binary String in the Type column of the VI Parameter Table to store a LabVIEW string that contains binary data in a TestStand property. TestStand handles the string data in different ways depending on the version of LabVIEW you are using, as the following table describes.

LabVIEW Version TestStand Behavior
  • LabVIEW 2012 or later Development System on a non-multibyte operating system
  • LabVIEW 2009 SP1 or later Development System on a multibyte operating system
  • LabVIEW 2009 SP1 or later RTE on any operating system
TestStand compresses the binary data, encodes the compressed data, and stores the compressed data using only printable ASCII characters. To pass a compressed string to a VI, select Binary String in the Type column. TestStand unencodes and decompresses the binary data the string stores before passing it to the VI.
  • LabVIEW 2011 SP1 or earlier Development System on a non-multibyte operating system
  • LabVIEW 2009 or earlier Development System on a multibyte system
  • LabVIEW 2009 or earlier RTE on any operating system
TestStand escapes the string before storing it and substitutes hexadecimal codes for the unprintable characters, such as the NUL character, in the string. To pass an escaped string to a VI, select Binary String in the Type column. TestStand unescapes the string before passing it to the VI and substitutes the correct character values for the hexadecimal values in the escaped string.

Other LabVIEW data types treated as strings in TestStand include Timestamps, Paths, Pictures, and all of the DAQmx references except DAQmx Task Name and DAQmx Channel Name. Use the TestStand LabVIEWIOControl data type to hold a reference to a DAQmx Task Name or DAQmx Channel Name.

Notes Notes
  • To retrieve the raw data in TestStand when the binary data is compressed, call the PropertyObject.GetValBinary method of the TestStand API on the variable that stores the binary string.
  • TestStand does not automatically translate binary strings for controls like graphs. You must indicate that the parameter is a binary string.
  • Do not modify the value of the SessionNumber property of the LabVIEWIOControl data type yourself. The value of the SessionNumber property refers to an internal session for the device the DeviceName property specifies. Always set the value of the SessionNumber property to 0 initially, and use TestStand to populate the value of the SessionNumber property at run time if the property is an output parameter.

    In a VI that takes an I/O reference as an input, use the DeviceName property to pass the name of the device and set the SessionNumber property to 0. The output I/O parameter, which you use if you plan to use the device in another VI, populates the SessionNumber property, and you can then use the SessionNumber property in other VIs. If the value of the SessionNumber property is not 0, LabVIEW ignores the DeviceName property.

See Also

Edit LabVIEW VI Call dialog box

LabVIEW Data Types in TestStand

LabVIEW I/O Controls

LabVIEW Module Tab

Mapping Parameters

PropertyObject.GetValBinary

WAS THIS ARTICLE HELPFUL?

Not Helpful