|
-
Jan 17th, 2001, 03:33 AM
#1
Thread Starter
New Member
Hi,
i am working on my project on MSComm .i need to receive the data from
the source (PABX).When i attach the serial printer directly to the smdr port.
of the pabx it starts printing automatically but on the other hand ,
i am unable to read the same data.
i am using a comm port 2.When i run the program comEvReceive is not on so it only displays "akssadasdsa....."
but when i check with commevent comEvDSR then it shows that it is on.also it doesn't displays any error events.
any help will be appreciated.mail me at [email protected]
Dim ByteCount As Long
Dim filedata As String
Private Sub Form_Load()
Dim Instring As String
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 3
Settings = MSComm1.Settings
Threshold = 1
End Sub
Private Sub MSComm1_OnComm()
On Error Resume Next
If MSComm1.CommEvent = comEvReceive Then
List1.AddItem MSComm1.Input
Else
List1.AddItem "akssadasdsa..."
End If
End Sub
Private Sub Command1_Click()
If Command1.Caption = "Start" Then
If MSComm1.PortOpen = False Then
MSComm1.CommPort = 2
MSComm1.PortOpen = True
Command1.Caption = "Stop"
Settings = MSComm1.Settings
MSComm1.RThreshold = CInt(Threshold)
MSComm1.SThreshold = CInt(Threshold)
End If
Else
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
Command1.Caption = "Start"
End If
End If
End Sub
Private Sub Command2_Click()
List1.Clear
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
MSComm1.Settings = CStr(Settings.Text)
End Sub
Private Sub Command5_Click()
MSComm1.RThreshold = CInt(Threshold)
MSComm1.SThreshold = CInt(Threshold)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|