pampleluney
asked on
VB to robot
Hello everyone.
Really need someone to explain to me how do I communicate from a VB interface with a robot. I want to connect a robot (Basic Stamp language) to a pc where the user would use the interface from VB to input data or give instruction to the robot. But I don't know how these two (VB &Â Basic Stamp) communicates. Hope that someone out there can help me here.
Thanx in advance.
Really need someone to explain to me how do I communicate from a VB interface with a robot. I want to connect a robot (Basic Stamp language) to a pc where the user would use the interface from VB to input data or give instruction to the robot. But I don't know how these two (VB &Â Basic Stamp) communicates. Hope that someone out there can help me here.
Thanx in advance.
ASKER
Yes. I forgot to mention about the serial port. I'm using the serial port to connect them. I was wondering if VB can communicate with Basic Stamp. Meaning can VB understands the Basic Stamp's signal or vice versa?
My mission is to give instructions to the robot via VB. There would be 9 command buttons (representing Lot A to Lot B) in the interface. By clicking the button, the robot would move from a fixed location (the robot always starts at this point) to the selected location. But the movement of the robot would not be seen in this interface. So I will have a plan fixed on the floor exactly like the interface. How do I program so that the robot knows which location and route to follow? My idea is to calculate the distance of each lot and use the case structure. Would that be a good idea? If not, how do I program it to move to each lot.
Thanx.
My mission is to give instructions to the robot via VB. There would be 9 command buttons (representing Lot A to Lot B) in the interface. By clicking the button, the robot would move from a fixed location (the robot always starts at this point) to the selected location. But the movement of the robot would not be seen in this interface. So I will have a plan fixed on the floor exactly like the interface. How do I program so that the robot knows which location and route to follow? My idea is to calculate the distance of each lot and use the case structure. Would that be a good idea? If not, how do I program it to move to each lot.
Thanx.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You need to create a VB project and add the MSCOMM control.
From there just use simple code such as:
' Opens the port for communication
Private Sub Form_Load()
MSComm1.CommPort = 1
MSComm1.Settings = "9600,n,8,1"
MSComm1.PortOpen = True
End Sub
Private Sub Command1_Click()
MSComm1.Output = Chr(27) + Chr(112) + Chr(0)
End Sub
Then of course you need to look up the proper stamp op codes that you wish to use and write your UI around that and then just send the codes for whatever you want it to do