Voltage protection of PNP Open-Collector Pull-Down Resistor Circuit
Going with some of your ideas, it could be just this:







simulate this circuit &ndash; Schematic created using CircuitLab

The 1.5k comes from 0.4V/250uA as pointed out by Bruce Abbott of the NI 9401 input requirement.