BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sun Nov 19, 2017 11:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Roboclaw USB V4.0 Serial problem
PostPosted: Sat Feb 22, 2014 8:58 am 
Offline
Citizen

Joined: Mon Feb 17, 2014 3:27 pm
Posts: 5
Hello,

Please could anyone tell me if they have had problems using simple serial and USB modes. I have used a terminal program
to send serial commands to start then stop a motor. The first command is accepted and then the stop command is rejected
and Roboclaw appears to lockup. Using the Roboclaw setup windows interface will connect and then crashes out. If anyone
else has had these problems could you please post a reply. Help would really be appreciated.


Top
 Profile  
 
 Post subject: Re: Roboclaw USB V4.0 Serial problem
PostPosted: Wed Mar 05, 2014 10:17 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
For now use the individual motor channel stop commands(eg 64 and 192). 0 will not stop the motors. This will be fixed in the next firmware update which I expect to have available by next week. All other values for simple serial worked as expected. Firmware updates can be done by end users on boards with firmware version 4.0 or newer.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Roboclaw USB V4.0 Serial problem
PostPosted: Mon Mar 17, 2014 3:41 pm 
Offline
New User

Joined: Mon Mar 17, 2014 3:29 pm
Posts: 4
I am also having a problem with my RoboClaw v4.0.0.

I am using "Advanced Packet Serial" through a USB port. I am building a driver in Java, but have also observed problems using the "roboclaw.py" example code. I should add that my development host environment is an Ubuntu 12.04.4 box running Kernel 3.2.0.

The problem I observe is that when I execute "roboclaw.py", occasionally, one of the commands appears to be dropped. For example, the example loop performs an accelerate and reverses direction and accelerates the other way. Occasionally during this loop, the RoboClaw leaves one of the motors running and appears to have skipped that command.

In addition, occasionally, the test python script exits abnormally. It seems like it might be something to do with the serial communication, but it's difficult to tell which "side" of the communications channel (host/RoboClaw) is going wrong.

Also, many of the commands in the protocol don't have a response associated with them, so if and when a command is dropped, it's nearly impossible to discover this through the protocol structure. If more of the commands allowed some type of "ACK" in response, it would help determine whether the channel is at fault.

Count = 2
Error State: 0
Temperature: 19.9
Main Battery: 11.8
Logic Battery: 11.7
Current M1: 17.9 M2: 15.7
Logic Battery Min: 4.0 Max: 33.6
Main Battery Min: 5.9 Max: 33.6
M1 P=1.00
M1 I=0.50
M1 D=0.25
M1 QPPS= 180000
M2 P=1.00
M2 I=0.50
M2 D=0.25
M2 QPPS= 180000
Count = 3
Error State:
Traceback (most recent call last):
File "roboclaw.py", line 602, in <module>
print "Error State:",repr(readerrorstate())
File "roboclaw.py", line 577, in readerrorstate
val = readbyte()
File "roboclaw.py", line 17, in readbyte
val = struct.unpack('>B',port.read(1));
struct.error: unpack requires a string argument of length 1


Top
 Profile  
 
 Post subject: Re: Roboclaw USB V4.0 Serial problem
PostPosted: Wed Mar 19, 2014 5:29 pm 
Offline
New User

Joined: Mon Mar 17, 2014 3:29 pm
Posts: 4
I am now also trying to confirm whether the problem is with my software or the new v4.0.0 firmware, however, I cannot seem to get the Windows RoboClawSetup application to connect properly. There doesn't seem to be a way to specify the virtual COM port and the application's "Connect" button results in an unhandled exception (seeminly attempting to open the comm port).

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at RoboclawClassLib.Roboclaw.Open(String comport, Int32 baudrate, TextBox textbox)
at RoboclawExampleApp.Form1.connect_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I am really stuck here, any help would be appreciated.


Top
 Profile  
 
 Post subject: Re: Roboclaw USB V4.0 Serial problem
PostPosted: Thu Apr 24, 2014 5:28 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
You can download a beta of out new applications here: http://downloads.orionrobotics.com/down ... Motion.zip

First update the firmware on the board using the new software(click the Firmware Update tab and follow the instructions). See if that fixes the problems you are having. The older Roboclaw Setup app did not have a lot of exception handling code that the new app has. One of the problems with the old app was it would search for all serial ports on the system to find the Roboclaw and if the PC had an invalid port(usually com 3) before it found the roboclaw it would cause an exception.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO