Cide
asked on
Using VB to make a terminal program (with a bit of a twist)
Hello all,
I'm controling a modem with a microcontroller and I'm now using a terminal program called Creative Communication Terminal Emulator to display the data.
Here's what happens:
1. The microcontrollers modem dials another modem and they connect.
2. I type a "!" into the terminal.
3. The microcontroller recieves this character and outputs a string.
Everything works fine in the terminal program. I can see the return string.
However I made a program in VB and I can not see the return string. The microcontroller does recv the ! and return a string but nothing is outputted in a vb text box.
Here is my code:
======================
Private Sub Command1_Click()
MSComm1.Output = "!"
End Sub
Private Sub Form_Load()
MSComm1.RThreshold = 4
MSComm1.CommPort = 1
MSComm1.OutBufferSize = 1
MSComm1.PortOpen = True
recvdata = False
End Sub
Private Sub MSComm1_OnComm()
If MSComm1.CommEvent = comEvReceive Then
Text1.Text = Text1.Text + MSComm1.Input
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub
=================
Why can I not see the string from the microcontroller from my program when I can see it from the terminal program??
Thanks in Advance,
Aaron Tufgar
I'm controling a modem with a microcontroller and I'm now using a terminal program called Creative Communication Terminal Emulator to display the data.
Here's what happens:
1. The microcontrollers modem dials another modem and they connect.
2. I type a "!" into the terminal.
3. The microcontroller recieves this character and outputs a string.
Everything works fine in the terminal program. I can see the return string.
However I made a program in VB and I can not see the return string. The microcontroller does recv the ! and return a string but nothing is outputted in a vb text box.
Here is my code:
======================
Private Sub Command1_Click()
MSComm1.Output = "!"
End Sub
Private Sub Form_Load()
MSComm1.RThreshold = 4
MSComm1.CommPort = 1
MSComm1.OutBufferSize = 1
MSComm1.PortOpen = True
recvdata = False
End Sub
Private Sub MSComm1_OnComm()
If MSComm1.CommEvent = comEvReceive Then
Text1.Text = Text1.Text + MSComm1.Input
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub
=================
Why can I not see the string from the microcontroller from my program when I can see it from the terminal program??
Thanks in Advance,
Aaron Tufgar
Cide, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:
Refund points and save as a 0-pt PAQ.
DanRollins -- EE database cleanup volunteer
Moderator, my recommended disposition is:
Refund points and save as a 0-pt PAQ.
DanRollins -- EE database cleanup volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER