Solution
If your board is an Industrial Digital I/O (DIO) board that can output 24V or greater like the NI 6512, NI 6514, NI 6516, NI 6519 or NI 6232, the digital outputs require an external power supply connected to the VCC pins of the respective output port. These devices use the external power supply to source current out of the digital output pin.
For a digital output example, if you are using Port 0 on your device as an output port, you must connect Port 0's VCC pin to the positive lead of an external power supply and Port 0's COM (GND) to the negative lead of the power supply. The power supply voltage should range from 5V to a voltage below the maximum digital output voltage rating of the card. The digital output port will then switch between 0V and the supplied voltage.
Depending on your board, there may also be +5V reference pins that are not working. This is because the voltage is derived from the user-provided VCC. If the VCC is powered using an external power supply then the 5V lines will work.
Other Industrial DIO boards only have sinking outputs instead of sourcing outputs. These devices also require an external power supply connected to the VCC and GND pins on the output port you are using, but the way you connect a load to the output line is different than if you are using a device with sourcing outputs. Refer to Choosing the Right Industrial Digital I/O Module for Your Digital Output Sensor for more information on choosing between sinking vs. sourcing outputs.
To figure out if your NI 651x device has sinking or sourcing outputs, refer to the NI 651x Datasheet.
For more information about how to connect the power supply to the correct pins on your device, see the user manual for your device or module.