On Sep 22, 5:42 pm, Family Tree Mike
<FamilyTreeM... @discussions.mi crosoft.comwrot e:
First, your sub still won't compile as was pointed out in the other threads.
You have not shown the declaration of comm1.
I suspect from before, it is a MSCOMM object.
Won't this class "System.IO.Port s.SerialPort" work?
"cmdolcet69 " wrote:
I get tis error message as soon as i a step into the comm1.Output =
Packet(i) line of code.
Below is my code could someone run this and see if they get the smae
message?
Public Sub GetIndicator_In fo()
Dim Len As Byte = 6
Dim Cmd As Byte = 7
Dim loPass_byte As Byte = 28
Dim hiPass_byte As Byte = 45
Dim CRClo_byte As Byte = 48
Dim CRChi_byte As Byte = 130
Dim i As Integer
Dim Packet(5) As Byte
Packet(0) = 6
Packet(1) = 7
Packet(2) = 28
Packet(3) = 45
Packet(4) = 48
Packet(5) = 130
For i = 0 To 5
comm1.Output = Packet(i)
Thread.Sleep(5)
Next i
End Sub- Hide quoted text -
- Show quoted text -
No this namespace wont work because it not a valild namespace in vb
2003 with ,net 1.1.
That is why i use the mscomm reference and call my object.
Here the delcaration of the comm1
Imports MSCommLib
Private comm1 As New MSComm
Public Sub SetupCOM(ByVal comPort As Integer)
''initialize the com if it has not been already
'If IsNothing(comm1 ) Then
' comm1 = New MSComm
'End If
''set the properties of the com port
'comm1.CommPort = comPort
'comm1.Settings = "57600,n,8, 1"
''open the port and clear the buffer if it is not alread open
(which it better not be)
'If Not comm1.PortOpen Then
' comm1.PortOpen = True
' comm1.InBufferC ount = 0
' System.Threadin g.Thread.Curren tThread.Sleep(1 00)
'End If
end sub.
I think this isn;t working because when i call my comm1.output it
doesn;t work like the serial com in vb 2005.
In vb 2005 there is not write method for this class.
If anyone has any ideas please let me know.