Solution
The 9401 can be configured for directional line measurements by nibble (a nibble is the name given to a group of 4 channels). Each group of four channels (channels 0-3 and channels 4-7) must be configured to either input or output. All channels may be input, all may be output, or one nibble may be input with the other nibble set to output. The channels cannot be configured individually.
Using the NI-9401 in a cDAQ Chassis
When used in a CompactDAQ 9172 chassis, you can use counter inputs with a nibble set to input, and counter outputs with a nibble set to output. The following link explains how to configure 4 pins as inputs and 4 pins as outputs with DAQmx :
Configuring an NI-9401 for Bidirectional DIO by Nibble with DAQmx
Using the NI-9401 in a cRIO Chassis
When using the NI 9401 in a CompactRIO chassis, the way to configure the module for input or output is as follows:
- The initial input/output configurations can be configured from the module properties dialog box. To get to module properties, right right-clicke module in the Project Explorer and click Properties.
Note: the CompactRIOs with DAQmx will have the Real-Time Scan Resources and Real-Time Resources. The Properties options mentioned above will only be available if the module is placed under the Real-Time Scan Resources. If you need to place it under the Real-Time Resources, then you need to follow the steps provided for DAQ Chassis.
- You can also change the direction of the lines programmatically using I/O method nodes. You can create a method by going in the Functions Palette and selecting Programming » FPGA I/O » I/O Method. Once you place the method, right-click it and go to Select Item » Mod(x). Now click on Method and select Select Line Direction.