The NI 9401 has 8 bi-directional digital IO lines. It is possible to read in a TTL signal, manipulate it, and then output it on another line, however there is inherently a delay because you have to read, manipulate and output sequentially. One programming technique that can be used to speed up this response time with a multicore computer is called pipelining. For more information on this please see this article: <a href="http://zone.ni.com/devzone/cda/tut/p/id/6425" target="_blank"> Programming Strategies for Multicore Processing: Pipelining</a>.
The primary limiting factor is the rate at which you can run your loop. This is limited by several things including the computation time, but on a windows operating system you'll top out somewhere on the order of 1 kHz. This will vary considerably on different computers so your results may be better or worse by a factor of 2 or more. If you require the feedback to be much faster then you may need to consider changing to a real-time operating system or FPGA programming/hardware.
I hope this helps and have a great day!