USB Servo Controller
bidy
Posts: 7
I'm using the USB Servo Controller with the Open Source Software from Crustcrawler.com
Most of the functions work well - but the baud rate cannot be switched to 38k and the "ReportServoPosition" function
always results in a timeout error.
Does anybody has an idea why?
Most of the functions work well - but the baud rate cannot be switched to 38k and the "ReportServoPosition" function
always results in a timeout error.
Does anybody has an idea why?
Comments
Can you please provide a link to the open source software from www.crustcrawler.com/ that you mention?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I checked the software. The baud stuff seems to be working fine.
http://www.agaverobotics.com/services/dotnet/default.aspx
Since the ReportServoPosition() method is not implemented in the UI... I'm going out on a limb here and assuming that you're using the dll in another project??? When you update the PSC baud you also must update the COM Port baud.
Edit: Fixed link
Post Edited (Mike G) : 1/9/2010 4:41:27 AM GMT
http://www.crustcrawler.com/software/psc/index.php
(Running under Windows XP)
I use Parallax (Futaba)
Servos.
I wrote the software. Secondly, you have the old version. You can get the new version from the link provided.
www.agaverobotics.com/services/dotnet/default.aspx
I was studying MVC and OOP when I wrote the PSC source code so it's a little goofy. In retrospection, I could have made the application much easier to deal with but that's how I did it. Heck it works. The ReportServoPosition() method was not implemented in the original version. To add that feature you need to wire up a delegate and pass arguments to the event subscribers. If you tried to call the method directly, you would get a timeout since the ReportServoPosition() method does not know about the com port or PSC. Anyway, I wired it up so you can get an idea how it works.
This is probably not the most appropriate forum for a PSC question.
Happy programming.
Post Edited (Mike G) : 1/10/2010 7:10:50 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
Check out the new Savage Circuits TV!
·
Could there be something wrong with the USB driver?
Are you trying to wire up the method yourself? You not really giving me much to go on here.
What servo are you using?
I'm using the Parallax standard servo.
http://www.parallax.com/Store/Accessories/MotorServos/tabid/163/CategoryID/57/List/0/Level/a/ProductID/101/Default.aspx?SortField=ProductName,ProductName
This is the little that I know about your problem.
1) ReportServoPosition() times out.
2) Timeout changing PSC baud to 38k4
Everything else is working.
Well, ReportServoPosition() was not implemented in the original GUI. Therefore, I believe you're modifying the source. That's not a problem but it would help tremendously if you posted your code. Are you modifying the source code?
I updated the source code and implemented the ReportServoPosition() and provided an example. Simply click the magnifying glass on the channel control.
Have you clicked magnifying glass? Have you downloaded the new source and/or exe?
Updating baud has never been a problem. Again have you modified the source code?
Your problem is most likely not with the servos. It's your understanding of the PSC and RC servos. Since I can not reproduce the problem, I have to conclude that the code is working as expected. If you still need help please ask specific questions, provide detailed examples of the problem, and post your code
Post Edited (Mike G) : 1/18/2010 4:41:03 PM GMT
There is only one thing I changed:
In the "PingForPSC" function a changed "Return buffer(9) & buffer(10) & buffer(11)" into
"Return buffer(0) & buffer(1) & buffer(2)".
This way I get "1.0" - othwise I would get "nothing".
See the code below.
But the rest is exactly your source code.
Private Function PingForPSC(ByVal connection As IO.Ports.SerialPort) As String
Dim buffer(11) As Char
connection.ReadTimeout = 500
connection.WriteTimeout = 500
Try
connection.WriteLine(VER)
Thread.Sleep(200)
connection.Read(buffer, 0, 12)
connection.DiscardOutBuffer()
connection.DiscardInBuffer()
Catch ex As TimeoutException
Return Nothing
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
If buffer(2) = Nothing Then
Return Nothing
Else
Return buffer(0) & buffer(1) & buffer(2)
End If
End Function
What OS are you running?
What kind of PSC to you have; USB, Prop, or serial.
USB PSC
We might want to take this discussing over to http://forum.agaverobotics.com/
I'm not sure that the Propeller discussion board is the best place to discuss using the USB PSC with 3rd party software.
http://forum.agaverobotics.com/viewtopic.php?f=8&t=10