![]() |
Spike relay code not working
My team has gotten code to download to the robot however the code that we used to utilize the spike relay is not doing anything. We are using windriver if that helps. Thanks in advance for any replies.
|
Re: Spike relay code not working
Without seeing the code, and without knowing what you want it to do, we can't tell you whether it is correct.
But before we start down the path of troubleshooting software, there is a question which must be asked: Are you clicking the button in the Driver Station operations screen to enable the robot when you try to run the code? |
Re: Spike relay code not working
Another thought is that the PWM connector on the Spike and speed controllers are somewhat finicky. They will look like they are connect but are actually not. Try re-seating the cable a couple times to see if that changes anything.
|
Re: Spike relay code not working
I'm with Alan on verifying the simple things first.
Develop a checklist for yourself that lists all the available statuses you should be checking that indicate proper and correct operation. Know what the blinking and non-blinking lights mean. These are just a few:
Telling us what some of these demonstrate to you helps us help you. Quote:
|
Re: Spike relay code not working
If you have gone through the above checklist(s), then here is some important information to provide-
How do you know the relay is not functioning properly? If there is simply no mechanical action happening, then it could just as well be an electrical problem as a programming problem. Check the lights on the relay itself- Are they changing? What color are they? The sidecar and dashboard also have indicator lights. Check those. Also be sure to check the relay's fuse, just in case. Finally, it is important to list all of the steps you have already taken, and what their result was. If you determine it to be a code problem, then you should provide snippets of the relevant code. We cannot help troubleshoot code if we don't know what is there. |
Re: Spike relay code not working
bool trigger= stick.GetRawButton(3);
float potentiometerreading= potentiometer.GetAngle(); if(trigger) { fan.Set(Relay::kForward); } if (potentiometerreading>0) { fan.Set(Relay::kOn); } ---------- Here is the code we have right now. Our mentor is wondering if we should have used digital output instead of the relay. |
Re: Spike relay code not working
Once again, what is telling you that the spike is not working?
When you say it isn't doing anything, do you mean that there is no light, or that the light is not changing color? If there is no light, then it is a wiring problem. The relay is not connect to the PDB properly, the relay is not set properly (or is blown), or the PWM cable is not properly attached. If there is a light and it is not changing color, then you know that it is a coding problem. As for digital output- no. If the fan is attached to a spike, then the PWM cable should go to a relay output on the side car, and you should use the relay code. |
Re: Spike relay code not working
Did you get your issues resolved? We are having the same problem with labview not able to get the relay outputs working on the side car!
|
Re: Spike relay code not working
It is very frustrating not to be able to offer constructive help to teams having problems when they don't give enough detail about their problems. When people with experience in the domain ask questions, please answer them if you want to help them help you.
If you are having similar problems, answers to the same questions will get you much better assistance. |
Re: Spike relay code not working
We are having similar problems. The spike is orange, but when i create a relay object and I try to set it to go forward, nothing happens. It seems like the spike will not turn on. The one weird thing i noticed is that the light on the digital sidecar that usually flashes when disabled, is not flashing. We tried switching digital modules and digital sidecars, but neither of these fixed the problem. The spike is plugged into relay port 1.
|
| All times are GMT -5. The time now is 02:03. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi