Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Fisher Price Motor Variable Speed Moderation (http://www.chiefdelphi.com/forums/showthread.php?t=109160)

Anorak 15-10-2012 22:08

Fisher Price Motor Variable Speed Moderation
 
How does one change the speed on the variable speed Fisher Price Motors included in the KOP?

CalTran 15-10-2012 22:51

Re: Fisher Price Motor Variable Speed Moderation
 
Are we looking for a method to do so without a motor controller? Generally the speed is changed via programming and some sort of manipulator, usually a joy stick.

Anorak 16-10-2012 09:16

Re: Fisher Price Motor Variable Speed Moderation
 
No. We have a Victor on it, but we want to be able to change the speed in the programming. Is there like an open-source Fisher Price puts out for these motors?

(These are the motors you see on those toy-car things you see kids driving around these days...)

Alan Anderson 16-10-2012 20:39

Re: Fisher Price Motor Variable Speed Moderation
 
What are you using as a control system? Is it something fancy like a cRIO? Something simpler like a VEX Cortex? Something even simpler like an Arduino? Something super-simple like a PIC? How are you programming it?

Anorak 16-10-2012 23:19

Re: Fisher Price Motor Variable Speed Moderation
 
Quote:

Originally Posted by Alan Anderson (Post 1190637)
What are you using as a control system? Is it something fancy like a cRIO? Something simpler like a VEX Cortex? Something even simpler like an Arduino? Something super-simple like a PIC? How are you programming it?

No, we have a cRIO to control it, and are programming it in C++

artdutra04 17-10-2012 10:45

Re: Fisher Price Motor Variable Speed Moderation
 
Quote:

Originally Posted by Anorak (Post 1190660)
No, we have a cRIO to control it, and are programming it in C++

Are you using the correct variable types in your code? It sounds like you are using an int or char, which would only allow you to use three speeds.

You should be using a float, which can contain nearly any* decimal value. The speed controller classes, such as Victor, require a value between -1.0 and 1.0. To run at any speed other than full, simply send values like -0.62 or 0.48 or 0.11 or -0.88.


* Within a reasonable magnitude. See this for more info: http://en.wikipedia.org/wiki/Floating_point

EricH 17-10-2012 12:33

Re: Fisher Price Motor Variable Speed Moderation
 
You know...

In terms of coding, FPs aren't all that different from CIMs if they're controlled by a Victor (or, for that matter, a Jaguar). I'm willing to bet that you've got some variable-speed CIM code somewhere around (probably in the drive code). Take a look at that and see if you can't figure out how to copy and adjust it to get the FP working.

Alan Anderson 17-10-2012 12:46

Re: Fisher Price Motor Variable Speed Moderation
 
You're using C++, a cRIO, a Victor, and a Fisher-Price motor. You want to control the speed of the motor using software? What you're asking is such a basic part of programming an FRC robot that I have to wonder if I don't understand the question.

Pretend that the software is already done and working, and describe how you want to control the speed. Try to be as specific as you can, like "pulling back a little on a joystick will make the motor run slowly forward, pushing forward a lot will make the motor run quickly backward," that sort of thing. That'll help explain more clearly what you want the software to do.


All times are GMT -5. The time now is 04:39.

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