Putting robotics at your service™

Free shipping on orders over $200

New to Programming (VB Help PLease)

Print view Share :
Previous topicNext topic

Page 1 of 2 [ 25 posts ]

1, 2
Rookie ( offline )
Posts: 24
Posted: 2008-09-13 18:51 
Hey, well I am a Mechanical Engineering Student starting my sophmore year at Texas A&M University. I am familiar with robots but new to programming. I am currently trying to create a program in Visual Basic 2008 Express Edition that will control the servos on a SES Lynx Arm using the SSC-32 control board. I have been looking through forums and finding "Sample Codes" but do not understand how they communicate with the SSC. I know that the code is sending byte information to the board that tells the servos what to do but I do not understand the code nor how the SSC board reads it. If someone could just give me a code they are using and tell me what i does, I think I can break it down and figure it out. Just something to get me on my feet. If I sound ignorant, please forgive as I mentioned I am new to programming. Any help would be very appreciated.

Thanks,
Corey


User avatar
Novice ( offline )
Posts: 81
Posted: 2008-09-14 11:49 
Please read through this thread: http://www.lynxmotion.net/viewtopic.php?t=4017. It's a sticky so it will remain at the top. I did my best to outline a few different ways to get started. I haven't updated it in a while since I got the Sequencer program and am using that as it's not that much (only $40) and does everything I need. My goal is to get my Scout walking like it isn't totally drunk then export the CSV file of the sequence and code that into VB so I can customize a UI and hone my VB skills.

Short story, I will eventually work on the VB 2008 project again but need to do some basics to get my Scout walking better first. I encourage anyone out here to contribute to the sticky thread though if you have VB 2008 experience with the SSC-32. Good luck!


Rookie ( offline )
Posts: 24
Posted: 2008-09-14 12:29 
RA, RK, RH, LA, LK, LH, speed Walk Forward - SEQ Servo Order
SerialPort1.Write("#0 P1427 #1 P1292 #2 P1292 #16 P1573 #17 P1708 #18 P1708 T500" + Chr(13))
Sleep(900)
Hey Beave, looking at this code I have a few questions if you wouldn't mind taking the time to answer. RA, RK, RH, LA, are these representing servos? If so, the command: Write("#0 P1427 #1 P1292...), is this the command to the corresponding servo? And T500, is this a time code? [/quote][/b]


User avatar
Guru ( offline )
Posts: 4904
Posted: 2008-09-14 15:16 
stone26 wrote:
RA, RK, RH, LA, LK, LH, speed Walk Forward - SEQ Servo Order
SerialPort1.Write("#0 P1427 #1 P1292 #2 P1292 #16 P1573 #17 P1708 #18 P1708 T500" + Chr(13))
Sleep(900)
Hey Beave, looking at this code I have a few questions if you wouldn't mind taking the time to answer. RA, RK, RH, LA, are these representing servos? If so, the command: Write("#0 P1427 #1 P1292...), is this the command to the corresponding servo? And T500, is this a time code?

RA is Right Ankle
RK is Right Knee
RH is Right Hip
...

The format of these commands is described in the SSC-32 manual:
http://www.lynxmotion.com/images/html/build136.htm

Yes the command tells the different servos #0, #1, ... to move to specific locations with a time value as described in the section "Servo Move or Group Move"

Good Luck
Kurt


User avatar
Novice ( offline )
Posts: 81
Posted: 2008-09-20 02:27 
Thanks for replying. I haven't had power since Sunday morning and still don't - I'm running my DSL modem from an inverter hooked to my car right now. Louisville got hit hard with winds from Ike and is still reeling. No ETA on power being restored to over 100,000 customers still.


User avatar
Guru ( offline )
Posts: 4904
Posted: 2008-09-20 09:48 
Your are welcome.

I hope you get your powr back soon! Good Luck
Kurt


User avatar
Novice ( offline )
Posts: 81
Posted: 2008-09-20 12:32 
Thanks. No power = no robots :(

Got a 140W inverter powering my DSL modem/router, two laptops, and TV. Next up, my 12V NiMH charger:)


Rookie ( offline )
Posts: 24
Posted: 2008-09-20 22:10 
Hey guys, thans a lot for the replies. Just got all of my servos in yesterday and Monday I will have all the components to start assembling my arm. I am building the arm from the ground up using the ses arm design, but with no kit. Read the manual from the link you provided kurte, and now I have a good understanding of the code sequence beave used. Beave hope the power problem gets fixed. Once again thanks and I will be posting in this section giving updates on my project.


Rookie ( offline )
Posts: 24
Posted: 2008-10-01 00:34 
Hey I have a general question. Well I have my arm assembled and started writing some code for movement and when I click the command button to do so(in vb 2008 xpress ed.) i notice that the arm twitches and then goes back to its original position. I am wonderin, could this that it is not recieving enough power? Don't laugh but I am using a single 9 volt square battery(all I had at the time). Please any help would be appreciated.


User avatar
Guru ( offline )
Posts: 9258
Posted: 2008-10-01 09:26 
You answered your own question. :roll:

Read the SSC-32 manual and it's pretty clear what the minimum power requirements are for the VS terminal.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


Rookie ( offline )
Posts: 24
Posted: 2008-10-03 16:27 
Want to thank yall for helping out. I'm sure I'll have more questions to come. As of now, here is a video of my arm so far being controlled by VB '08. Let me know what yall think.

http://www.youtube.com/watch?v=9PEByJAoypM

I have also created a site giving my day by day progress of building the arm. It's stil very early so there isn't much there but maybe something to look at if you want. Here it is:

http://sites.google.com/site/robotsite


User avatar
Novice ( offline )
Posts: 81
Posted: 2008-10-07 18:57 
Looks great! Very smooth.


Rookie ( offline )
Posts: 24
Posted: 2008-10-08 16:24 
As you know I'm using Visual Basic '08 to program my arm. I have been browsing around the board looking for some help and reading the ssc-32 manual, but I cannot get the ssc to send an input to my program. I am trying to get it to send me the current position of a servo after one solitaire movement. This may not even be possible which leads to why I am asking your assistance. Additionally I would like to recieve the voltage that the servo is using.

One more concern. I added the springs to my arm to help counter the weight a bit and noticed my elbow joint started to twitch every so often. I removed the spring hoping it was causing this but found that it was not. Any suggestions?


User avatar
Guru ( offline )
Posts: 9258
Posted: 2008-10-08 16:29 
You must not leave the arm reaching out so there is a load on the elbow servo (for a long time). Think of it as if it were a human arm. You wouldn't want to hold your forearm out straight for a long time. Robot arms made from hobby servos don't like it either. :( That may be where the twitching is coming from.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


1, 2

All times are UTC - 5 hours [ DST ]. It is currently 2014-09-16 19:28
Feedback Form
Feedback Form