I am adding two DIO limit switches (named A & B) to DIO array currently consisting of one DIO limit switch (C).
A is on port 1, B is on port 2, and C is on port 3 of the RoboRIO onboard DIO.
C is outputting as expected using
DigitalInput C = new DigitalInput(3);
However, setting up A & B the same way,
DigitalInput A = new DigitalInput(1);
DigitalInput B = new DigitalInput(2);
does not work as expected. The .get() values of A and B do not change, and instead activating any of the digital inputs only alters C (pressing down on A, B, or C exclusively activates C).
Has anyone experienced a similar issue, and if so, can you share how you fixed it?
We haven’t ever seen cross talk like this between properly wired DIOs to the Rio.
How are they wired, and what does your code look like? How are you verifying they are set, etc?
The code looks like OP; the values are being properly read and outputted in code. They are custom circuits, but we are sending signal (confirmed using a multimeter). I’ll talk to our electrician to get your more information on the wiring.
Just to cover all bases, the circuit is only outputting 5v, right? We had some weird issues similar to this when we applied 12v to the dio ports (accidentally of course).
The limit switches are not powered. They are normally closed and pressing the whisker opens the switch. To make sure it was not an issue with the switches, we tried each individually in DIO3. All our switches worked. There was no crosstalk. In addition to the limit switch, there is an LED/220 ohm resistor connected to the normally open lead. When the switch is pressed, the input wire is no longer connected to ground but the LED/220 ohm resistor is now powered. Schematic included.
This sounds like it may be a faulty roborio- check that there’s not metal shavings in the dio pins (shouldn’t cause this behavior but won’t hurt to check) and I would contact NI. This is certainly very odd behavior.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.