Go to Post I'm sure you can come up with something, with a bit of warped thought! ... and if not, warped thinking is what your team's Engineers are for! :) - kmcclary [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-01-2013, 18:14
NegaNexus NegaNexus is offline
Registered User
AKA: Thys Ballard
FRC #2130 (Alpha+)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Coeur d'Alene, Idaho
Posts: 16
NegaNexus is an unknown quantity at this point
Compressor

Hello, I am from the TeraViks #3145. As of right now, we're stuck. We are stuck on programming the compressor to work. Please help us with any information you have on this predicament. Thanks! Sample:
Code:
#include "WPILib.h"


class RobotDemo : public SimpleRobot {
	Compressor *compressorPointer;

	public:
		RobotDemo() {
			compressorPointer = new Compressor(4, 2);
			compressorPointer->Start();
		}

		~RobotDemo() {
			delete compressorPointer;
			};
};
Reply With Quote
  #2   Spotlight this post!  
Unread 15-01-2013, 21:25
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: Compressor

What do you expect to happen? What is happening instead?
Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2013, 21:39
NegaNexus NegaNexus is offline
Registered User
AKA: Thys Ballard
FRC #2130 (Alpha+)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Coeur d'Alene, Idaho
Posts: 16
NegaNexus is an unknown quantity at this point
Re: Compressor

It does absolutely nothing. It is supposed to start, and then we'll do further testing.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2013, 22:20
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: Compressor

How exactly do you have the compressor and pressure switch wired? Be as detailed as you can.

Does anything work on the robot -- any motors or relays?
Reply With Quote
  #5   Spotlight this post!  
Unread 15-01-2013, 22:40
NegaNexus NegaNexus is offline
Registered User
AKA: Thys Ballard
FRC #2130 (Alpha+)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Coeur d'Alene, Idaho
Posts: 16
NegaNexus is an unknown quantity at this point
Re: Compressor

It does absolutely nothing. It is supposed to start, and then we'll do further testing.
Reply With Quote
  #6   Spotlight this post!  
Unread 16-01-2013, 01:32
NegaNexus NegaNexus is offline
Registered User
AKA: Thys Ballard
FRC #2130 (Alpha+)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Coeur d'Alene, Idaho
Posts: 16
NegaNexus is an unknown quantity at this point
Re: Compressor

I have no idea why there are two of the same posts, but anyway. They are plugged it to relay 3, digital I/O 4. Everything we tested so far works besides the solenoid and compressor.

Sent from my Nexus 7
Reply With Quote
  #7   Spotlight this post!  
Unread 16-01-2013, 07:42
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: Compressor

That's not nearly enough detail for me to give troubleshooting advice. Which individual pins of the Digital Sidecar are connected, and to what? The compressor has two power wires; where do they go?

Pictures would help.
Reply With Quote
  #8   Spotlight this post!  
Unread 16-01-2013, 10:42
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Re: Compressor

Your sample code states the compressor is digital i/o 4, and relay 2, you say you are using relay 3; is that your issue?

Try calling compressor->Start() in your teleop/autonomous loop.

The code you presented is fine otherwise, though I would opt to directly instance compressor, rather than allocating it dynamically, but it's a point of preference. I also prefer to derive from IterativeRobot instead of SimpleRobot

Code:
class Robot2012 : public IterativeRobot
{
Compressor compressor;
public:

Robot2012(void):compressor(DIGITAL_CHANNEL_1_INPUT_COMPRESSOR_SWITCH, RELAY_CHANNEL_1_COMPRESSOR_RELAY)
{
}

void DisabledInit(void)
{
    compressor.Stop();
}
void AutonomousInit(void)
{
     compressor.Start();
}
void TeleopInit(void)
{
     compressor.Start();
}

Here's a link to my 2012 code: https://github.com/TeamExcel/Project.../Robot2012.cpp
Reply With Quote
  #9   Spotlight this post!  
Unread 16-01-2013, 18:31
NegaNexus NegaNexus is offline
Registered User
AKA: Thys Ballard
FRC #2130 (Alpha+)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Coeur d'Alene, Idaho
Posts: 16
NegaNexus is an unknown quantity at this point
Re: Compressor

I didn't post the updated code, which has (4, 3) now. Sorry about that. It still won't work either way. To Mr. Anderson, I'll get a picture to you tomorrow.

Thanks,
Thys
Reply With Quote
  #10   Spotlight this post!  
Unread 19-01-2013, 00:49
NegaNexus NegaNexus is offline
Registered User
AKA: Thys Ballard
FRC #2130 (Alpha+)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Coeur d'Alene, Idaho
Posts: 16
NegaNexus is an unknown quantity at this point
Re: Compressor

We fixed it. Thanks for trying though.
Reply With Quote
  #11   Spotlight this post!  
Unread 19-01-2013, 09:00
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: Compressor

Quote:
Originally Posted by NegaNexus View Post
We fixed it. Thanks for trying though.
Would you mind telling us what the problem was and what you did to make it work? Others might have similar problems, and your solution might help them.
Reply With Quote
  #12   Spotlight this post!  
Unread 20-01-2013, 14:43
TeraViks's Avatar
TeraViks TeraViks is offline
Registered User
AKA: Brian Induni
FRC #3145 (TeraViks)
Team Role: Coach
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Hayden, Idaho
Posts: 33
TeraViks is a jewel in the roughTeraViks is a jewel in the roughTeraViks is a jewel in the roughTeraViks is a jewel in the rough
Re: Compressor

On behalf of NegaNexus (one of my programmers), thank you to all who helped. This was one of those instances where we had a few different issues that makes troubleshooting extremely difficult and frustrating.

Here's what we found was the cause of our issues:

1. We had a flaky network cable!
2. We had a flaky Windriver install (or some setting was changed that shouldn't have been)

Once we got in to a methodical test & record results process, we were able to diagnose the bad network cable. This then led to changing to a different computer with WR and all systems worked as they should.
__________________
Brian
FIRST team 3145 (notice I'm doing Dean's homework!)
The TeraViks
Coeur d'Alene, Idaho
Reply With Quote
Reply


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


All times are GMT -5. The time now is 14:15.

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