View unanswered posts | View active topics It is currently Wed Nov 13, 2019 9:14 pm






Reply to topic  [ 6 posts ] 
TETRIX Encoders 
Author Message
Rookie

Joined: Wed Aug 06, 2014 10:24 pm
Posts: 9
Post TETRIX Encoders
Is it necessary to have encoders on both motors when using the TETRIX motors if you want to travel distance? I thought I could use one, but the code doesn't want to cooperate.

Thanks,


Thu Dec 17, 2015 11:19 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: TETRIX Encoders
You can get away with using one encoder on the robot (and only track that encoder's movement), but there might be a bit of discrepancy between the right and left motors' movements (as only one side of the motors will be tracked at any given time). Would you be able to post your code using the [code] tags so that we may debug the issue further for you?

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.


Mon Dec 21, 2015 11:11 am
Profile
Rookie

Joined: Wed Aug 06, 2014 10:24 pm
Posts: 9
Post Re: TETRIX Encoders
Even if I am just asking it to move forward the encoder motor runs a great deal slower than the non encoder motor.

[#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Motor, mtr_S1_C1_1, motorD, tmotorTetrix, openLoop, reversed)
#pragma config(Motor, mtr_S1_C1_2, motorE, tmotorTetrix, PIDControl, encoder)
#pragma config(Servo, srvo_S1_C2_1, servo1, tServoNone)
#pragma config(Servo, srvo_S1_C2_2, servo2, tServoNone)
#pragma config(Servo, srvo_S1_C2_3, servo3, tServoNone)
#pragma config(Servo, srvo_S1_C2_4, servo4, tServoNone)
#pragma config(Servo, srvo_S1_C2_5, servo5, tServoNone)
#pragma config(Servo, srvo_S1_C2_6, servo6, tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{
motor[motorD]= 10;
motor[motorE]= 10;
wait1Msec(5000);
}]


Tue Jan 05, 2016 11:59 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: TETRIX Encoders
Quote:
#pragma config(Motor, mtr_S1_C1_1, motorD, tmotorTetrix, openLoop, reversed)
#pragma config(Motor, mtr_S1_C1_2, motorE, tmotorTetrix, PIDControl, encoder)


My guess is that the PID control on the motor with the encoder is causing it to go the correct speed (slower) than the 'raw' speed value given to the motor without an encoder. Try turning off PID control to see if this is the case.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.


Wed Jan 06, 2016 8:57 am
Profile
Rookie

Joined: Wed Aug 06, 2014 10:24 pm
Posts: 9
Post Re: TETRIX Encoders
Yes this worked. The only problem is that I can't sync the motors since I only have on encoder. Due to the cost, I could only get one per robot. I will have to figure out a way to get my hands on 10 more encoders.


Wed Jan 13, 2016 7:03 am
Profile
Rookie

Joined: Wed Aug 06, 2014 10:24 pm
Posts: 9
Post Re: TETRIX Encoders
Thank you John!


Wed Jan 13, 2016 7:03 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 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.