How Can I Programmatically Set Line Direction to Output with NI-9401 in LabVIEW FPGA?

Updated Dec 28, 2022



  • NI-9401
  • CompactRIO Chassis


  • LabVIEW FPGA Module

I am using NI-9401 digital I/O module in my cRIO application and I am trying to set the direction of one of the digital lines to output. With other modules (such as NI-9403) I usually use the FPGA I/O Method Node called "Set Output Enable", but I cannot find this method for my module. How can I proceed?

For NI-9401 digital I/O module, the channels are divided into groups of four, called nibbles. Each channel in a nibble must have the same line direction as the others, so the channels cannot be configured in a completely independent manner. The "Set Output Enable" method is a channel-related method so this is the reason why you cannot find it when working with this module.
For NI-9401 you should instead use the "Set Line Direction" method. In order to implement it in your application you should follow three simple steps:​
  1. Put an FPGA I/O Method Node on the block diagram;
  2. Select your NI-9401 module by right-clicking the node and using the Select Item option;
  3. Right-click on the node and choose Select Method » Set Line Direction.

This method will set line direction on a per-nibble basis.