Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Spikes are not working (http://www.chiefdelphi.com/forums/showthread.php?t=125677)

ArzaanK 02-02-2014 13:11

Spikes are not working
 
Hi Chief Delphi,

We are having some problems with our spikes. Our spike is plugged into relay 8 on the digital sidecar, and we have the 12V and the GND prongs plugged into the power distribution board. The colour of the LED on the spike is orange. We also have a 20 amp breaker in the spike.

We used the following code to get the relay running.

Code:

Relay *compressor;
compressor = new Relay (8)
if(primaryController->GetRawButton(1)){
//primaryController is our joystick. Drive code works fine with this joystick.
compressor->Set(Relay::kForward);
}
else{
compressor->Set(Relay::kOff);
}

We have used the same code to get spikes running on robots a few months ago. We have also tried replacing "kForward" with "kReverse" and "kOff".

When I enable the robot, I press and hold the button to enable the spike, nothing happens. Also, we put a multimeter to the ground and signal ports on the digital sidecar and we did not get a voltage reading.

Our team is stumped at what is wrong. The wiring looks to be correct, and we know the code works since we have used the exact same code before.

We have tried this setup on two different robots, with two different power distribution boards, two different digital sidecars, multiple PWM cables and multiple spikes.

Any help would be greatly appreciated.

mega900997 02-02-2014 13:30

Re: Spikes are not working
 
Are you sure that the button you are pressing is button 1? Try printf on the button to figure out which button is 1.

ArzaanK 02-02-2014 13:53

Re: Spikes are not working
 
Quote:

Are you sure that the button you are pressing is button 1? Try printf on the button to figure out which button is 1.
I am sure that I am pressing the right button. I have used the same button to control many things in the past. Also, if I open up "Set up USB game controllers" in windows, when I press the button that I am pressing, button one is what illuminates.

Alan Anderson 02-02-2014 14:08

Re: Spikes are not working
 
Do you get any lights on the Digital Sidecar next to the relay pins?

Is the Digital Sidecar correctly powered, with battery voltage present on its power input and all three of the power LEDs brightly lit?

What pattern is the Robot Signal Light flashing when you have the robot enabled?

ArzaanK 02-02-2014 14:23

Re: Spikes are not working
 
Quote:

Do you get any lights on the Digital Sidecar next to the relay pins?

Is the Digital Sidecar correctly powered, with battery voltage present on its power input and all three of the power LEDs brightly lit?

What pattern is the Robot Signal Light flashing when you have the robot enabled?
No, I do not get any lights on the digital sidecar next to the relay pins.

Also, the digital sidecar is correctly powered, we have nine victors on the robot which all work just fine.

The robot signal light flashes in its normal pattern, as if nothing were wrong with the robot.

Alan Anderson 02-02-2014 15:30

Re: Spikes are not working
 
You didn't quite answer all my questions, but I'll assume that your understanding of "correctly powered" and "normal pattern" is correct.

Where in your program is the code you showed us? It looks correct, but whether it will work depends on where it is placed. Give some larger context, please.

vgdude999 02-02-2014 16:16

Re: Spikes are not working
 
Does the light on the spike change at all when you hit the button? If it doesn't, try with another PWM cable. Also try using a different port on the sidecar if you can.

tomy 02-02-2014 16:27

Re: Spikes are not working
 
What programming language are you using?

DonRotolo 02-02-2014 17:02

Re: Spikes are not working
 
Quote:

Originally Posted by ArzaanK (Post 1336355)
No, I do not get any lights on the digital sidecar next to the relay pins.

Quote:

Originally Posted by vgdude999 (Post 1336418)
Does the light on the spike change at all when you hit the button?

vgdude999, If the status lights next to the relay ports are not lighting, the spike light and PWM cables are irrelevant...

parkedraccoon 02-02-2014 17:17

Re: Spikes are not working
 
I had a similar problem earlier this season. I tried switching the layout of cRIO modules, various different cRIOs. Eventually, I believe I finally fixed it by imaging the cRIO to the 2014 image. (Make sure you are also using the matching 2014 C++ installation, including the updated WPILib) Seems strange, but it seemed to fix the problem.

On a related note, you probably should have a pressure sensor to help switch the compressor on/off.

ArzaanK 03-02-2014 16:20

Re: Spikes are not working
 
Quote:

I had a similar problem earlier this season. I tried switching the layout of cRIO modules, various different cRIOs. Eventually, I believe I finally fixed it by imaging the cRIO to the 2014 image. (Make sure you are also using the matching 2014 C++ installation, including the updated WPILib) Seems strange, but it seemed to fix the problem.

On a related note, you probably should have a pressure sensor to help switch the compressor on/off.
I imaged the cRio using the 2014 cRio imaging tool. (The cRio we are using is brand new). Is there any way to specifically use the 2014 image which I am missing?

Also, we were just testing the relay for the compressor, not the actual compressor itself which is why the pressure switch is missing.

Alan Anderson 03-02-2014 17:26

Re: Spikes are not working
 
The version 52 cRIO image will be available when you install the update for whatever language you are programming with.

parkedraccoon 03-02-2014 19:36

Re: Spikes are not working
 
Quote:

Originally Posted by ArzaanK (Post 1337029)
I imaged the cRio using the 2014 cRio imaging tool. (The cRio we are using is brand new). Is there any way to specifically use the 2014 image which I am missing?

Also, we were just testing the relay for the compressor, not the actual compressor itself which is why the pressure switch is missing.

Updated WPILib Workbench update will provide you with the required v52 cRIO image (you clicked the 'format cRIO button right?) and should also extract the updated files for WindRiver to use. That seemed to fix when I was having the same problem.

ArzaanK 04-02-2014 12:23

Re: Spikes are not working
 
We fixed our issue. Apparently, our ribbon cable was not held down with screws in the cRio, which resulted in not enough pressure being applied on the pins.

Thank you all for your help.


All times are GMT -5. The time now is 10:27.

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