|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||||
|
|||||
|
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? |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||||
|
|||||
|
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. A good thought. This problem doesn't affect the Relay status lights on the Digital Sidecar, so checking those are the best indicator or whether your code is working as it should. If the Digital sidecar Relay LEDs are turning on and of, then it'd be downstream of that, meaning the PWM wiring from the Sidecar to the Spike. Last edited by Mark McLeod : 28-01-2010 at 15:00. |
|
#5
|
||||
|
||||
|
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. |
|
#6
|
|||
|
|||
|
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. |
|
#7
|
||||
|
||||
|
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. |
|
#8
|
|||
|
|||
|
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!
|
|
#9
|
|||||
|
|||||
|
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. |
|
#10
|
|||
|
|||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C++ Sample Code not working... | hm29168 | CAN | 5 | 27-01-2010 20:59 |
| Not Really Working Vision Code | linkhyrule5 | NI LabVIEW | 0 | 07-01-2010 18:45 |
| Incrementation Code not working | benhulett | Programming | 6 | 12-02-2007 17:39 |
| 2007 demo code not working | thefro526 | Programming | 4 | 12-01-2007 23:43 |
| Camera code not working.... | DemonYawgmoth | Programming | 5 | 11-02-2006 09:21 |