|
Page 1 of 1
|
[ 9 posts ] |
|
Cannot Update Slave Sync (69) error when running program
| Author |
Message |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
 Cannot Update Slave Sync (69) error when running program
Hey there,
When I run my program, I get the following error:
The source code can be downloaded here: LINKThe sub in question I'll paste:
Anyone know what this error means? I am stumped
I am using RobotC v1.30B4.
Regards,
Xander
|
| Fri May 30, 2008 2:09 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
I've done some more testing and it seems that if you've got
in your program, you cannot simple do a without first calling So my code now looks like this:
Question is, why am I not allowed to reset the slave's encoder? How should I reset the counters without "unslaving" the other motor?
Regards,
Xander
|
| Fri May 30, 2008 3:27 pm |
|
 |
|
JamesD
Novice
Joined: Sun Feb 04, 2007 12:48 am Posts: 69 Location: Australia
|
My understanding, in simple terms, is that when you synch two motors, one is the master and the other is the slave. Hence you can only give instructions to the 'master' motor as the slave will simply move based on the movements performed by the 'master' motor.
So in your code, you only need to reset motorB.
Secondly, as you are aware you're not allowed to send any commands to motorC (whilst in Synch mode).
Hence:
nMotorEncoder[motorC] = 0;
throws the error. From what I can see you don't need to reset the encoder on motorC.
Cheers
James
|
| Fri May 30, 2008 9:13 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
The thing is, I did some testing and when they motors are bonded together like that, sending a nMotorEncoder[masterMotor] = 0; does NOT reset the encoder for the slave. That seems like very odd behaviour.
I guess my question is what is the recommended way to reset both encoders? I am using the encoder values for dead reckoning purposes, so I need to be able to reset them when it suits me.
Regards,
Xander
|
| Sat May 31, 2008 2:07 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
hi,
so I'd propose (suggest? I'll never get the difference...) that you better wrote your own synch routine, where you'll have full control on all encoder values - I did the same for some of my purposes before (where I had to synch 3 motors over all).
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Sat May 31, 2008 4:08 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
Hey Ford,
Suggest or propose, both are fine in this case  You can even propose to suggest or suggest to propose, but the latter has a slightly different meaning, haha.
Do you think you could send me your synching (not sinking) code? I'll even throw in a virtual blanket for on your travels and a meal voucher for the restaurant at the end of the Universe. (yeah, I'm a big fan of those books, too).
Regards,
Xander Beeblebrox
|
| Sat May 31, 2008 4:41 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
what difference? (or is this actually just for adults?  ) To be honest, this was a java (lejos) application for RCX. But the code is very very simple:
I'll be glad to gad one! nice to willhavehadwant seawn you there! (ok, I know, never try to make jokes in a foreign language...  )
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
Last edited by Ford Prefect on Sun Jun 01, 2008 9:34 am, edited 1 time in total.
|
| Sat May 31, 2008 5:59 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
Nah, to propose to suggest would mean something like "making the suggestion to suggest something". To propose can have two meanings, it can mean to suggest OR to ask someone to marry you, that's the meaning of the second one, ie make the suggestion to ask someone to marry you. It's a little play on words, nothing bad. I used to go to a German school in Ireland and we used to play on German words a lot. One of the words we invented was "gereift". We derived it from Reifen, which is a tyre. Tired, is sort of like past tense of Tyre, hence Gereift, past tense of Reifen  It confused the heck out of our German teachers, haha. That seems simple enough, thanks!
Haha, nah, I get it. I've read those books (I have all the books in one big book) about 9-10 times now. I love it!
Regards,
Xander
|
| Sat May 31, 2008 7:01 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
Weird. Sort of Irish humor, eh?
you DO know the original meaning of "gereift", don't you?
It's derived from "reif" = mature.
tired=tyred=ge-Reift=gereift=reif=mature.
tired=mature.
**LOL**
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Sat May 31, 2008 12:49 pm |
|
|
|
Page 1 of 1
|
[ 9 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 6 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
|
|