View unanswered posts | View active topics It is currently Mon Dec 22, 2014 8:48 am






Reply to topic  [ 5 posts ] 
setServoTarget Cortex equivalence 
Author Message
Rookie

Joined: Sun Mar 23, 2014 8:09 pm
Posts: 3
Post setServoTarget Cortex equivalence
I’ve been using a VEX IQ clawbot. I use the setServoTarget(nMotorIndex, nPosition) to move the claw and arm.
I recently purchased a VEX Cortex clawbot. The setServoTarget doesn’t seem to work for the VEX Cortex. What code or function can accomplish the same thing (move the clawbot arm and claw) for the VEX cortex?
Thanks


Sun Mar 23, 2014 8:32 pm
Profile
Moderator
Moderator

Joined: Thu Jan 03, 2013 5:10 pm
Posts: 198
Location: The plateau north of the Ohio River Valley, also known as Cave Country.
Post Re: setServoTarget Cortex equivalence
Is it possible that you have to set the motor moving after you set the target? That's what I have to do on the mindstorms platform. You see, I don't actually use vex, so I could really be wrong here. That's just my suggestion.

_________________
I'm not a robot! I'm british! ~ quote from an asparagus
I am not a robot! I am a unicorn! ~ quote from a robot


Mon Mar 24, 2014 1:10 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 619
Post Re: setServoTarget Cortex equivalence
With the VEX Cortex servos, you actually just need to use the motor[servoName] command to assign a value from -127 to +127; -127 is the maximum position the servo can turn to in one direction, while +127 is the maximum position in the other direction. You can find more detailed information on the servo modules with the VEX Cortex here: http://www.education.rec.ri.cmu.edu/pro ... _servo.pdf

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Mon Mar 24, 2014 2:49 pm
Profile
Rookie

Joined: Sun Mar 23, 2014 8:09 pm
Posts: 3
Post Re: setServoTarget Cortex equivalence
JohnWatson - for the claw and arm I'm using a "2-wire motor 393" that comes with the clawbot kit. I'm not actually using a servo. Is there a way to make the motor act like a servo?


Mon Mar 24, 2014 4:36 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 619
Post Re: setServoTarget Cortex equivalence
rstar wrote:
JohnWatson - for the claw and arm I'm using a "2-wire motor 393" that comes with the clawbot kit. I'm not actually using a servo. Is there a way to make the motor act like a servo?


This will make things a bit more complicated, but it is possible to do; what you will essentially need is a feedback sensor (such as a potentiometer or a quadrature encoder) attached to the motor's output shaft to determine where the motor's rotation is versus where you want it to be. There is a very informative discussion about this on the VEX Forums (http://www.vexforum.com/showthread.php? ... r+position) that you may want to use for reference.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Mon Mar 24, 2014 4:59 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.