NI 6221 (37-Pin) Device Physical Channels

NI-DAQmx Device Considerations

NI 6221 (37-Pin) Device Physical Channels

In physical channel names, Dev1 is the default device name for NI 6221 (37-pin) devices. You can change these names in MAX.

Analog Input

A 16-channel NI 6221 (37-pin) device has physical channels ranging from Dev1/ai0 to Dev1/ai15. You can configure only channels 0 through 7 in differential mode. When you configure a channel in differential mode, the channel is the positive input and channel plus eight is the negative input. For instance, if you configure channel 1 in differential mode, the positive input is channel 1, and channel 9 is the negative input.

Use only the physical channel name of the positive channel (not both) when creating a differential channel.

Analog Output

NI 6221 (37-pin) devices have two analog outputs corresponding to two analog output physical channels named Dev1/ao0 and Dev1/ao1.

Digital Input and Output

NI 6221 (37-pin) devices have two ports, port 0 and port 1. Port 0 has two digital I/O lines, Dev1/port0/line0 and Dev1/port0/line1. Port 1 has eight digital I/O lines, Dev1/port1/line0 through Dev1/port1/line7. Port 1 can be used as static digital I/O lines or input PFI lines, PFI 0..7. When any of PFI lines 0..7 is used as a digital I/O signal, it uses the physical channel name shown in the following table.

PFI Signal Physical Channel Name
PFI 0 Dev1/port1/line0
PFI 1 Dev1/port1/line1
PFI 2 Dev1/port1/line2
PFI 3 Dev1/port1/line3
PFI 4 Dev1/port1/line4
PFI 5 Dev1/port1/line5
PFI 6 Dev1/port1/line6
PFI 7 Dev1/port1/line7

Physical channel Dev1/port0 refers to both lines, Dev1/port0/line0:1, at once. Physical channel Dev1/port1 refers to all eight lines, Dev1/port1/line0:7, at once.

Counter Input and Output

NI 6221 (37-pin) devices have two counter/timers referred to by the physical channel names Dev1/ctr0 and Dev1/ctr1. Unlike the other I/O types, these physical channel names do not refer to terminals on the I/O connector but instead to circuits within the device. There are four primary terminals associated with each counter. These are the terminals used as the SOURCE, GATE, AUX, and OUT functions. NI-DAQmx has default values for these terminals. For counter input tasks, if you know whether your signal provides the SOURCE, AUX, or GATE function and wire your signal to the default, you do not have to set the Input Terminal attribute/property.

Counter SOURCE Default GATE Default AUX Default OUT Default
Dev1/ctr0 PFI 0 PFI 1 PFI 2 PFI 6
Dev1/ctr1 PFI 3 PFI 4 PFI 5 PFI 7

In addition, the NI 6221 (37-pin) has one frequency generator. The output terminal of the frequency generator is FREQOUT. The default for FREQOUT is PFI 5. When using FREQOUT, you can continue to use both ctr0 and ctr1 to perform other operations.