MSComm problem with multi-port serial card 
Author Message
 MSComm problem with multi-port serial card

Using VB 5 Enterprise edition in Windows NT4:

I have a series of four "MSComm.PortOpen = True" statements that
execute when my program starts up. The first one executes OK - the
others don't. It doesn't matter which of the (4) ports I open first, I
get an error on the 2nd port. The error is: "The device is not open".
(Of course it isn't - that's what I'm trying to do!)

All of the ports on this card (a Digiboard) work OK when using
HyperTerminal. I tested each one - I was able to send data to another
computer via each port. They also work using some routines I have in
DOS. This would seem to indicate that hardware-wise everything is OK.

I re-checked the installation of components in VB5; everything is
installed except some videos.

Anyone have any suggestions as to what might be wrong?

TIA

Martin



Fri, 17 Mar 2000 03:00:00 GMT  
 MSComm problem with multi-port serial card

Quote:

>Using VB 5 Enterprise edition in Windows NT4:

>I have a series of four "MSComm.PortOpen = True" statements that
>execute when my program starts up. The first one executes OK - the
>others don't. It doesn't matter which of the (4) ports I open first, I
>get an error on the 2nd port. The error is: "The device is not open".
>(Of course it isn't - that's what I'm trying to do!)

Silly question:
Do you have an instance of the MSCOMM control for each of the ports,
with the properties (IRQ, etc) set correctly for each one?

Visit my source code page at http://www.mindspring.com/~johnecarter
Visit my favorite school at http://www.mindspring.com/~addison

Get PR-Tracker -- tracks problem reports, defects, bugs
INFORMATION:  http://www.prtracker.com/info.html
DOWNLOAD:     http://www.prtracker.com/download.html



Fri, 17 Mar 2000 03:00:00 GMT  
 MSComm problem with multi-port serial card

The question may seem silly, but sometimes it doesn't hurt to check.  I got
a brand new Compaq, same as the others in my lab, and it had an IRQ conflict
because it was set up wrong!  I was saying - must be something else... but
it was the hardware setup!

Quote:


>>Using VB 5 Enterprise edition in Windows NT4:

>>I have a series of four "MSComm.PortOpen = True" statements that
>>execute when my program starts up. The first one executes OK - the
>>others don't. It doesn't matter which of the (4) ports I open first, I
>>get an error on the 2nd port. The error is: "The device is not open".
>>(Of course it isn't - that's what I'm trying to do!)

>Silly question:
>Do you have an instance of the MSCOMM control for each of the ports,
>with the properties (IRQ, etc) set correctly for each one?

>Visit my source code page at http://www.mindspring.com/~johnecarter
>Visit my favorite school at http://www.mindspring.com/~addison

>Get PR-Tracker -- tracks problem reports, defects, bugs
>INFORMATION:  http://www.prtracker.com/info.html
>DOWNLOAD:     http://www.prtracker.com/download.html



Sun, 19 Mar 2000 03:00:00 GMT  
 MSComm problem with multi-port serial card


Quote:

>Silly question:
>Do you have an instance of the MSCOMM control for each of the ports,
>with the properties (IRQ, etc) set correctly for each one?

Yes I do.

This program works just fine on another computer (similarly equipped).
And, as I stated before, this hardware setup works with other
software. I still haven't resolved this - it makes no sense.

If you have any suggestions as to what might be causing the problem,
please let me know.

Thanks

Martin



Wed, 22 Mar 2000 03:00:00 GMT  
 MSComm problem with multi-port serial card

Quote:

> Using VB 5 Enterprise edition in Windows NT4:

> I have a series of four "MSComm.PortOpen = True" statements that
> execute when my program starts up. The first one executes OK - the
> others don't. It doesn't matter which of the (4) ports I open first, I
> get an error on the 2nd port. The error is: "The device is not open".
> (Of course it isn't - that's what I'm trying to do!)

> All of the ports on this card (a Digiboard) work OK when using
> HyperTerminal. I tested each one - I was able to send data to another
> computer via each port. They also work using some routines I have in
> DOS. This would seem to indicate that hardware-wise everything is OK.

You should add some delays after opening EACH port.  Windows and
particularly VB5 are terribly inefficient and since microsoft is
so into visual deception and fooling the majority of users
into thinking their products are even remotely worthy of praise
from an efficiency viewpoint, a programmer must keep in mind
nothing in windows is done when it is done.  NT4 is hideously
inefficient in performing some tasks.  It does out-perform the 16bit
step-brother (windows 4.00.95), but its mylti-threading
capabilities are childsplay when pitted against its godfather - os/2 -
the grossly ill-marketed product Bill Gates himself once proclaimed the
greatest ever - he's never retracted that statement.

Use vb doevents and API Sleep 100 (ms) after each open.  Try longer
delays if it still fails.  

Try DOS if that fails - multithreaded dos apps scream.



Wed, 22 Mar 2000 03:00:00 GMT  
 MSComm problem with multi-port serial card

Quote:

>This program works just fine on another computer (similarly equipped).
>And, as I stated before, this hardware setup works with other
>software. I still haven't resolved this - it makes no sense.

>If you have any suggestions as to what might be causing the problem,
>please let me know.

Can you open all the ports on the card simultaneously by using
multiple sessions of HyperTerminal?  If so, this would indicate that
the computer has no hardware/IRQ conflicts.  If you can't open all the
ports simultaneously, there may be a conflict with some other hardware
in the computer experiencing the problem - have you checked that the
two computers are using the same CPU, BIOS version, hard/floppy
controller, video card, etc, etc?

Visit my source code page at http://www.mindspring.com/~johnecarter
Visit my favorite school at http://www.mindspring.com/~addison

Get PR-Tracker -- tracks problem reports, defects, bugs
INFORMATION:  http://www.prtracker.com/info.html
DOWNLOAD:     http://www.prtracker.com/download.html



Thu, 23 Mar 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Problems with opening the serial port using MsComm

2. Problems with using the control MSComm for serial port communication

3. Serial port MSCOMM printing problems

4. mscomm - send/receive from serial port

5. ?MSCOMM - Read Signals From Serial Ports

6. Mscomm, serial port question

7. Using serial port without using MSCOMM

8. Mscomm doesn't hear my serial port

9. VB Communications, MSComm, Serial Ports and Modems...

10. Modems, Serial Ports, MSComm and VB

11. Modem, serial port, MSComm and VB Communications

12. Serial port, MSComm, Modem and VB communication

 

 
Powered by phpBB® Forum Software