Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSCOMM - Beyond the 16-port limit?

759 views
Skip to first unread message

David Kamm

unread,
Oct 2, 1999, 3:00:00 AM10/2/99
to
Hi,

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

Richard Grier

unread,
Oct 4, 1999, 3:00:00 AM10/4/99
to
Hi,

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.

Dennis

unread,
Oct 5, 1999, 3:00:00 AM10/5/99
to
David,
Looks like we have similar projects. I will need 32 com ports for my
application, in addition to the ones used by the mouse, etc. We also
plan to use Digi equipment.
In the help information on the com control it says that if you need
to use more than one comport, use more than one control. It doesn't
mention the limit of com controls though.
Thus, my plan is create multiple instances of the com control wrapped
in an object to add functionallity. Now my questions:

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,

Richard Grier

unread,
Oct 6, 1999, 3:00:00 AM10/6/99
to
Hi 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.

Dennis

unread,
Oct 18, 1999, 3:00:00 AM10/18/99
to
I have a related question that hopefully someone may be able to answer.
If I accept that MSComm can do only 16 ports total, what will happen If
we run multiple instances of the program? Let me be a little more
specific. Friday we decided that 16 ports would be more than enough for
a customer of our data acquisition systems. However, one customer wants
to run up to four instances of our program so they can have an instance
for each of there four systems. Their total serial port count is around
24, but never more than 12 per instance of the program. Since we don't
have the hardware yet, I can't test this.

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:
>

David K

unread,
Nov 15, 1999, 3:00:00 AM11/15/99
to
Just to follow-up on this in case anyone was following this thread...

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

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to
Might I ask what hardware you are using for all those ports?

John Holland

0 new messages