Quick Teleop Question

Oh wise people of Chief Delphi ::rtm:: , Team 4327 comes to you with a request. We are struggling to understand why a function known as the “Indexer” on our robot is not working. Everything electrical is okay (no loose wires, bad spike relay, etc.), but when we command the robot to index, the robot does not. :frowning:

So can you members wiser than we look at the code specifically to the “Indexer” and pitch ideas as to why it may not be functioning? Any responses are appreciated. Thanks! :slight_smile:

John Burdette
Mentor Team 4327





That’s a good question.
From your code it seems like the indexer is spike relay asked to move forward at the press of a button.
Is that it?
Check if the spelling is the same in the Teleop and in the Begin VIs, it’s case-sensitive.

By the way, maybe it’s too late but I’d suggest adding a control-loop(such as an encoder and a PID loop for a set RPM) for your shooter for more consistency. The way it works it is - as the battery weakens the shooter will spin slower, with a control-loop it will not depend on the battery.

There’s a little red dot on the value input to the Relay Set function. That means that what’s wired to it is not what it expects. I can’t tell from a static picture, but it’s likely that you managed to copy the “Forward” and “Off” constants from a solenoid instead of a Relay function. I’d delete them along with the Select they’re connected to, then recreate them (right-click the Relay Set input terminal and choose Create -> Constant), if only to get rid of the coercion dot.

But I think the actual values underlying the different constant types are compatible, so that probably shouldn’t actually cause things not to work.

What does happen when you click Button 4 of the controller? Do you see its indicator light up on the Dashboard? Does the Digital Sidecar green LED associated with the relay light up? Does the Spike’s LED change from yellow/orange to green? Have you tried running Robot Main and probing the values in Teleop to see whether they do what you expect?

First, thank you for the quick responses so thoroughly investigating the issue!

To ykarkason, yes, at the push of a button, the motor is to run forward. I will have my captain of programming look into the Begin VIs for any spelling errors.

To Alan, our robot is since bagged for our event starting tomorrow evening so I can tell you more then. All I can say for certain right now is that when we press the appropriate button, the spike relay light goes from “orange” to nothing. No light. We looked into this and believe it means we are telling the spike relay to go both forward and reverse at the same time.

So we were curious about the code to see if that was what we were unintentionally doing.