ServoCenter3.1 Direct Serial I/O Examples Visual Basic 6.0
Short Description
ServoCenter3.1 Direct Serial I/O Examples - Visual Basic 6.0 … ServoCenter 3.1 manual for a description of the entire ServoCenter 3.1 protocol and feature …
Website: tech.yostengineering.com | Filesize: 134kb
Content
ServoCenter3.1 Direct Serial I/O Examples - Visual Basic 6.0
1. Overview
This document provides a simple Visual Basic example program illustrating how to access the serial port
and directly communicate with the ServoCenter 3.1 controller board to control a servo. Note that the
program is provided to illustrate simple raw serial communication using the ServoCenter 3.1 protocol and
does not demonstrate the full feature set of the ServoCenter 3.1 controller. Refer to section 4.1 of the
ServoCenter 3.1 manual for a description of the entire ServoCenter 3.1 protocol and feature set.
2. Sample Code
Private Sub Form_Load()
MSComm1.PortOpen = True
MSComm1.Output = Chr$(&HF0 + 0) & Chr$(16) & Chr$(0) & Chr$(100) & Chr$
(100) & Chr$(0) ‘initialize servos to pos:100
End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub
Private Sub VScroll1_Scroll(Index As Integer)
MSComm1.Output = Chr$(&HF0 + 0) & Chr$(16) & Chr$(Index) & Chr$(VScroll1
(Index).Value) & Chr$(100) & Chr$(0) ‘output command packet via serial
control
‘(header + board id)^ (command)^ (servonum)^ (position)^
(speed)^ (…
Get the file Download here
Related Books:Related Searches: feature website, serial control, controller board, serial communication, visual basic 6
Comments
Leave a Reply