|Download Help (Windows Only)|
A scan list is a string composed of channel names and characters that define connections, disconnections, triggering, and timing of the scan.
The following table shows characters that can be used in a scan list when programming with NI-SWITCH.
|->||Used in a connect action (channel1->channel2). For example, the string ch0->com0 connects CH0 to COM0.|
|~||Used with '->' in a disconnect action (~channel1->channel2). Valid only in No Action mode. For example, ~ch0->com0 means disconnect CH0 and COM0.|
|;||Wait for debounce, send scan advanced output signal*, then wait for trigger input|
|&||Separates connect and/or disconnect actions. For example, the string ch0->com0 & ch9->com1 means connect CH0 to COM0 and CH9 to COM1 (in no particular order and with minimal delay).|
|&&||Wait for debounce. For example, ch0->com0 && ch9->com1 means connect CH0 to COM0, wait for the relays to settle, then connect CH9 to COM1.|
|:||Used in a channel range (channelX:Y, where X and Y are integers). Text containing a channel range represents multiple scan list entries. For example, the string ch0:7->com0; represents eight scan list entries. A semicolon must appear after the connect action using a channel range.|
|*The switch only sends a scan advanced output signal if a relay is connected in each scan list entry. For example, in No Action mode, if you only disconnect a relay in a scan list entry, the switch does not send a scan advanced output signal. The scan list entry ch1->com1 & ~ch0->com0; would result in the switch sending a scan advanced output signal, but the scan list entry ~ch0->com0; would not. When a multiple module scan list contains multiple semicolons in a row (for example, ch0->com0;;;;), the switch sends a scan advanced output signal only for the first semicolon in the series.|
|Tip NI-SWITCH ignores white space and line returns. Use these to format the appearance of lengthy scan lists.|
A scan list entry is the text delimited by semicolons (;). Scan lists are composed of one or more scan list entries. For example, the following scan list contains two scan list entries:
The scan mode affects how the driver interprets the scan list. Typical scanning applications use the Break Before Make scan mode.
|Break Before Make (default)||Connections from the previous scan list entry are automatically disconnected before executing the current scan list entry. Disconnect actions, such as ~channel1->channel2, are not valid in this mode.|
|No Action||Connections remain connected until they are explicitly disconnected by a disconnect action.|
|Break After Make||Currently not supported.|
Scan Mode: No Action
Scan List: ch0->com0; ~ch0->com0 && ch1->com0; ~ch1->com0 &&
Scan Mode: Break Before Make
Scan List: ch0->com0; ch1->com0;
The scan list in this example is equivalent to the scan list in Example 1. Notice that the disconnect actions in Example 1 are no longer required.
Scan Mode: Break Before Make
Scan List: ch0:1->com0;
This scan list is equivalent to Example 1 and Example 2. This scan list uses a channel range to reduce keystrokes.