MDC2250C !G command? !M command?
- Griffin Baker
10 years 2 months ago #29528202
by Griffin Baker
Replied by Griffin Baker on topic Re:MDC2250C !G command? !M command?
Edit: Disregard
Please Log in or Create an account to join the conversation.
- Griffin Baker
10 years 2 months ago #29528203
by Griffin Baker
Replied by Griffin Baker on topic Re:MDC2250C !G command? !M command?
This is not a bug. Here is why you are seeing this problem. The problem that you are seeing is related to the watchdog timer function. Simply disabling the watchdog timer will solve this problem.
^rwd 0
The watch dog timer needs to see a command once every second. If it does not see a signal command every 1 second, it stops the output. Now when another command is given, the watchdog timer wakes up and repeats the previous signals. So when the !G 1 1000 is sent, it starts up and and then stops because the watchdog timer goes to sleep due to not receiving another signal.
So when you send in another signal command !G 2 1000, both motors spin. As a result of the watch dog timer waking back up and repeating the !G 1 1000 command.
Disabling the watchdog timer will keep the command of the signal going so the motor doesn\'t stop unless you give it the command to go back to 0.
So if you keep on the watchdog timer or raise the amount of time it stays awake waiting for a command, and send in the following signals, here is what you will see happen.
!G 1 1000, motor command is sent and motor goes to that power and runs as long as the watchdog has not went to sleep(did not see another command issued), and then you wait for it to stop.
Send in the !G 1 0 to put motor back at 0 command power, and then send the !G 2 1000, motor 2 should be the only one spinning.
You can increase the amount of time the watchdog timer stays await by adding the time in mS.
^rwd 5000 - watchdog timer waits 5 seconds before sleeping if it doesn\'t see another ! command given.
^rwd 0
The watch dog timer needs to see a command once every second. If it does not see a signal command every 1 second, it stops the output. Now when another command is given, the watchdog timer wakes up and repeats the previous signals. So when the !G 1 1000 is sent, it starts up and and then stops because the watchdog timer goes to sleep due to not receiving another signal.
So when you send in another signal command !G 2 1000, both motors spin. As a result of the watch dog timer waking back up and repeating the !G 1 1000 command.
Disabling the watchdog timer will keep the command of the signal going so the motor doesn\'t stop unless you give it the command to go back to 0.
So if you keep on the watchdog timer or raise the amount of time it stays awake waiting for a command, and send in the following signals, here is what you will see happen.
!G 1 1000, motor command is sent and motor goes to that power and runs as long as the watchdog has not went to sleep(did not see another command issued), and then you wait for it to stop.
Send in the !G 1 0 to put motor back at 0 command power, and then send the !G 2 1000, motor 2 should be the only one spinning.
You can increase the amount of time the watchdog timer stays await by adding the time in mS.
^rwd 5000 - watchdog timer waits 5 seconds before sleeping if it doesn\'t see another ! command given.
Please Log in or Create an account to join the conversation.
- daveymilla
- Topic Author
- Offline
Less
More
- Posts: 7
- Thank you received: 0
10 years 2 months ago #29528238
by daveymilla
Replied by daveymilla on topic Re:MDC2250C !G command? !M command?
Great, thanks, I have tested what you say and it is true. The watchdog timer does not clear the !G setting and the next command makes the controller pickup where it left off.
The watchdog timer only pauses controller function.
The !M command, always addresses both motors and so does not have the same issues.
Your explanation of the behaviour of the controller gives me confidence to move forward with my robot design.
I will eventually use a more sophisticated protocol to control the robot, but for now, as an engineering \'sketch\' I can get basic functionality thru simple direct run time commands.
Thankyou very much for your time in addressing my problem, which turned out to be an understandable misunderstanding of the way your sophisticated controllers work. Perhaps a *note in your manual may be of use to others if that information is not in there already.
On another note, upon opening Roborun+ today, I received a new windows exception error, which then was not there when I ran it again!!!
Another quirk? with Roborun was that when I was experimenting last week, the configuration window was not actually showing the watchdog timers setting as it actually was in the controller, and changing the setting in the configuration window did not change the controller. But of course using the console, the direct command ^rwd xxxx, did change the setting in the controller.
For the record, I think the watchdog timer is an excellent idea. I have made lawnmower bots in the past, and the idea of those blades spinning when not under command control is SCARY.
Thanks.
The watchdog timer only pauses controller function.
The !M command, always addresses both motors and so does not have the same issues.
Your explanation of the behaviour of the controller gives me confidence to move forward with my robot design.
I will eventually use a more sophisticated protocol to control the robot, but for now, as an engineering \'sketch\' I can get basic functionality thru simple direct run time commands.
Thankyou very much for your time in addressing my problem, which turned out to be an understandable misunderstanding of the way your sophisticated controllers work. Perhaps a *note in your manual may be of use to others if that information is not in there already.
On another note, upon opening Roborun+ today, I received a new windows exception error, which then was not there when I ran it again!!!
Another quirk? with Roborun was that when I was experimenting last week, the configuration window was not actually showing the watchdog timers setting as it actually was in the controller, and changing the setting in the configuration window did not change the controller. But of course using the console, the direct command ^rwd xxxx, did change the setting in the controller.
For the record, I think the watchdog timer is an excellent idea. I have made lawnmower bots in the past, and the idea of those blades spinning when not under command control is SCARY.
Thanks.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 9
- Thank you received: 0
10 years 2 months ago #29528240
by Hoanglx123
Replied by Hoanglx123 on topic Re:MDC2250C !G command? !M command?
Griffin Baker wrote:
Thanks very much for this reply - I too have been experiencing the exact same issue. I was banging my head up against a brick wall until I read your post and then everything started working for me.
This is not a bug. Here is why you are seeing this problem. The problem that you are seeing is related to the watchdog timer function. Simply disabling the watchdog timer will solve this problem.
^rwd 0
[snip]
Thanks very much for this reply - I too have been experiencing the exact same issue. I was banging my head up against a brick wall until I read your post and then everything started working for me.
Please Log in or Create an account to join the conversation.
Moderators: tonysantoni
Time to create page: 0.077 seconds