-
Dec 17th, 2018, 02:57 PM
#1
Thread Starter
Lively Member
[RESOLVED] Need Help With Serial Ports and the API
Hi VB Forum:
After searching "Serial ports and API", I am somewhat horrified.
I need a tutorial on how to use the serial ports with the Application Programming Interface (API).
I will continue to use MSComm32.OCX. I have ordered new PCI cards that are supposedly compatible
with Windows 10, Home Premium, 64 bit. I thought I would the attempt to use the API. Now, I am
apprehensive about using the API.
Thank you in advance for your suggestions.
-
Dec 17th, 2018, 05:33 PM
#2
Hyperactive Member
Re: Need Help With Serial Ports and the API
Have you encountered any problems using MSComm32?
I would consider putting VB com port access into a separate process from your main program. Now that serial ports are an endangered species, more people will be using USB and network converters, and you no longer necessarily have a predictable response time for serial communication.
-
Dec 17th, 2018, 06:08 PM
#3
Thread Starter
Lively Member
Re: Need Help With Serial Ports and the API
Originally Posted by ahenry
Have you encountered any problems using MSComm32?
I would consider putting VB com port access into a separate process from your main program. Now that serial ports are an endangered species, more people will be using USB and network converters, and you no longer necessarily have a predictable response time for serial communication.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I sincerely thank you for your reply. I will continue with MSCOMM32.OCX and the USB ports.
I consider this response to be the final dialog. I will mark as solved.
-
Dec 17th, 2018, 08:49 PM
#4
Re: Need Help With Serial Ports and the API
Originally Posted by ahenry
Now that serial ports are an endangered species, more people will be using USB and network converters, and you no longer necessarily have a predictable response time for serial communication.
First of all these aren't "converters" but "adapters" just like the legacy ones that plug into other system buses, including the ones that were integrated into motherboard-mounted I/O chipsets. Second they wouldn't have any less "predictable response time" than those on legacy buses unless perhaps you have another misbehaving or highly chatty device attached to the same host controller port.
Where do kids get these wacky notions?
I suspect a lot of really bad code is being written based on busy-wait loops instead of using the MSComm events. Remember: DoEvents stands for "doing things wrong."
-
Dec 18th, 2018, 12:34 PM
#5
Hyperactive Member
Re: [RESOLVED] Need Help With Serial Ports and the API
I was obliquely referring to network to serial converters - I shouldn't have conflated it with USB. In that case, you can get a network timeout when opening the com port, which isn't async in Mscomm IIRC. But I guess it is a bit obscure - not worth worrying about for general serial programming.
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
|