Writing a Software Trigger Scanning Program

NI Switches Help

Edition Date: April 2015

Part Number: 375472H-01

»View Product Info
Download Help (Windows Only)

To write a software trigger scanning program, complete the following steps:

  1. Set the topology of the switch module using the niSwitch Initialize With Topology VI or the niSwitch_InitWithTopology function.
  2. Set the trigger input (triggerInput) parameter to Software Trigger using the niSwitch Configure Scan Trigger VI or the niSwitch_ConfigureScanTrigger function.
  3. Set the number of times the switch cycles through the scan list, once or infinitely, using the niSwitch Set Continuous Scan VI or the niSwitch_SetContinuousScan function.
  4. Set up the list of connections using the niSwitch Configure Scan List VI or the niSwitch_ConfigureScanList function. Refer to Scan Lists for syntax information.
  5. Initiate the scan using the niSwitch Initiate Scan VI or the niSwitch_InitiateScan function. The first entry in the scan list is executed and the switch waits for software triggers to execute the subsequent entries in the list.
  6. Execute each set of connections in the scan list by calling the niSwitch Send Software Trigger VI and the niSwitch_SendSoftwareTrigger function.
  7. Terminate the scanning operation using the niSwitch Abort Scan VI or the niSwitch_AbortScan function.
  8. Release resources using the niSwitch Close VI or the niSwitch_close function.

Refer to the niSwitch Software Scanning example for an illustration of a basic software scanning application.

Note Note  Some devices may not support scanning. Refer to your device book for more information about supported features.


Not Helpful