Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Other Sciences
Computing and Technology
Visual Basic 6.0 and modem question
Reply to thread
Message
[QUOTE="Ivan Seeking, post: 184077, member: 689"] I am having a first go at integrating a PC based VB application with some other types of industrial computers. I wrote a simple VB routine that calls up the driver [for the PC to Industrial connection] as an executable file. This all works fine. The program dials in, gets the data, and closes the exe with no problem. The problem is that whether or not I actually shell to the exe, the modem intialization string seem to be causing me problems. When I am done I can't get the modem to disconnect. This is what I am doing. For dial out: If MSComm1.PortOpen = False Then Call mnuCommPortOpen_Click End If MSComm1.Output = "AT &D0 &R1 &B1" & vbCrLf DialString = "ATDT" & DialNumber & vbCrLf MSComm1.Output = DialString Once it connects I set MSComm1.PortOpen = false. I need to do this to free up the port for the other application. After I retrieve the data, I attempt to hang up like this. If MSComm1.PortOpen = False Then MSComm1.PortOpen = True End If If MSComm1.PortOpen = True Then MSComm1.Output = "+++" & vbCrLf MSComm1.Output = "ATH0" & vbCrLf MScomm1.Portopen = false End If My modem control skills really stink and I haven't worked with Basic in a very long time, so I'm not sure if this is a VB problem or a modem control problem. I thought that a simple ATH0 should do it, but something about the intialization prevents this from working. Then I thought that I must have to go back into command mode, so I added the +++, but no good. Does anyone know what's going on? Edit: This all uses a standard Hayes compatible, V90 modem [/QUOTE]
Insert quotes…
Post reply
Forums
Other Sciences
Computing and Technology
Visual Basic 6.0 and modem question
Back
Top