Go to Post Let's not complain when we are getting magnificent items in the kit that teams just a few years ago could only wish for. - sanddrag [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 13-02-2014, 09:07
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Programming Victors in Java

The window motor on our robot is not working. Is the problem in our program??

if(operator.getRawButton(6))
{
Pulley.set(-1.0);
}
else if(operator.getRawButton(3))
{
Pulley.set(1.0);
}
else
{
Pulley.set(0);
}

if(operator.getRawButton(4))
{
Scoop.set(-1.0);
}
else if(operator.getRawButton(5))
{
Scoop.set(1.0);
}
else
{
Scoop.set(0);
}

if(operator.getRawButton(1))
{
Window.set(-1.0);
}
else if(operator.getRawButton(2))
{
Window.set(1.0);
}
else
{
Window.set(0);
}

Any help would be greatly appreciated!

Thanks!!
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2014, 09:11
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Programming Victors in Java

Can you also post the declaration and initialization of the Victor object?

The things that you have posted seem to be alright, do the other motors work correctly?
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2014, 09:16
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Programming Victors in Java

Yes, drive motors work (they are not listed in the program above) but none of the motors on victors work which are the ones in the program above.


What is the declaration and initialization of the Victor?
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2014, 09:17
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Programming Victors in Java

Quote:
Originally Posted by 18mfogwell View Post
Yes, drive motors work (they are not listed in the program above) but none of the motors on victors work which are the ones in the program above.


What is the declaration and initialization of the Victor?
The part where you say Victor Window = new Victor(port);
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2014, 09:18
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,717
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Programming Victors in Java

Quote:
Originally Posted by 18mfogwell View Post
Yes, drive motors work (they are not listed in the program above) but none of the motors on victors work which are the ones in the program above.


What is the declaration and initialization of the Victor?
It's the part where you did this:

Code:
Victor Window = new Victor(1);
Are the lights on the victors indicating the motors should be moving, are they blinking orange, or are they staying solid orange?
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2014, 09:18
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Programming Victors in Java

Here is our whole code.
Attached Files
File Type: java RobotTemplate1.java (5.4 KB, 17 views)
Reply With Quote
  #7   Spotlight this post!  
Unread 13-02-2014, 09:19
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Programming Victors in Java

The victors blink orange.
Reply With Quote
  #8   Spotlight this post!  
Unread 13-02-2014, 09:20
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,717
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Programming Victors in Java

Quote:
Originally Posted by 18mfogwell View Post
The victors blink orange.
That means that they are never getting communication with the cRIO, are you sure that the PWM's are plugged into the correct channels on the digital sidecar?
Reply With Quote
  #9   Spotlight this post!  
Unread 13-02-2014, 09:33
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Programming Victors in Java

Yes. We double checked that they were plugged in correctly, and we put on a brand new Digital Sidecar so no ports should be broken.

Any other ideas?
Reply With Quote
  #10   Spotlight this post!  
Unread 13-02-2014, 09:34
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,717
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Programming Victors in Java

Quote:
Originally Posted by 18mfogwell View Post
Yes. We double checked that they were plugged in correctly, and we put on a brand new Digital Sidecar so no ports should be broken.

Any other ideas?
It's not a code issue that I can see. What motor controllers are you using for your drivetrain?
Reply With Quote
  #11   Spotlight this post!  
Unread 13-02-2014, 09:35
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Programming Victors in Java

Quote:
Originally Posted by notmattlythgoe View Post
It's not a code issue that I can see. What motor controllers are you using for your drivetrain?
Jaguars for the driving.
Reply With Quote
  #12   Spotlight this post!  
Unread 13-02-2014, 09:36
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Programming Victors in Java

Quote:
Originally Posted by 18mfogwell View Post
Yes. We double checked that they were plugged in correctly, and we put on a brand new Digital Sidecar so no ports should be broken.

Any other ideas?
Can you take the PWM cable out of the Window motor Victor and verify that all of the pins are 100% straight? Plugging the PWM cable in correctly can sometimes take a few tries and if the pins are even a little bent they may not have been making good contact.

Based on the Victor datasheet, the problem that you are describing is an improperly wired PWM cable or no PWM cable at all.

Code:
Indication
: Flashing ORANGE indicator on power up.
Problem
: No PWM signal.
Possible Solutions
:
1.
Ensure the transmitter and receiver are powered ON.

2.
The PWM cable may be improperly connected.
Check wire color-coding at each end. Check that
the connector is not off a
pin at the receiver end.

3.
Check for a good PWM signal by connecting a
known good servo to the PWM extension cable. If
the servo does not move, this can indicate either:
a) a faulty receiver
b) an improperly connected cable
c) a bad PWM extension cable

Last edited by eddie12390 : 13-02-2014 at 09:38.
Reply With Quote
  #13   Spotlight this post!  
Unread 13-02-2014, 09:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,071
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Programming Victors in Java

Quote:
Originally Posted by 18mfogwell View Post
Any other ideas?
Determine if you are actually getting a PWM signal in your PWM cable.

You can use an oscilloscope, or a simple digital voltmeter*, or you can plug the cable into a known-good Jaguar or Talon to test it.

* ask if you want more detail how to do this
Reply With Quote
  #14   Spotlight this post!  
Unread 13-02-2014, 10:30
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Programming Victors in Java

We think that we have verified the problem is in the code. Can somebody look at the code again and double check for errors?

Thanks!
Reply With Quote
  #15   Spotlight this post!  
Unread 13-02-2014, 10:33
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,717
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Programming Victors in Java

Quote:
Originally Posted by 18mfogwell View Post
We think that we have verified the problem is in the code. Can somebody look at the code again and double check for errors?

Thanks!
The reason that I'm confident that its not the code is the fact that

Code:
Victor Scoop = new Victor(4);  //The motor in port 4 of the DS is called Flap
Victor Window = new Victor(5);  //The motor in port 5 of the DS is called Lift
Victor Pulley = new Victor(6);  //The motor in port 6 of the DS is called Roll
those three lines alone would cause the Victors' lights to become a steady orange when the robot is enabled. The fact that they are blinking orange makes me believe something is going on elsewhere. Unless of course there are errors appearing in the console when you run that we're not aware of. Are there any errors in the netbeans console when you run the code?
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 05:37.

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