IviPwrMeter Get Channel Name
IviPwrMeterBase Capability Group
This VI returns the physical channel identifier that corresponds to the one-based index specified by the ChannelIndex parameter.
Notes
(1) If you pass in a value for the ChannelIndex parameter that is less than one or greater than the value of the Channel Count property, the VI returns an empty string in the ChannelName parameter and returns an error.
(2) By passing 0 for the buffer size, you can ascertain the buffer size required to get the entire channel name string and then call the VI again with a sufficiently large buffer.
instrument handle The instrument handle that you obtain from the IviPwrMeter Initialize or IviPwrMeter Initialize With Options VIs. | |
index A 1-based index into the channel table.
Valid Range: 1 to number of channels. Default Value: 1 |
|
buffer size Pass the number of bytes in the ViChar array you specify for the Channel Name parameter.
If the channel name, including the terminating NUL byte, contains more bytes than you indicate in this parameter, the VI copies BufferSize - 1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value. For example, if the value is "123456" and the Buffer Size is 4, the VI places "123" into the buffer and returns 7. If you pass a negative number, the VI 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 Channel Name buffer parameter. Default Value: None |
|
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.
The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
|
instrument handle out The instrument handle that you obtain from the IviPwrMeter Initialize or IviPwrMeter Initialize With Options VIs. | |
channel name Returns the highest-level channel name that corresponds to the specific driver channel string that is in the channel table at an index you specify..
The buffer must contain at least as many elements as the value you specify with the Buffer Size parameter. If the channel name description, including the terminating NUL byte, contains more bytes than you indicate with the Buffer Size parameter, the VI copies Buffer Size - 1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value. For example, if the value is "123456" and the Buffer Size is 4, the VI places "123" into the buffer and returns 7. If you pass 0 for the Buffer Size, you can pass VI_NULL for this parameter. |
|
error out The error out cluster passes error or warning information out of a VI to be used by other VIs.
The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |