Extreme Newbie needing alot of help with serial communication from computer to
I have been searching the forums for simple explanations, but I keep getting more and more confused [noparse]:([/noparse] I am attempting to make a 3 axis stepping motor control that gets information from my computer and moves the motors according to what is sent to the chip. It is fairly simple in my head, but getting the communication started is the problem.
What I am starting with is:
3 stepper motors (I am sure i can figure out the code to run them.),
Visual Basic 6.0 Pro (I am hoping to use this as the Windows controller that send the information to the chip)
Random electronic parts around the house.
No spare money!
How I have it pictured in my head is to have the Visual Basic program send only 3 variables to the SX....MotorA, MotorB, MotorC. Each variable will be either -1 for step backwards, 0 for do nothing, and 1 for step forward. What I need help with is how to send each variable from the computer and get the chip to read each variable. Any help will be greatly appreciated!
What I am starting with is:
3 stepper motors (I am sure i can figure out the code to run them.),
Visual Basic 6.0 Pro (I am hoping to use this as the Windows controller that send the information to the chip)
Random electronic parts around the house.
No spare money!
How I have it pictured in my head is to have the Visual Basic program send only 3 variables to the SX....MotorA, MotorB, MotorC. Each variable will be either -1 for step backwards, 0 for do nothing, and 1 for step forward. What I need help with is how to send each variable from the computer and get the chip to read each variable. Any help will be greatly appreciated!
Comments
Also, you'll need to use inverted (not "true.")
See attached pic.
This shows how to send a simple packet that allows the SX to re-establish synchronization with the PC should it be lost.
Now for the hard part.....I have downloaded a program that I can send data through the serial port and it can receive what I send back from the chip. I am using it for testing purposes until I get things working somewhat right so I can design my own program to operate the chip. Here is the code from the help files that I have modified a bit :
I can send the letter "G" to the chip, and it will send back "G" just like it is supposed to. The big question is how can I send 3 variables to the chip and the chip know which one is which? If i send T,E,S,T to the chip, I only receive back T. I was hoping to be able to send all 3 variables in one string and have the chip break it down to process them.
Attached a program I used to test serial with, if you haven't nailed that down yet.· Uses different baudmode, pins, etc., but easily modified.
Would help if I added the link :P
cgi.ebay.com/Nema-size-23-stepper-motors-1-4-shaft-cnc-automation_W0QQitemZ170269775558QQcmdZViewItem?hash=item170269775558&_trkparms=72%3A1205%7C39%3A1%7C66%3A2%7C65%3A12%7C240%3A1318&_trksid=p3286.c0.m14#ebayphotohosting
Post Edited (eagletalontim) : 10/12/2008 2:17:34 PM GMT