ANYONE wanting to Program a Palm or junk computer to read chinese
scales? this is the logic and communication protocol in visual basic,
you just convert the logic to your programming language.
'The logic for the polar hole calculator is just as simple:
Private sub ConfigureX_port()
'This is the port configuration:
MSComm1.CommPort = 1
MSComm1.Settings = "4800,N,8,1" ' 9600 baud, no parity, 8 data, and 1
stop bit.
MSComm1.InputLen = 48 'two 24 bit streams on reply.
end sub
Private sub Exit_to_readX()
'this is the exit line to read the scale:
Read_X_scale 'send to subroutine to read the chinese scale
X_pos_txt.Text = X_pos 'set the returned value to reflect scale value
end sub
'This is the sub that reads the scale each loop:
Private Sub Read_X_scale()
Dim a$
MSComm1.PortOpen = True ' open the port using MSCOMM
a$ = MSComm1.Input
If a$ <> "" Then
X_pos = Val(a$) / 25.4
'ProgressBar1.Value = Val(a$)
End If
MSComm1.PortOpen = False ' close the port using MSCOMM so buffer does
not overflow.
End Sub