Using Attributes with NI-HSDIO
- Updated2025-11-11
- 2 minute(s) read
Attributes, which are typically called properties in LabVIEW, serve as a base for parameters.
NI-HSDIO contains high-level functions that set most of the instrument attributes. Some attributes are not accessible through the high-level functions. For example, input impedance is not set with any of the NI-HSDIO configuration functions. The values for these attributes must be set using the attribute.
Some NI-HSDIO properties are channel based. When a property is channel based, you must specify an active channel before setting, getting, or checking properties.
Accessing Attributes
In LabVIEW, you can find attributes in the NI-HSDIO property node. To access them, complete the following steps:
- Open a VI.
- Make sure that you are viewing the block diagram. Navigate to the NI-HSDIO palette at All Functions»NI Measurements»NI-HSDIO»Static and Dynamic Acquisition or All Functions»NI Measurements»NI-HSDIO»Static and Dynamic Generation.
- Drag the property node icon to the block diagram.
- Left-click the property node, and select the attribute you want to use.
- Resize the property node to add additional attributes.
In C, attributes are accessed with the niHSDIO 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 or ViReal64, use niHSDIO_SetAttributeViReal64.
Refer to the Function 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 forced 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 might 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 might 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 must be validated again.