Go to Post The imbalance and vibration is telling you something, you are not listening. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2010, 23:33
wywern209 wywern209 is offline
Registered User
FRC #2202
 
Join Date: Jan 2009
Location: brookfield,WI
Posts: 4
wywern209 is an unknown quantity at this point
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   Spotlight this post!  
Unread 28-01-2010, 01:21
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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   Spotlight this post!  
Unread 28-01-2010, 11:06
lon.bushweiler lon.bushweiler is offline
Registered User
FRC #0093
 
Join Date: Jan 2009
Location: Appleton, WI
Posts: 11
lon.bushweiler is an unknown quantity at this point
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   Spotlight this post!  
Unread 28-01-2010, 12:19
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,855
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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:
  • Driver Station
    • Enable lit up on Operation tab
    • Status tab status lights
    • Error message window
  • Digital Sidecar
    • Robot Status LED
    • Power LEDS
    • Relay status LEDs
  • Spike Relay
    • Power orange, red/green - forward/backward
  • cRIO
    • Solenoid Module status LEDs
There are others of course, e.g., Power Distribution Panel breaker status LEDS, power status LEDS on most of the electronics, etc.

Telling us what some of these demonstrate to you helps us help you.


Quote:
Originally Posted by lon.bushweiler View Post
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.
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 28-01-2010 at 15:00.
  #5   Spotlight this post!  
Unread 28-01-2010, 13:18
Bryan Herbst's Avatar
Bryan Herbst Bryan Herbst is offline
Registered User
AKA: Bryan
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Minneapolis, Minnesota
Posts: 545
Bryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond repute
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.
__________________
Team 2052- KnightKrawler
Mentor and volunteer
  #6   Spotlight this post!  
Unread 28-01-2010, 20:06
wywern209 wywern209 is offline
Registered User
FRC #2202
 
Join Date: Jan 2009
Location: brookfield,WI
Posts: 4
wywern209 is an unknown quantity at this point
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   Spotlight this post!  
Unread 29-01-2010, 15:46
Bryan Herbst's Avatar
Bryan Herbst Bryan Herbst is offline
Registered User
AKA: Bryan
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Minneapolis, Minnesota
Posts: 545
Bryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond repute
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.
__________________
Team 2052- KnightKrawler
Mentor and volunteer
  #8   Spotlight this post!  
Unread 30-01-2010, 12:59
Paul 2912 Paul 2912 is offline
Registered User
FRC #2912
 
Join Date: Jan 2010
Location: DOT-NHTSA
Posts: 5
Paul 2912 is an unknown quantity at this point
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   Spotlight this post!  
Unread 30-01-2010, 21:13
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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   Spotlight this post!  
Unread 05-02-2010, 22:04
1jbinder 1jbinder is offline
Registered User
FRC #0852
 
Join Date: Jan 2008
Location: Athenian School
Posts: 35
1jbinder is an unknown quantity at this point
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 21:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi