|
Page 1 of 1
|
[ 5 posts ] |
|
nSyncedMotors sample code not working
| Author |
Message |
|
robuff
Rookie
Joined: Thu Oct 18, 2012 5:50 pm Posts: 2
|
 nSyncedMotors sample code not working
When we run the sample motor program that is supposed to use sync'd motors, only one wheel turns. task main() {
nSyncedMotors = synchBC; //motor B is the master, motor C is the slave nSyncedTurnRatio = 100; //motors move at 100% alignment to each other
motor[motorB] = 30; //turn motor B on, which controls motor C at 30% power wait1Msec(2000); // wait for two seconds
motor[motorB] = 0; // turn the motors off.
} We have repeated checked to insure the motors were plugged into the correct ports. What are we missing?
_________________ In theory, theory and practice are the same. In practice, they aren't. - Yogi Berra
|
| Mon Nov 05, 2012 2:42 pm |
|
 |
|
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 380
|
 Re: nSyncedMotors sample code not working
We have tested the code in ROBOTC 3.54 and were unable to replicate the problem. Which version of ROBOTC are you using? If it's not the most recent version, I would suggest updating ROBOTC first and then retest the code to see if that solved the issue.
_________________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
|
| Tue Nov 13, 2012 11:07 am |
|
 |
|
Roger
Rookie
Joined: Tue Nov 13, 2012 9:21 pm Posts: 1
|
 Re: nSyncedMotors sample code not working
I have a similar problem. Before installing virtual worlds pid mode and nsync mode worked for my robot.
After installing virtual worlds, sync does not work in the virtual world. One wheel turns. Sync seems ok on my real robot.
However now pid does not work on my real robot.
Robotc3.54
|
| Tue Nov 13, 2012 9:44 pm |
|
 |
|
robuff
Rookie
Joined: Thu Oct 18, 2012 5:50 pm Posts: 2
|
 Re: nSyncedMotors sample code not working
We are on 3.51. It appears to be working now, I am not sure what changed. One learning was that you need to set the motor value after changing the turn ratio. However, I think the example code was doing that, so I'm not sure what the problem was.
_________________ In theory, theory and practice are the same. In practice, they aren't. - Yogi Berra
|
| Wed Nov 14, 2012 5:27 pm |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: nSyncedMotors sample code not working
Sync Motors does not apply to the virtual worlds, only physical robots.
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Thu Nov 15, 2012 5:36 pm |
|
|
|
Page 1 of 1
|
[ 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
|
|