Parallax Servo Controller (USB), commands??
Hi!
Does anyone know where I can find a list of commands and on what form the
Parallax Servo Controller (USB) wants the commands sent to it? Im trying
to program the servo controller without any stamp.. Would be nice to controll
it by a language like C, Java or Python, and Im having a hard time finding information
about the form and neccesary commands..
Thankful for help!
//Xan
Does anyone know where I can find a list of commands and on what form the
Parallax Servo Controller (USB) wants the commands sent to it? Im trying
to program the servo controller without any stamp.. Would be nice to controll
it by a language like C, Java or Python, and Im having a hard time finding information
about the form and neccesary commands..
Thankful for help!
//Xan
Comments
//Xan
When I try to get a version it works without a hitch, but as soon as I try to move the servo nothing happens..
I have foun some reference that implies that the controller should get numbers like;
33 83 67 0 0 222 4 13
33 83 67 -> !SC
13 -> \r
222 4 -> well it moves..
This is on the form that ServoControllerManualRevBv2_4.pdf says the controller wants, so does anyone know if
the controller wants all commands as integers or is there a way to write it like the ServoControllerManualRevBv2_4.pdf
says; ie. "!SC" 0 0 250 1250 \r
Hopeful someone can help..
//Xan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
The only ASCII characters the PSC should be receiving are the !SC at the beginning. All other values are raw binary data, not ASCII or HEX representations of them. You should be sending exactly 8 bytes every time. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I also found it usefull to run USB monitoring software (http://www.hhdsoftware.com/Products/home/usb-monitor-lite.html) to check exactly what PSCI sends to PSC.
Anyone has code to share?
aresot
I am trying to do the same thing... I need to use C++ to write basic commands to the usb servo driver.
Using a terminal session such as minicom, I can write !SCVER? to the device and it returns 1.4, which is what the PSCI reports when asking for the version.
I also used a program called "Advanced Serial Port Monitor" to see what the PSCI sends to the usb port...
This is what I get when i ask for the version...
U
U
!SCVER?<CR>
!SCVER?<CR>1.4
When I move channel 0 to 2500, I get this...
!SC<NUL><NUL>
It won't directly go to C++, but here's some C# code I use for sending similar commands to a propeller (these are NOT PSC commands!):
Note that in the above code, I send the ASCII string out in the first "write" (the spPort object converts the characters to binary), the address in the 2nd, and the two byte pulse in the 3rd. I could have also sent all this out as one array. It depends on what "object" you are using for the serial port, and what commands are available for that object, and how they work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log
Post Edited (John R.) : 8/5/2007 1:56:47 PM GMT
I'm wondering if there are any Delphi/Pascal people in here...
I'm having a odd time translating values into binary.· It seems like the bit string is too long and it's causing problems.
And the IntToBin8 function
The value of servoaz and servoel is default at 1500 but can vary up and down from this number. But 1500 gives "10111011100" as the result which is 3 bits longer than it should be.
The PSC docs mention this should be a 16 bit Word with a low side and a high side. How would I convert 1500 into two 8 bit pieces then convert them into binary?
can you please explain me about that procedure you wrote above ? is it a component that I can use to build my own software to send commands to the servo controller ? what is the tSatData ?
Best Regards,
PersianPatient .