Solution
The encoder outputs a differential TTL signal whereas the NI-9401 expects a single ended one. Connecting only one of the two wires of a differential connection pair might work but there will be sporadic strange counting behavior due to signal noise and level drifts.
There are three possible solutions to the issue described above:
- Use a single-ended encoder instead of the differential one.
- Use a module that features differential TTL input like the NI-9411 instead and fully wire the encoder's differential signal pairs to it.
- Use a signal converter to convert the differential TTL signals to single-ended TTL ones.