|
Page 1 of 1
|
[ 3 posts ] |
|
A command of motor[]=80 gives a motorPWMLevel[] = 100
Author |
Message |
tom.jakowenko
Rookie
Joined: Wed Jan 23, 2013 6:16 pm Posts: 7
|
 A command of motor[]=80 gives a motorPWMLevel[] = 100
I am trying to understand the dynamics of Tetrix motors using RobotC for FTC hardware environment.
Background: I have a simple testbed with (3) Tetrix motors I'm trying to sync. Note: the motors have no load on them. I want to be able to sync the motors as fast as possible and am trying to develope a control scheme. I've tried testing with and without PID attribute. I've tried using encoder position error alone to feedback motor control, but without success. I'm now trying to also use the PWM level to help identify if I should increase the slow motor(s) or decrease fast one(s).
However, it seems I need a motor command below 80 in order to see a PWMlevel below 100. Below is a code snippet to see where I'm drawing my conclusions. the "xMotorPower is assigned to each respective motor.
// Print the debug data every 1 second if ((time100(T1) >= 10) && (errorHasOccurred == false)) { ClearTimer(T1); clearDebugStream();
writeDebugStream("Bow position = %d\n", bowPosition); writeDebugStream("Port position = %d\n", portPosition); writeDebugStream("Starbord position = %d\n", starboardPosition);
writeDebugStream("\n--------------------\n");
writeDebugStream("Bow commanded power = %d\n", bowMotorPower); writeDebugStream("Port commanded power = %d\n", portMotorPower); writeDebugStream("Starbord commanded power = %d\n", starboardMotorPower);
writeDebugStream("\n--------------------\n");
writeDebugStream("Bow PWM actual power = %d\n", motorPWMLevel[bow]); writeDebugStream("Port PWM actual power = %d\n", motorPWMLevel[port]); writeDebugStream("Starbord PWM actual power = %d\n", motorPWMLevel[starboard]); }
Is the motorPWMLevel[] accurate?
Should I use motorPWMLevel[] to make motor control decisions?
|
Sat Feb 02, 2013 10:58 am |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: A command of motor[]=80 gives a motorPWMLevel[] = 100
I believe this is cause by the `motorPWMLevel[]` "command". This is because technically that is a VEX command, so I don't think it would work for TETRIX. It is not a documented function either.
EDIT: I looked into RobotCIntrinsics.h, and it is in there, and it should work... Anyone else? It seems like this would be a nice function to have, if it worked. Then again, they might have yet to implement it, which is why your code is breaking.
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Sat May 18, 2013 2:52 pm |
|
 |
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 620
|
 Re: A command of motor[]=80 gives a motorPWMLevel[] = 100
The motorPWMLevel command applies for the NXT platform and motors as ROBOTC has control of the PID algorithm for these motors.
For the TETRIX system, we have no way of getting feedback from the Motor Controller to make a determination of PID status/speed. We simply enable a "PID bit" and the controller does the work itself.
You'll notice in the NXT Devices debugger window, the value returned by "motorPWMLevel" is listed under the PID column, but for TETRIX motors it'll list "N/A" under the PID column.
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
Mon Jul 15, 2013 5:00 pm |
|
|
|
Page 1 of 1
|
[ 3 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
|
|