04-19-2011 09:30 PM
I want to wire a shaft encoder with NPN open collector signal wires to a NI 9403 DI/O module in a compactRIO. Ideally I want to do this without requiring the use of an additional external voltage source and pull up resistors. My idea was to use extra DI/O lines configured as outputs set to logic high and wire these (possibly adding resistors) to the signal input lines connected elsewhere on the DI/O module.
My questions are:
(1) Will this work?
(2) Can connecting a DI/O output pin to ground do damage to the module?
04-20-2011 05:09 PM
This would be a bad idea, the DO can output 63mA maximum and could definitly blow your card, also connecting DI/O output to ground could short and cause damage to your device. This is not recommended.
05-03-2011 06:54 AM
Your idea should work if:
1) Use a pull-up resistor (10K or so) from a DO line acting as a power supply to the O.C. output of the encoder.
2) Connect the pulled up O.C. output to a DI line to read the encoder channel.
3) Repeat 1&2 for each encoder channel you want to read (A, B, and Z).
No sharing between signals. 3 signals, 3 pull-up resistors, 3 output channels set to high, 3 input channels to read.
or use a different DIO module that has built in pull-ups.