My team is trying to get a Vex Pro Spike to run an AndyMark PG71 Gearmotor. We’ve gotten the Spike to pulse once when we press enable on the Driver Station, and the motor runs as well, but we can’t get the Spike to run longer or respond to a joystick input. We’ve checked over our program and we can’t find anything that shouldn’t be causing a problem.
We also have a similar problem running our spike relays. When trying to control them by having one button run them forward and one in reverse, the light flickers and sounds can be heard that sound like shorting or arching. All wiring and programming are in good order, have been triple checked, and several different programming methods have been attempted. When holding down the button to run the spike, the light on the sidecar as well as the spike itself flickers on and off, and when tested with a meter the voltage is flickering as well. When trying to run the spike in the opposite direction the proper light lights on the sidecar (still flickering) but the light on spike does not change direction. We have tried using a different joystick to the same end. And yes, in the program in the Begin.vi the relay is set to run in both directions. Could there be some problem with the default program in which it isn’t refreshing joystick values quickly enough?
Also, I have programmed the spikes to run always forward or always reverse with no control method. This works fine, but as soon as trying to control with a button is where we encounter problems.
You’re switching the Spike between OFF and ON. Off supplies Battery = on both of its output terminals, and ON supplies Battery +, again on both of its output terminals. A motor connected between the terminals won’t run in either case.
You most likely want to switch the Spike between OFF and FORWARD, or maybe between OFF and REVERSE.
This is a very specific symptom with an obvious (once you know it) cause.
Your first button is choosing whether to run the Spike forward or turn it off. Your second button is choosing whether to run the Spike reverse or turn it off. With a button pressed, those two choices are fighting each other. The Spike either gets turned on and then off again, or turned off and then on again, each time through Teleop.
What you can to do instead is to have the first button choose whether to run the Spike forward or ask the second button what it wants to do. The second button will have the opportunity to run the Spike reverse or turn it off, but only if the first button isn’t already running it forward.
You can also do some funny math with the buttons, with the first button selecting a value of either 0 or +1 and the second selecting a value of either 0 or -1, then add them together. Use the sum as the selector of a three-way Case, with -1 setting the Spike reverse, +1 setting it forward, and 0 turning it off.
I tried that, and it stopped pulsing completely. I tried setting it up through a joystick control, but it only resumed the short pulse when we enable it and still isn’t working properly.
Apparently another team member was able to get the Spike to run using an Arduino, but I’m not sure if that specific board was included in our parts.
Edit: We also tried using the sample program, and it still won’t respond. Apparently the program and mechanical/electrical parts aren’t working together.