ROBOTC.net forums
http://robotc.net/forums/

Claw, Cortex program help
http://robotc.net/forums/viewtopic.php?f=11&t=3263
Page 1 of 1

Author:  Sirup96 [ Tue May 10, 2011 5:56 pm ]
Post subject:  Claw, Cortex program help

I have a simple code but sometimes in operation the clawMotor will stop running and i have to move it by hand to reset it. think it is in the programing but i'm still new to VEX so a code error is not out of the question. I have a robot arm that picks up parts by using the joystick buttons. But5D and But5U, as well as But6U and But6D. The five button controls slower and fine tuned claw control, and 6 is a stronger more powerful close on the part so it does not slip out. The coding is...


#pragma config(Motor, port3, clawMotor, tmotorNormal, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{
while (1 == 1)
{
if(vexRT[Btn6D] == 1)
motor[clawMotor] = 80;
else if(vexRT[Btn6U] == 1) // this part is the fast opening and is mostly unused.
motor[clawMotor] = -80;

else if(vexRT[Btn5D] == 1)
motor[clawMotor] = 40;
else if(vexRT[Btn5U] == 1)
motor[clawMotor] = -40;
else
motor[clawMotor] = 0;
}
}

Author:  Sirup96 [ Tue May 10, 2011 8:11 pm ]
Post subject:  Re: Claw, Cortex program help

when the arm is fully extended the claw will not extend. it is a two pivot arm and the power seam high. i am testing right now to find the bug

Author:  bfeher [ Thu May 12, 2011 11:56 am ]
Post subject:  Re: Claw, Cortex program help

Hi Sirup96,

I downloaded your code and it works fine for me. I played around with it and still everything was working fine. Perhaps your mechanism has some kind of physical stop or is getting too tight or difficult for the motor to move it? The code seems to work fine...

Sorry that I couldn't be of more help,

Author:  Sirup96 [ Thu May 12, 2011 8:08 pm ]
Post subject:  Re: Claw, Cortex program help

Hey thanks for the try man. i was only able to cause the problem when the arm is fully extended so i'm looking into a power levels. i got the 1.6 Amp 7.2v battery hocked to the cortex. If i could i would hook more power to it and see it i would change. Your the only feedback i got and with robotics event happening soon i don't think i can order a bigger battery in time. Would any one know if hocking four motors under pressers of weight of around 2kg or 4.4 Lbs draws the peck off the battery listed above. I'm right now looking into gear box system but i have done it to big before that i actually broken a gear inside of if for the claw. Near as i can tell the problem is physical or a battery power, or the program witch i have not found a problem yet.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/