NI SWITCH Attribute Functions - ni/grpc-device GitHub Wiki
- niSwitch_SetAttributeViBoolean
- niSwitch_SetAttributeViInt32
- niSwitch_GetAttributeViBoolean
- niSwitch_GetAttributeViReal64
- niSwitch_CheckAttributeViString
- niSwitch_SetAttributeViReal64
- niSwitch_GetAttributeViInt32
- niSwitch_CheckAttributeViReal64
- niSwitch_CheckAttributeViSession
- niSwitch_CheckAttributeViBoolean
- niSwitch_CheckAttributeViInt32
- niSwitch_SetAttributeViString
- niSwitch_SetAttributeViSession
- niSwitch_GetAttributeViString
- niSwitch_GetAttributeViSession
ViStatus niSwitch_SetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 attributeValue);
This function sets the value of a ViInt32 attribute. This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases: - State caching is disabled for the entire session or for the particular attribute. - State caching is enabled and the currently cached value is invalid or is different than the value you specify.
This instrument driver contains high-level functions that set most of the instrument attributes. It is best to use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the SetAttribute functions, the functions check the instrument status after each call. Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr |
Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViInt32 | Pass the value to which you want to set the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_SetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViReal64 attributeValue);
This function sets the value of a ViReal64 attribute. This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
This instrument driver contains high-level functions that set most of the instrument attributes. It is best to use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the SetAttribute functions, the functions check the instrument status after each call. Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr |
Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViReal64 | Pass the value to which you want to set the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_SetAttributeViString (ViSession vi, ViConstString channelName, ViAttr attributeID, ViConstString attributeValue);
Sets the value of a ViString attribute. You can use this low-level function to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-SWITCH contains high-level functions that set most of the instrument attributes. It is best to use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the SetAttribute functions, the functions check the instrument status after each call. Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr |
Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViConstString | Pass the value to which you want to set the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_SetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attributeID, ViBoolean attributeValue);
Sets the value of a ViBoolean attribute. You can use this low-level function to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-SWITCH contains high-level functions that set most of the instrument attributes. It is best to use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the SetAttribute functions, the functions check the instrument status after each call. Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr |
Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViBoolean | Pass the value to which you want to set the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_SetAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attributeID, ViSession attributeValue);
Sets the value of a ViSession attribute. You can use this is a low-level function to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-SWITCH contains high-level functions that set most of the instrument attributes. It is best to use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the SetAttribute functions, the functions check the instrument status after each call. Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr |
Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViSession | Pass the value to which you want to set the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_GetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32* attributeValue);
Queries the value of a ViInt32 attribute. You can use this function to get the values of instrument specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViInt32 | Returns the current value of the attribute. Pass the address of a ViInt32 variable. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
- Setting and Checking Properties and Attributes
ViStatus niSwitch_GetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViReal64* attributeValue);
Queries the value of a ViReal64 attribute. You can use this function to get the values of instrument specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViReal64 | Returns the current value of the attribute. Pass the address of a ViReal64 variable. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
- Setting and Checking Properties and Attributes
ViStatus niSwitch_GetAttributeViString (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 arraySize, ViChar[] attributeValue);
Queries the value of a ViString attribute. You can use this function to get the values of instrument specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
You must provide a ViChar array to serve as a buffer for the value. Pass the number of bytes in the buffer as arraySize. If the current value of the attribute, including the terminating NULL byte, is larger than the size you indicate in arraySize, the function copies arraySize-1 bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the array size you must pass to get the entire value. For example, if the value is "123456" and arraySize is 4, the function places "123" into the buffer and returns 7. If you want to call this function just to get the required array size, you can pass 0 for arraySize and VI_NULL for the attributeValue buffer. If you want the function to fill in the buffer regardless of the number of bytes in the value, pass a negative number for arraySize.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
arraySize | ViInt32 | Pass the number of bytes in the ViChar array you specify for the Attribute Value parameter. If the current value of the attribute, including the terminating NUL byte, contains more bytes that you indicate in this parameter, the function copies Array Size-1 bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the array size you must pass to get the entire value. For example, if the value is "123456" and the Array Size is 4, the function places 123 into the buffer and returns 7. If you pass a negative number, the function copies the value to the buffer regardless of the number of bytes in the value. If you pass 0, you can pass VI_NULL for the Attribute Value buffer parameter. The default value is 512. |
attributeValue | ViChar[] | Buffer in which the function returns the current value of the attribute. The buffer must be of type ViChar and have at least as many bytes as indicated in the arraySize parameter. If the current value of the attribute, including the terminating NULL byte, contains more bytes that you indicate in this parameter, the function copies arraySize-1 bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the array size you must pass to get the entire value. |
- Setting and Checking Properties and Attributes
ViStatus niSwitch_GetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attributeID, ViBoolean* attributeValue);
Queries the value of a ViBoolean attribute. You can use this function to get the values of instrument specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViBoolean | Returns the current value of the attribute. Pass the address of a ViBoolean variable. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
- Setting and Checking Properties and Attributes
ViStatus niSwitch_GetAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attributeID, ViSession* attributeValue);
Queries the value of a ViSession attribute. You can use this function to get the values of instrument specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViSession | Returns the current value of the attribute. Pass the address of a ViSession variable. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
- Setting and Checking Properties and Attributes
ViStatus niSwitch_CheckAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 attributeValue);
Checks the validity of a value you specify for a ViInt32 attribute.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr |
Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViInt32 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViInt32 | Pass the value which you want to verify as a valid value for the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_CheckAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViReal64 attributeValue);
Checks the validity of a value you specify for a ViReal64 attribute.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViReal64 type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViReal64 | Pass the value which you want to verify as a valid value for the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_CheckAttributeViString (ViSession vi, ViConstString channelName, ViAttr attributeID, ViConstString attributeValue);
Checks the validity of a value you specify for a ViString attribute.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViString type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViConstString | Pass the value which you want to verify as a valid value for the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_CheckAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attributeID, ViBoolean attributeValue);
Checks the validity of a value you specify for a ViBoolean attribute.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViBoolean type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViBoolean | Pass the value which you want to verify as a valid value for the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes
ViStatus niSwitch_CheckAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attributeID, ViSession attributeValue);
Checks the validity of a value you specify for a ViSession attribute.
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channelName | ViConstString | Some attributes are unique for each channel. For these, pass the name of the channel. Other attributes are unique for each switch. Pass VI_NULL or an empty string for this parameter. The default value is an empty string. |
attributeID | ViAttr | Pass the ID of an attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. Click on the control or press , , or , to display a dialog box containing a hierarchical list of the available attributes. Attributes whose value cannot be set are dim. Help text is shown for each attribute. Select an attribute by double-clicking on it or by selecting it and then pressing . Read-only attributes appear dim in the list box. If you select a read-only attribute, an error message appears. A ring control at the top of the dialog box allows you to see all IVI attributes or only the attributes of the ViSession type. If you choose to see all IVI attributes, the data types appear to the right of the attribute names in the list box. The data types that are not consistent with this function are dim. If you select an attribute data type that is dim, LabWindows/CVI transfers you to the function panel for the corresponding function that is consistent with the data type. If you want to enter a variable name, press to change this ring control to a manual input box. If the attribute in this ring control has constants as valid values, you can view the constants by moving to the Attribute Value control and pressing . |
attributeValue | ViSession | Pass the value which you want to verify as a valid value for the attribute. From the function panel window in LabWindows/CVI, you can use this control as follows. If the attribute currently showing in the Attribute ID ring control has constants as valid values, you can view a list of the constants by pressing on this control. Select a value by double-clicking on it or by selecting it and then pressing . |
![]() |
Note Some of the values might not be valid depending on the current settings of the instrument session. |
---|
- Setting and Checking Properties and Attributes