|
-
Oct 17th, 2006, 03:21 AM
#1
Thread Starter
Addicted Member
MSComm Device Connectivity
Hi,
I have written a VB app which connects perfectly well to the device I am trying to connect with, proividing the device is on and connected before I run the software.
The question is this : is there a way of making the application accept incoming Comm traffic automatically without having to close and open the port again once the device is connected. I would like to be able to connect and disconnect the device whilst the software runs as it wont always be needed.
I hope it's clear but let me know if you need any other info - thanks in advance.
Cheers,
Sparky.
-
Oct 17th, 2006, 03:47 PM
#2
Fanatic Member
Re: MSComm Device Connectivity
In the program I use MSComm. I put this code in a function in the module:
VB Code:
Comm1.CommPort = Val(CommPort)
Comm1.Settings = Params
Comm1.InputLen = 8
Comm1.PortOpen = True
Comm1.Output = Signal
Comm1.PortOpen = False
and call it when I want to activate the device.
Hope it helps....
-
Oct 17th, 2006, 04:07 PM
#3
Thread Starter
Addicted Member
Re: MSComm Device Connectivity
Thanks for replying,
I can get the connection working but I was just wondering if there was a way of avoiding having to call it each time I want to connect the device. i.e. is there a way of having an "always listening" comm port?
If I disconnect the device I dont want to have to re-activate the comm port each time. Do you know if there is specifically a setting which affects this?
Thanks for taking an interest.
Sparky.
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
|