IviSwtch_ConfigureScanList
IviSwtchScanner Capability Group
C Function Prototype
ViStatus IviSwtch_ConfigureScanList (ViSession vi, ViConstString scanList, ViInt32 scanMode);
Purpose
This function configures the switch module for scanning. You can set the scan list and the scan mode with this function. Use the IviSwtch_ConfigureScanTrigger function to configure the scan trigger. Use the IviSwtch_InitiateScan function to start the scan.
If the switch module is currently scanning through the scan list, this function returns IVISWTCH_ERROR_SCAN_IN_PROGRESS without configuring the scan list.
If the given scan list string contains incorrect syntax, this function returns IVISWTCH_ERROR_INVALID_SCAN_LIST.
If the scan list string is empty, this function returns the IVISWTCH_ERROR_EMPTY_SCAN_LIST error.
Parameters
Name | Type | Description |
---|---|---|
vi | ViSession | The instrument handle that you obtain from the IviSwtch_init or IviSwtch_InitWithOptions functions. The handle identifies a particular IVI session. |
scanList | ViConstString | Pass the scan list you want the instrument to use. The driver uses this value to set the IVISWTCH_ATTR_SCAN_LIST attribute.
The scan list is a string that specifies channel connections and trigger conditions for scanning. After you call the IviSwtch_InitiateScan function, the instrument makes or breaks connections and waits for triggers according to the instructions in the scan list. The scan list is comprised of channel names that you separate with special characters. These special characters determine the operation the scanner performs on the channels when it executes this scan list. Refer to the IVISWTCH_ATTR_SCAN_LIST attribute for detailed description on the scan list syntax. |
scanMode | ViInt32 | Pass the scan mode you want the instrument to use. The driver sets the IVISWTCH_ATTR_SCAN_MODE attribute to this value.
The scan mode specifies how the instrument breaks existing connections when scanning. Defined values: IVISWTCH_VAL_NONE (0)—The instrument takes no action on existing connections. IVISWTCH_VAL_BREAK_BEFORE_MAKE (1)—The instrument breaks an existing connection before creating a new one. This is useful if you want to prevent two channels from connecting together in the transitional period. IVISWTCH_VAL_BREAK_AFTER_MAKE (2)—The instrument breaks an existing connection after creating a new one. This is useful if you want to prevent damage from occurring on inductive elements of a circuit that cannot stand rapid changes in the current flow. |