I'm trying to build a VB6 app that will acquire data from 16 serial
devices by way of a Digi ClassicBoard 16/ISA. I apparently have come up
against the 16-port limit of the MSCOMM32 control, and wondered if there
is there a way around it. BTW, does the 16-port limit mean I can open
any 16 serial ports (say, COM3 through COM18), or only ports in the
range COM1 through COM16?
In Win98, I configured the Digi ClassicBoard16 to show up as COM3
through COM18 (my PC already is using COM1 for the mouse and COM2 for
the modem). It seems I can only access 14 of the 16 Digi ports because
when I try to open COM17 or COM18, I get an error.
Also, do you know if the Comm API also has this same 16-port limitation
as MSCOMM32? That is, can I use OpenFile("COM20",...)?
I wonder why Microsoft imposes the 16-port limit...just because they
CAN? ;-)
Thanks...
David
Only Com1-Com16 are available under MSComm, and there is no way to get
around this limit (AFAIK). You need to use a commercial comms add on. I
describe lots of these, with a number of working examples in my book (see
below for information).
The Windows API is not directly limited to 16-ports. However, you have to
work around the problem -- by far the best solution is to simply purchase a
commercial product (such as Sax Comm Objects). The time that you save will
pay for the control, IMO. I also have links on my homepage to various of
these commercial add-ons.
--
Richard Grier
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO 80228
303-986-2179 (voice)
303-986-3143 (fax)
Author of Visual Basic Programmer's Guide to Serial Communications, 2nd
Edition (355 pages).
For information look on my homepage at http://www.hardandsoftware.net.
Use the Books link to order. For faster service contact the publisher at
http://www.mabry.com.
1. Anyone ever done this?
2. Any tips?
3. Does each com control operate in its own thread?
My objects will be ActiveX components (dll's) that provide
properties, methods, and events that will interface to my software,
which is an explorer view of all of the data acquisition systems and the
modules connected to each system. Seems to work well with simulated
data frm a form, now comes the fun part.
Dennis,
See my other answer. MSComm is limited to 16-ports (no matter how many
instances). You should use a commercial comms add-on, IMO.
BTW, yes. I have done more than sixteen ports -- only with commercial
add-ons. The time you save will pay for the control many times over.
Thanks for any helpful information.
Dennis,
Thomas Lutz wrote:
>
> I'm not completely sure that the 16 port limit still exists in the
> latest version of the MSComm32 control (shipped with VB6).
> There is no real reason why there should be any limit. It may be that
> the contol is only limited if you set the port property at design
> time. Try loading a new instance of the control for 17 or more ports
> using code and set the port parameter at runtime.
>
> The company that I work for sells a software program called the
> Software Wedge that is a serial communications tool and I know that we
> support up to 100 serial ports at a time. In other words there is no
> limit imposed by the operating system. If you are interested in our
> product visit http://www.taltech.com. The site has a good deal of
> information about serial communications so it may be helpful to you
> in general.
>
> If it turns our that the MSComm32 OCX is limited to 16 instances, you
> can always purchase one of the many other MSComm compatible controls
> out there including the one from Crescent Software, from Sax Software
> and from MicroHelp. You can also write your own serial communications
> routines by calling hte API directly. I would recommend getting a good
> book on it like the Visual Basic Programmers Guide to Serial
> Communications by Richard Grier. You can find it at www.amazon.com
>
> On Sat, 02 Oct 1999 20:27:03 -0700, David Kamm
> <DKamm@NoSpam_lfsus.jnj.com> wrote:
>
I purchased a 3rd party Comm control from Sax (http://www.saxsoft.com)
called Sax Comm Objects 6.0. It cost $249. Version 7.0 became available
about a week after I bought 6.0. :-( SaxComm allows 64 serial ports to be
used simultaneously.
It was simple to install and works well so far; it has yet to drop even a
single byte while 16 serial devices are communicating at 9600 baud.
My only complaint so far is about the sparse documentation that's included
with it. The Events section is especially cryptic and light-weight. I had
to guess about the exact usage of many of the Properties, Methods and
Events. But I got everything to work to my satisfaction in a couple hours.
Thanks to all who helped me on this...
-DK
John Holland