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

nSyncedMotors sample code not working
http://robotc.net/forums/viewtopic.php?f=1&t=5072
Page 1 of 1

Author:  robuff [ Mon Nov 05, 2012 2:42 pm ]
Post subject:  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?

Author:  JohnWatson [ Tue Nov 13, 2012 11:07 am ]
Post subject:  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.

Author:  Roger [ Tue Nov 13, 2012 9:44 pm ]
Post subject:  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

Author:  robuff [ Wed Nov 14, 2012 5:27 pm ]
Post subject:  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.

Author:  tfriez [ Thu Nov 15, 2012 5:36 pm ]
Post subject:  Re: nSyncedMotors sample code not working

Sync Motors does not apply to the virtual worlds, only physical robots.

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