View unanswered posts | View active topics It is currently Wed Oct 01, 2014 12:07 pm






Reply to topic  [ 5 posts ] 
nSyncedMotors sample code not working 
Author Message
Rookie

Joined: Thu Oct 18, 2012 5:50 pm
Posts: 2
Post 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
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 580
Post 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
Profile
Rookie

Joined: Tue Nov 13, 2012 9:21 pm
Posts: 1
Post 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
Profile
Rookie

Joined: Thu Oct 18, 2012 5:50 pm
Posts: 2
Post 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
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 605
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: jpalnick, nxt 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.