BS2P and NetMedia Servo controller
LiveBot
Posts: 4
Hi everyone.
Big ALLO to all robot lovers.
I have been arround in robotics for a while, but am still a learner in a lot of aspects, including some parts of PBasic like SerIn/Out.
My latest challenge is to control·the NetMedia Servo controller.
But first of all let me say:
1-I am a Parallax fan (Own a BS1 and 2 BS2P40 among other parallax products) and· I am not interested in Basic-X
2-Have browsed trough several·posts and threads before starting·this one
3-I Post here because I belive my problems lies with poor programming
Here goes the synthoms:
-Tested with PC serial port and works fine.
-For the BS2 I am using a line driver (based on Max232)
-The Card (the NetMedia 8 Servo with Torque controller) uses straight forward commands (ASCII type values) and seams easy to control by Serin/out.
-I know everythig is wired up correctly (ok, never 100% sure...) because I manage to put the servos at the position I want, but...
Only on the first command!
Can't seem to make the board accept more than·the first·command and haven't been able so far to read from the card (using SERIN).
I know it is my poor PBasic...
Can anyone please take a look at my simple 6-line code (attached SrvCtl_7.bsp) and peek what is wrong?
Thanks in advance,
Rui Marcelino
(Portugal)
PS: I didn't attach any Netmedia docs or links out of respect for Parallax, but this is assuming someone knows this card... please tell me if I need to send the card specs or any other stuff.
Thanks again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I may be just nuts & volts but I'm alive 'n spinning!
Big ALLO to all robot lovers.
I have been arround in robotics for a while, but am still a learner in a lot of aspects, including some parts of PBasic like SerIn/Out.
My latest challenge is to control·the NetMedia Servo controller.
But first of all let me say:
1-I am a Parallax fan (Own a BS1 and 2 BS2P40 among other parallax products) and· I am not interested in Basic-X
2-Have browsed trough several·posts and threads before starting·this one
3-I Post here because I belive my problems lies with poor programming
Here goes the synthoms:
-Tested with PC serial port and works fine.
-For the BS2 I am using a line driver (based on Max232)
-The Card (the NetMedia 8 Servo with Torque controller) uses straight forward commands (ASCII type values) and seams easy to control by Serin/out.
-I know everythig is wired up correctly (ok, never 100% sure...) because I manage to put the servos at the position I want, but...
Only on the first command!
Can't seem to make the board accept more than·the first·command and haven't been able so far to read from the card (using SERIN).
I know it is my poor PBasic...
Can anyone please take a look at my simple 6-line code (attached SrvCtl_7.bsp) and peek what is wrong?
Thanks in advance,
Rui Marcelino
(Portugal)
PS: I didn't attach any Netmedia docs or links out of respect for Parallax, but this is assuming someone knows this card... please tell me if I need to send the card specs or any other stuff.
Thanks again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I may be just nuts & volts but I'm alive 'n spinning!
bsp
775B
Comments
1) Start simple -- copy the examples in the manufacturer docs first to get things working
2) Using defined constants will make changes easier as you're tweaking the program
I don't have one of those servo controllers (Why would I when we make the PSC?··) but I did find the docs online and have written a simple demo that is a duplication of one of their test programs, and adds the reported position request as you have in your program.· Give it a try, and work with it until you get things going.· I hope it helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 12/2/2004 2:53:01 AM GMT
Sorry for the delay in updatind.
Jon, thanks for your code.
Shows how to write clean and simple.
The probem was due to either misprint or bad interpreting the manual.
Anyway, it is solved and I wish you many thanks.
All the best for 2005
PS Do I need to 'close' the Thread?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I may be just nuts & volts but I'm alive 'n spinning!