-
Notifications
You must be signed in to change notification settings - Fork 50
NI SWITCH Scan Functions
- niSwitch_SendSoftwareTrigger
- niSwitch_WaitForScanComplete
- niSwitch_Scan
- niSwitch_AbortScan
- niSwitch_ConfigureScanTrigger
- niSwitch_RouteTriggerInput
- niSwitch_IsScanning
- niSwitch_InitiateScan
- niSwitch_SetContinuousScan
- niSwitch_RouteScanAdvancedOutput
- niSwitch_ConfigureScanList
ViStatus niSwitch_Scan (ViSession vi, ViConstString scanlist, ViInt16 initiation);
Takes the scan list provided, programs the switching hardware and initiates the scan. Once initiation is complete, the operation will return. The scan list itself is comprised of a list of channel connections separated by semicolons. For example, the following scan list would scan the first three channels of a multiplexer. Example: com0->ch0; com0->ch1; com0->ch2;. Refer to scan lists) for additional information. To see the status of the scan, you can call either niSwitch_IsScanning or niSwitch_WaitForScanComplete. Use the niSwitch_ConfigureScanTrigger function to configure the scan trigger. Use the niSwitch_AbortScan function to stop the scan if you are in continuous scan mode (Refer to niSwitch_SetContinuousScan); otherwise the scan halts automatically when the end of the scan list is reached. For reference, this operation is equivalent to calling niSwitch_ConfigureScanList and niSwitch_InitiateScan.
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. |
scanlist | ViConstString | Pass the scan list) you want the instrument to use. |
initiation | ViInt16 | Use the initiation parameter to specify whether the switch or the measurement device initiates the scan trigger handshake. This parameter determines whether to wait for the scan to reach a trigger point before completing. If the measurement device initiates the scan, set this parameter to NISWITCH_VAL_MEASUREMENT_DEVICE_INITIATED. This function then waits until the switch is waiting for a trigger from the measurement device before completing. If the switch initiates the scan, set this parameter to NISWITCH_VAL_SWITCH_INITIATED. This function then completes immediately after initiating the scan. You should have already set up your DMM to wait for a trigger before calling this function with Initiation set to NISWITCH_VAL_SWITCH_INITIATED. |
Value | Description |
---|---|
NISWITCH_VAL_SWITCH_INITIATED | Switch Initiated. |
NISWITCH_VAL_MEASUREMENT_DEVICE_INITIATED (default) | Measurement device initiated. |
- niSwitch_InitiateScan
- Scan Lists
ViStatus niSwitch_InitiateScan (ViSession vi);
Commits the configured scan list and trigger settings to hardware and initiates the scan. If niSwitch_Commit was called earlier, niSwitch_InitiateScan only initiates the scan and returns immediately.
Once the scanning operation begins, you cannot perform any other operation other than GetAttribute, niSwitch_AbortScan, or niSwitch_SendSoftwareTrigger. All other functions return the NISWITCH_ERROR_SCAN_IN_PROGRESS error. To stop the scanning operation,
To stop the scanning operation, call niSwitch_AbortScan.
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. |
- niSwitch_Commit
- Scanning
ViStatus niSwitch_AbortScan (ViSession vi);
Aborts the scan in progress. The switch module returns to the state it was in before the scan was initiated.
Initiate a scan with niSwitch_InitiateScan.
If the switch module is not scanning, the NISWITCH_ERROR_NO_SCAN_IN_PROGRESS error is returned.
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. |
- niSwitch Properties
- Scanning
- Writing a Software Trigger Scanning Program
ViStatus niSwitch_SendSoftwareTrigger (ViSession vi);
Sends a software trigger to the switch specified in the NI-SWITCH session. When the trigger input is set to NISWITCH_VAL_SOFTWARE_TRIG through either the niSwitch_ConfigureScanTrigger function or the NISWITCH_ATTR_TRIGGER_INPUT attribute, the scan does not proceed from a semicolon (wait for trigger) until niSwitch_SendSoftwareTrigger is called.
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. |
- Scanning
- Software Trigger Scanning
ViStatus niSwitch_IsScanning (ViSession vi, ViBoolean* isScanning);
Indicates the status of the scan.
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. |
isScanning | ViBoolean | NI-SWITCH returns the value of NISWITCH_ATTR_IS_SCANNING attribute. If VI_TRUE, the switch module is currently scanning through the scan list (i.e. it is not in the Idle state). If VI_FALSE, the switch module is not currently scanning through the scan list (i.e. it is in the Idle state). |
- Scanning
ViStatus niSwitch_WaitForScanComplete (ViSession vi, ViInt32 maximumTime_ms);
Pauses until the switch stops scanning or until the maximum time has elapsed, when NI-SWITCH returns a timeout error.
If the time you specify with the maximumTime_ms parameter elapsed before the scanning operation has finished, this function returns the NISWITCH_ERROR_MAX_TIME_EXCEEDED error.
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. |
maximumTime_ms | ViInt32 | Specifies the maximum length of time to wait for the switch module to stop scanning. If the specified time elapses before the scan ends, the NISWITCH_ERROR_MAX_TIME_EXCEEDED error is returned. The default value is 5000 ms. |
- Scanning
ViStatus niSwitch_SetContinuousScan (ViSession vi, ViBoolean continuousScan);
Sets the to loop continuously through the scan list or to stop scanning after one pass through the scan list.
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. |
continuousScan | ViBoolean | If VI_TRUE, loops continuously through the scan list during scanning. If VI_FALSE, the scan stops after one pass through the scan list. The default value is VI_FALSE. |
- Scanning
ViStatus niSwitch_ConfigureScanList (ViSession vi, ViConstString scanlist, ViInt32 scanMode);
Configures the scan list and scan mode used for scanning.
Refer to Devices) to determine if the switch module supports scanning.
The scan list is comprised of a list of channel connections separated by semicolons. For example, the following scan list will scan the first three channels of a multiplexer:
com0->ch0; com0->ch1; com0->ch2;
Refer to Scan Lists) for more information on scan list syntax.
To see the status of the scan, call either niSwitch_IsScanning or niSwitch_WaitForScanComplete. Use the niSwitch_ConfigureScanTrigger function to configure the scan trigger. Use the niSwitch_InitiateScan function to start the scan.
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. |
scanlist | ViConstString | The scan list to use. NI-SWITCH uses this value to set the NISWITCH_ATTR_SCAN_LIST attribute. |
scanMode | ViInt32 | Specifies how the switch module breaks existing connections when scanning. The driver uses this value to set the NISWITCH_ATTR_SCAN_MODE attribute. Refer to scan modes) for more information. The default value is NISWITCH_VAL_BREAK_BEFORE_MAKE. |
- Scan Lists
- Scanning
ViStatus niSwitch_ConfigureScanTrigger (ViSession vi, ViReal64 scanDelay, ViInt32 triggerInput, ViInt32 scanAdvancedOutput);
Configures the scan triggers for the scan list established with niSwitch_ConfigureScanList.
Refer to Devices) to determine if the switch module supports scanning.
niSwitch_ConfigureScanTrigger sets the location that the switch expects to receive an input trigger to advance through the scan list. This function also sets the location where it outputs a scan advanced signal after it completes an entry in the scan list.
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. |
scanDelay | ViReal64 | The minimum length of time you want the switch to wait after it creates a path until it asserts a trigger on the scan advanced output line. The driver uses this value to set the NISWITCH_ATTR_SCAN_DELAY attribute. The scan delay is in addition to the settling time. The driver uses this value to set the NISWITCH_ATTR_SCAN_DELAY attribute. Express this value in seconds. The default value is 0.0 s. |
triggerInput | ViInt32 | Trigger source you want the switch module to use during scanning. The driver uses this value to set the NISWITCH_ATTR_TRIGGER_INPUT attribute. The switch waits for the trigger you specify when it encounters a semicolon in the scan list. When the trigger occurs, the switch advances to the next entry in the scan list. Refer to NISWITCH_ATTR_TRIGGER_INPUT for a list of valid values. |
scanAdvancedOutput | ViInt32 | Output destination of the scan advanced trigger signal. NI-SWITCH uses this value to set the NISWITCH_ATTR_SCAN_ADVANCED_OUTPUT attribute. After the switch processes each entry in the scan list, it waits the length of time you specify in the scanDelay parameter and then asserts a trigger on the line you specify with this parameter. Refer to NISWITCH_ATTR_SCAN_ADVANCED_OUTPUT for a list of valid values. |
- Scanning
ViStatus niSwitch_RouteTriggerInput (ViSession vi, ViInt32 triggerInputConnector, ViInt32 triggerInputBusLine, ViBoolean invert);
Routes the input trigger from the front or rear connector to a trigger bus line (TTLx). To disconnect the route, call this function again and specify None for trigger bus line parameter.
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. |
triggerInputConnector | ViInt32 | The location of the input trigger source on the switch module. Valid locations are the NISWITCH_VAL_FRONTCONNECTOR and NISWITCH_VAL_REARCONNECTOR. The default value is NISWITCH_VAL_FRONTCONNECTOR. |
triggerInputBusLine | ViInt32 | The trigger line to route the input trigger. Select NISWITCH_VAL_NONE to break an existing route. Valid Values: NISWITCH_VAL_NONE (default) NISWITCH_VAL_TTL0 NISWITCH_VAL_TTL1 NISWITCH_VAL_TTL2 NISWITCH_VAL_TTL3 NISWITCH_VAL_TTL4 NISWITCH_VAL_TTL5 NISWITCH_VAL_TTL6 NISWITCH_VAL_TTL7 |
invert | ViBoolean | If VI_TRUE, inverts the input trigger signal from falling to rising or vice versa. The default value is VI_FALSE. |
- Scanning
- niSwitch_ConfigureScanTrigger
ViStatus niSwitch_RouteScanAdvancedOutput (ViSession vi, ViInt32 scanAdvancedOutputConnector, ViInt32 scanAdvancedOutputBusLine, ViBoolean invert);
Routes the scan advanced output trigger from a trigger bus line (TTLx) to the front or rear connector.
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. |
scanAdvancedOutputConnector | ViInt32 | The scan advanced output trigger destination. Valid Values: NISWITCH_VAL_FRONTCONNECTOR (default) NISWITCH_VAL_REARCONNECTOR. |
scanAdvancedOutputBusLine | ViInt32 | The trigger line to route the scan advanced output trigger from the front or rear connector. Select NISWITCH_VAL_NONE to break an existing route. Valid Values: NISWITCH_VAL_NONE (default) NISWITCH_VAL_TTL0 NISWITCH_VAL_TTL1 NISWITCH_VAL_TTL2 NISWITCH_VAL_TTL3 NISWITCH_VAL_TTL4 NISWITCH_VAL_TTL5 NISWITCH_VAL_TTL6 NISWITCH_VAL_TTL7 |
invert | ViBoolean | If VI_TRUE, inverts the input trigger signal from falling to rising or vice versa. The default value is VI_FALSE. |
- Scanning
Creating and Setting Up a gRPC Server
Session Utilities API Reference
gRPC API Differences From C API
Sharing Driver Sessions Between Clients
C API Docs
NI-DAQmx
- gRPC API Differences From C API
- Task Configuration And Control
- Channel Configuration And Creation
- Timing
- Triggering
- Read Functions
- Write Functions
- Export Hardware Signals
- Scale Configuration
- Internal Buffer Configuration
- Advanced Functions
- System Configuration
- Error Handling
- Buffer Attributes
- Calibration Info Attributes
- Channel Attributes
- Device Attributes
- Export Signal Attributes
- Persisted Channel Attributes
- Persisted Scale Attributes
- Persisted Task Attributes
- Physical Channel Attributes
- Read Attributes
- Scale Attributes
- System Attributes
- Task Attributes
- Timing Attributes
- Trigger Attributes
- Watchdog Attributes
- Write Attributes
NI-DCPOWER
- Setup Functions
- Configure Functions
- Measurement Functions
- Control Functions
- Trigger And Event
- Attribute Functions
- Query Functions
- Calibration Functions
- Utility Functions
- Supported Device
- Source Attributes
- Transient Attributes
- Voltage Attributes
- Current Attributes
- Pulse Voltage Attributes
- Pulse Current Attributes
- Cutoff Attributes
- Measurement Attributes
- Trigger Attributes Functions
- Event Attributes
- Advanced Attributes
- Inherent Ivi Attributes
- Supported Device Attributes
NI-DIGITAL PATTERN DRIVER
- Init And Close Functions
- Session Locking Functions
- Utility Functions
- Error Handling Functions
- Calibration Functions
- Attributes Functions
- Pin Map Functions
- Low Level Functions
- Low Level Action Functions
- Pin Control Functions
- Static IO Functions
- Clock Generator Functions
- Levels And Timing Functions
- TDR Functions
- PPMU Configuration Functions
- DC Voltage Functions
- DC Current Functions
- PPMU Action Functions
- Pattern Configuration Functions
- Pattern Action Functions
- History Ram Functions
- Source Memory Functions
- Capture Memory Functions
- Triggers And Events Functions
- Conditional Jump Trigger Functions
- Sequencer Flag Functions
- Sequencer Register Functions
- Match Fail Combination Functions
- Pattern Results Functions
- Sort Results Functions
- Frequency Measurement Functions
- IVI Inherent Attributes
- Specific Driver Information Attributes, Read Only
- Driver Setup Information Attributes
- Device Attributes
- Pin Control Attributes
- Level Configuration Attributes
- Trigger Configuration Attributes
- PPMU Attributes
- Patterns Attributes
- Pattern Opcode Event Attributes
- Timing Offset Attributes
- Keep Alive Attributes
- Frequency Measurement Attributes
- Clock Generator Attributes
- History RAM
- Synchronization Attributes
- TDR Endpoint Termination Attributes
NI-FGEN
- Setup Functions
- Configuration Functions
- Standard Output Functions
- Arbitrary Waveform Output Functions
- Arbitrary Sequence Output Functions
- Incremental Waveform Write Functions
- Configure Clock Functions
- Trigger And Syncronizations Functions
- 5404 Routing Functions
- Script Output Functions
- Configure Onboard Signal Processing Functions
- Configure Peer To Peer Functions
- Attribute Functions
- Waveform Control Functions
- Error Functions
- Output Attributes
- Arbitrary Waveform Attributes
- Data Transfer Attributes
- Onboard Signal Processing Attributes
- Peer To Peer Attributes
- Standard Function Attributes
- Clock Attributes
- Event Attributes
- Triggering Attributes
- Instrument Specific Attributes
- Inherent IVI Attributes
- 5401 5411 5431
NI-RFmx Bluetooth
- gRPC API Differences From C API
- General Functions
- Configuration Functions
- Set And Get Attribute Functions
- Fetch Results Functions
- Utility Functions
- Build String Functions
- Advanced Functions
- General Attributes
- Trigger Attributes
- Packet Attributes
- Auto Detect Signal Attributes
- Modacc Attributes
- ACP Attributes
- Twenty dB Attributes
- Frequency Range Attributes
- TXP Attributes
- Advanced Attributes
NI-RFmx NR
- gRPC API Differences From C API
- General Functions
- Configuration Functions
- Set And Get Attributes Functions
- Fetch Results Functions
- Utility Functions
- Build String Functions
- Advanced Functions
- General Attributes
- Trigger Attributes
- Signal Detection Attributes
- Component Carrier Attributes
- List Attributes
- Modacc Attributes
- ACP Attributes
- CHP Attributes
- OBW Attributes
- SEM Attributes
- TXP Attributes
- Pvt Attributes
- Advanced Attributes
NI-RFmx LTE
- gRPC API Differences From C API
- General Functions
- Configuration Functions
- Ch Configuration Functions
- NB IoT Configuration Functions
- ModAcc Configuration Functions
- ACP Configuration Functions
- CHP Configuration Functions
- OBW Configuration Functions
- SEM Configuration Functions
- PVT Configuration Functions
- SlotPhase Configuration Functions
- SlotPower Configuration Functions
- Set And Get Attribute Functions
- ModAcc Fetch Functions
- ACP Fetch Functions
- CHP Fetch Functions
- OBW Fetch Functions
- SEM Fetch Functions
- PVT Fetch Functions
- SlotPhase Fetch Functions
- SlotPower Fetch Functions
- Utility Functions
- Build String Functions
- Advanced Functions
- General Attributes
- Trigger Attributes
- Component Carrier Attributes
- ModAcc Attributes
- ACP Attributes
- CHP Attributes
- OBW Attributes
- SEM Attributes
- PVT Attributes
- SlotPhase Attributes
- SlotPower Attributes
- Advanced Attributes
NI-RFmx SpecAn
- gRPC API Differences From C API
- General Functions
- Configuration Functions
- Set And Get Attribute Functions
- Read Functions
- Fetch Functions
- Utility Functions
- Marker Functions
- Build String Functions
- Advanced Functions
- General Attributes
- Trigger Attributes
- ACP Attributes
- Cdf Attributes
- CHP Attributes
- Fcnt Attributes
- Harm Attributes
- OBW Attributes
- SEM Attributes
- Spectrum Attributes
- Spur Attributes
- TXP Attributes
- AMPM Attributes
- Dpd Attributes
- IQ Attributes
- IM Attributes
- NF Attributes
- Phasenoise Attributes
- PAVT Attributes
- Advanced Attributes
NI-RFmx WLAN
- gRPC API Differences From C API
- General Functions
- Configuration Functions
- Set And Get Attribute Functions
- Fetch DSSS ModAcc Functions
- Fetch OFDM ModAcc Functions
- Fetch SEM Functions
- Fetch TXP Functions
- Fetch PowerRamp Functions
- Utility Functions
- Build String Functions
- Advanced Functions
- General Attributes
- Trigger Attributes
- OFDM Attributes
- Auto Detect Signal Attributes
- DSSS ModAcc Attributes
- OFDM ModAcc Attributes
- SEM Attributes
- TXP Attributes
- PowerRamp Attributes
- Advanced Attributes
NI-RFSA
- General Functions
- Configuration Functions
- Acquisition Functions
- Utility Functions
- Calibration Functions
- General Attributes
- Vertical Attributes
- Signal Path Attributes
- Acquisition Attributes
- Acquisition Attributes
- Triggers Attributes
- Events Attributes
- Device Characteristics Attributes
- Peer To Peer Streaming Attributes
- Configuration List Attributes
- Inherent IVI Properties Attributes
- De-embedding Attributes
- Self Calibration Attributes
- Factory Calibration Attributes
- External Alignment Attributes
- Device Specific Attributes
NI-RFSG
- General Functions
- Generation Configuration
- Utility Functions
- Calibration Functions
- Arb Attributes
- Clock Attributes
- Configuration List Attributes
- De-embedding Attributes
- Device Characteristics Attributes
- Device Specific Attributes
- Events Attributes
- External Calibration Attributes
- Inherent IVI Attributes Attributes
- IQ Impairment Attributes
- Load Configurations Attributes
- Modulation Attributes
- Obsolete Attributes
- Peer To Peer Attributes
- RF Attributes
- Self Calibration Attributes
- Triggers Attributes
NI-SCOPE
- Setup Functions
- Configure Functions
- Attribute Functions
- Acquisition Functions
- Measurement Functions
- Calibrate Functions
- Utility Funcitons
- Error Handling Functions
- IVI Compliance Or Obsolete Functions
- Vertical Attributes
- Horizontal Attributes
- Trigger Attributes
- Clocking Attributes
- Synchronization Attributes
- Acquisition Attributes
- Waveform Measurements Attributes
- Onboard Signal Processing Attributes
- Peer To Peer Streaming Attributes
- Device Attributes
- IVI Or Obsolete Attributes
- Instrument Capabilities Attributes
- If Digitizer Attributes
NI-XNET
- gRPC API differences from C APIs
- General Functions
- Cluster Properties
- Database Properties
- Device Properties
- ECU Properties
- Frame Properties
- Interface Properties
- LIN Schedule Entry Properties
- LIN Schedule Properties
- PDU Properties
- Session Ethernet Properties
- Session Frame Properties
- Session Interface Properties
- Session Properties
- Session SAE J1939 Properties
- Signal Properties
- Subframe Properties
- System Properties
- IP-Stack Functions
- Socket Options
- Socket Functions