NI-VNA

Using Properties and Attributes with NI-VNA

  • Updated2023-02-21
  • 3 minute(s) read

Attributes, which are typically called properties in LabVIEW, serve as a base for parameters.

NI-VNA contains high-level functions that set most of the instrument attributes. Some attributes are not accessible through the high-level functions. The values for these attributes must be set using the attribute.

Accessing Attributes

In LabVIEW, you can find attributes in the NI-VNA property node. To access them, complete the following steps:

  1. Open a VI.
  2. Make sure that you are viewing the block diagram. Navigate to the NI-VNA palette at All Functions»NI Measurements»NI-VNA, and then drag the property node icon to the block diagram.
  3. Left-click the property node, and select the attribute you want to use.
  4. To add additional attributes, resize the property node.

In C, attributes are accessed with the NI-VNA Set and Get Attribute functions. These functions correspond to a particular data type. For example, to set the input impedance, which has a data type of ViReal64, use niVNA_SetAttributeViReal64.

Attributes Apply to a Device, Channel, Port, Standard, or Frequency Band

NI-VNA attributes can be applied to the device, channel, port, standard, or band. When an attribute is applied to the device, you can set only a single value for this attribute, and that value applies to the entire device. When an attribute is applied to the channel, port, standard, or band, there may be multiple values for the attribute (one for each separate port, channel, standard, or band).

When you set an attribute, you can specify which channel, port, standard, or band the value should apply to using the Active Channel property in LabVIEW or the channel parameter on the Set Attribute functions in C/CVI. When you pass NULL or the empty string ("") for this parameter, and the attribute applies to multiple channels or ports, NI-VNA attempts to set the value on all valid channels or ports. You must specifically pass a valid specifier for standard- and band-based attributes.

Device

Device attributes contain a single value that pertains to the entire device or driver session.

Valid Device Specifiers: NULL, ""

Example Attributes: Device Serial Number, Triggering and Synchronization attributes, Driver State

Channel

A channel represents a collection of ports. A measurement involves one or more ports, and channel attributes generally refer to settings that apply to the entire measurement, rather than a specific port.

Valid Channel Specifiers: "0"

Example Attributes: Sweep Number of Points, Sweep Start/Stop Frequencies, S-Parameter Enabled attributes

Port

Port attributes can contain different values, each of which applies to a specific physical port.

Valid Port Specifiers: "port1", "port2"

Example Attributes: Output Power, Reference Plane Extension attributes

Standard

Standard attributes can contain different values, each of which applies to a physical standard used for TRL calibration.

Valid Standard Specifiers: "standard1", "standard2", "standard3", "standard4", "standard5", "standard6"

Example Attributes: TRL Calibration Standard Length, TRL Calibration Standard Type

Band

Band attributes can contain different values, each of which applies to one frequency band of a TRL calibration.

Valid Band Specifiers: "band1", "band2"

Example Attributes: TRL Calibration List of Standards, Band Break Point attributes

Refer to the Programming book in this help file for a complete listing of available attributes and properties.

Setting Properties and Attributes Before Reading Them

Properties and attributes are modified when you set them or when you call a configuration VI or function that sets them, respectively. It is important to set the properties or attributes or call any configuration VIs or functions before reading back any property or attribute values for the following reasons:

  • Values read are coerced depending on the current configuration of the session. If you read a property or attribute value and then set other properties or attributes, the value read may no longer be valid.
  • The driver verifies that the configuration of the device is valid at the time the property or attribute is read. It is possible to get an error when reading a property or attribute if the configuration is not valid at that point, even when a setting later could make it valid.
  • Reading properties or attributes causes the driver to verify the current configuration. If you change some of the settings later, those settings need to be validated again.