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

Motor Speed - Basic Question
http://www.robotc.net/forums/viewtopic.php?f=53&t=6969
Page 1 of 1

Author:  ShadyMaple [ Tue Oct 15, 2013 11:06 am ]
Post subject:  Motor Speed - Basic Question

Very basic question. Is there a way to MAX out the motor speed on a motor - using coding? We are just using Joystick control. We already changed the internal gears on the motors. Just wanted to see if there was a way to max out the motors in the code, unless they are already set at max value?

------------------------------------------------------------------------------------------------
Code:
#pragma config(Motor,  port2,           frontLEFT,     tmotorVex393, openLoop)
#pragma config(Motor,  port3,           backLEFT,      tmotorVex393, openLoop)
#pragma config(Motor,  port4,           backRIGHT,     tmotorVex269, openLoop, reversed)
#pragma config(Motor,  port5,           frontRIGHT,    tmotorVex269, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{while(true)
   {
     // Joystic Control:
     motor[port2] = vexRT[Ch2]; //Motor port 2 speed is determined by Ch2 on the VEXnet Transmitter
     motor[port3] = vexRT[Ch2]; //Motor port 3 speed is determined by Ch3 on the VEXnet Transmitter
     motor[port4] = vexRT[Ch3];
     motor[port5] = vexRT[Ch3];
}
}

----------------------------------------------------------------------------------------------------

Author:  rcahoon [ Tue Oct 15, 2013 2:31 pm ]
Post subject:  Re: Motor Speed - Basic Question

The code that you've given should reach the full range of speeds of the motors. If you need a mechanism to move faster, you'll have to increase speed mechanically.

You can fix a motor at the maximum output by assigning the values of 127 or -127 to the motor.

Author:  ShadyMaple [ Wed Oct 16, 2013 9:12 am ]
Post subject:  Re: Motor Speed - Basic Question

Thanks rcahoon

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