The Digital Input and Digital Output blocks are generic blocks for all DAQ boards supported by SLDRT, so there is no specific board-related mapping for these blocks. As an example, the hardware pin configuration for the PFI pins for "NI PCI-6221 37-pin" according to the NI documentation is the following: For this board, the pin mapping has been verified to be as follows:
- Channels 1 to 2: P0.0 to P0.1
- Channels 3 to 32: P0.2 to P0.31 (not available on NI 6221 37-pin)
- Channels 33 to 40: P1.0 to P1.7 (PFI0 to PFI7)
- Channels 41 to 48: P2.0 to P2.7 (PFI8 to PFI16) (not available on NI 6221 37-pin)
To use all digital and PFI input pins for this board, uncheck all the square boxes in the Board Setup, and specify [1,2] for digital pins and [33:40] for the PFI pins in the 'Input channels' parameter of the Digital Input block, as shown in the screenshots below: To check which pins correspond to hardware pins for other boards, you can use the same approach. Uncheck all the checkboxes in the Board Setup and then specify the full channel vector (e.g. [1:37] or [1:63]) in the 'Input channels'. Then run the model while demuxing the input signal to find from which pins the corresponding inputs are coming in.
Note that there are additional blocks besides Digital Input and Digital Out:
- Counter Input: Read from one or multiple counter-input channels
- Encoder Input: Read from one or multiple incremental encoder input channels
- Frequency Output: Write to one or multiple frequency or PWM output channels