Using Properties and Attributes with NI-RFPM

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

NI-RFPM 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-RFPM 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-RFPM palette at Instrument I/O»Instrument Drivers»NI-RFPM 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-RFPM Set and Get Attribute functions. These functions correspond to a particular data type.

Attributes Apply to a Device or Port

NI-RFPM attributes can be applied to the device or port. 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 port, there may be multiple values for the attribute (one for each separate port).

When you set an attribute, you can specify which port 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 ports, NI-RFPM attempts to set the value on all valid ports.

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

Port

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

Valid Port Specifiers for the RF subsystem: "port1", "port2"

Valid Port Specifiers for the mmWave subsystem: "rf0/port0", "rf1/port8"

Note These port specifiers are only examples. The actual port specifiers depend on the number of ports in the system.

Example Attributes: Output Power, Deembedding attributes

Refer to the Programming Reference section 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.