Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Talon Motors (http://www.chiefdelphi.com/forums/showthread.php?t=111396)

Arrowhead 16-01-2013 17:17

Talon Motors
 
How do you declare talon motors in a program?
I looked around but couldn't find any info on this.

Toa Circuit 16-01-2013 17:42

Re: Talon Motors
 
You just declare them like as with victors and jaguars- They use the same PWM signal.

Code:

Jaguar *motora;
Code:

motora = new Jaguar(1);
Basically, you do not need to code any differently for Victors, Jaguars, or Talons.

NotInControl 16-01-2013 17:57

Re: Talon Motors
 
In Java there is a Talon Class, there isn't a similar one under C++?

The Java implementation has different max,min, and deadband values for each of the motor controller used for generating the PWM signal.

So while, interchanging them may work, it may not be completely correct, at least on the Java side.

Joe Ross 16-01-2013 18:07

Re: Talon Motors
 
Quote:

Originally Posted by NotInControl (Post 1216781)
In Java there is a Talon Class, there isn't a similar one under C++?

Yes there is.

Quote:

Originally Posted by Toa Circuit (Post 1216771)
You just declare them like as with victors and jaguars- They use the same PWM signal.

If you use the Jaguar class with a Talon (and don't calibrate the Talon), you will end up with reduced range.

Arrowhead 16-01-2013 18:10

Re: Talon Motors
 
Quote:

Originally Posted by Toa Circuit (Post 1216771)
You just declare them like as with victors and jaguars- They use the same PWM signal.

Code:

Jaguar *motora;
Code:

motora = new Jaguar(1);
Basically, you do not need to code any differently for Victors, Jaguars, or Talons.

Ok, thanks for the info
All of the programmers on our team are completely new to FRC, so we are still learning a lot.

Toa Circuit 17-01-2013 09:27

Re: Talon Motors
 
Quote:

Originally Posted by Arrowhead (Post 1216789)
Ok, thanks for the info
All of the programmers on our team are completely new to FRC, so we are still learning a lot.

Actually, looking at the other people's posts, and realizing there actually is a Talon class in C++ (How did I miss that...) you might want to use the Talon class. Basically just substitute "Talon" for "Jaguar" for declaration and initialization, and everything else is the same.

Doron_Sivan 17-01-2013 11:26

Re: Talon Motors
 
You can declare a Talon in C++ by writing
Talon t1 = new Talon(TALON_PORT);
when TALON_PORT is an int for the port.

Beaware that the RobotDrive class automatically initiallize jaguars when declaring the defult constructor (when the parameters are numbers).
So when you use Talons don't decalre it like this:

RobotDrive drive = new RobotDrive(1, 2, 3, 4);

but like this
RobotDrive drive = new RobotDrive(new Talon(1), new Talon(2), new Talon(3), new Talon(4));

Doron

Arrowhead 18-01-2013 16:25

Re: Talon Motors
 
Also, is the min/max values for the talons the same as jaguars?
If not, what are the min/max values?

F22Rapture 18-01-2013 21:43

Re: Talon Motors
 
They're the same. -1 to 1.

Arrowhead 18-01-2013 21:55

Re: Talon Motors
 
Quote:

Originally Posted by F22Rapture (Post 1218259)
They're the same. -1 to 1.

Ok, thanks :)

Ether 18-01-2013 22:55

Re: Talon Motors
 

FWIW, under the hood they are not the same. Jag and Talon expect different min/max pulse widths.

That's why WPILib provides separate drivers for them.


Arrowhead 18-01-2013 22:56

Re: Talon Motors
 
Quote:

Originally Posted by Ether (Post 1218320)

FWIW, under the hood they are not the same. Jag and Talon expect different min/max pulse widths.

That's why WPILib provides separate drivers for them.


but on the programming side they are the same?

Ether 18-01-2013 22:57

Re: Talon Motors
 
Quote:

Originally Posted by Arrowhead (Post 1218323)
but on the programming side they are the same?

The purpose of the separate drivers is to present a common interface to the programmer.




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

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