Programming Lynx 6 with Visual Basic (please help me)

I have Lynx 6 arm and RIOS / SSC-32 Arm Control Software. Is there any way to programme the arm with Visual Basic 6.0 (for windows)?
I want to know how i can control the arm with a vb program.
Has anyone tried to do this?

it is just a guess, but I believe RIOS is written in visual basic. If not, it is still possible to control the SSC32 with VB6.0.

  • Connect serial cable from VB ready computer to SSC32
  • Set the baud rate of this com port to whatever baud rate you would like to use and that the SSC32 supports - 2400, 9600, 38400, 115,000 in this case) for this example I will use 9600.
  • plug a servo into channel 10 (could be any and many dependent on how many servos are in your arm)
  • From the instructions for the SSC32 there are a list of commands that are accepted as ASCII strings of decimal numbers that make things happen. Learn these.

Within VB6.0

  • Set up a Form along with a serial control object (MsComm)

  • Add the MsComm object (named MSComm1)

  • Add a scrollbar control (named Hscroll1)

  • copy code below to move this servo to center upon form load and to move servo on channel 10 based on scrollbar movement

Private Sub Form_Load()
Dim scroll1value as integer
HScroll1.SmallChange = 100 'sets up speed of movement within the form itself
HScroll1.LargeChange = 200
HScroll1.Min = 500 'sets scrollbar minimum equal to lowest Pulse width of SSC32
HScroll1.Max = 2500 'sets scrollbar minimum equal to highest Pulse width of SSC32
Hscroll1.Value = 1500 'sets Hscroll1 to center position which cooresponds to servo center at pulse width of 1500 when sent out serially
MSComm1.Settings = “9600,N,8,1”
MSComm1.CommPort = 1
MSComm1.PortOpen = True
scroll1value = HScroll1.value
MSComm1.Output = “#10 P” + & HScroll1.Value & “S750” + Chr$(13)
End Sub

'the above mscomm command creates a string - 10P1500S750 - with a carriage return that corresponds to the value of the scrollbar in this example, this string command is what is needed for SSC32 control

Private Sub HScroll1_Change()
MSComm1.Output = "#10 P+ & HScroll1.Value & + “S750” + Chr$(13)
End Sub

Try this and let me know how it went. I do not have an SSC32 yet after looking at the commands this should work for simple servo control on channel 10.

Relatively simple up until this point
now in order to get coordinated movement you will need alot of commands being sent out and received via VB events, keyboard events or some other input device.

The first part of the program works great , But when I slide the scroll bar
it says port is already open.

You are absolutely right

try this

Private Sub Form_Load()
Dim scroll1value As Integer

MSComm1.Settings = “9600,N,8,1”
MSComm1.CommPort = 1
** If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
Else
MSComm1.PortOpen = False
End If**

HScroll1.SmallChange = 100 'sets up speed of movement within the form itself
HScroll1.LargeChange = 200
HScroll1.Min = 500 'sets scrollbar minimum equal to lowest Pulse width of SSC32
HScroll1.Max = 2500 'sets scrollbar minimum equal to highest Pulse width of SSC32
HScroll1.Value = 1500 'sets Hscroll1 to center position which cooresponds to servo center at pulse width of 1500 when sent out serially

scroll1value = HScroll1.Value

End Sub

Private Sub HScroll1_Change()
MSComm1.Output = “#10 P” & HScroll1.Value & “S750” + Chr$(13)
End Sub

thanks

cwkoehler