Com Port problem

G

Thread Starter

ghimboy

Hi, am a novice trying to get 2 devices, one on com1 and one on com2 to work simultanously. Each have a separte software. When both are run togther, device 1 on com port1 get "Run time error 8005, port already open" error and crash out. I have checked and both don't have conflicting IRQ. Please advised what could be the possible causes.

Thank you very much.
 
If I remember the PC hardware, COM1 & COM2 share the same hardware port. If you can assign your second COM port to COM3, then it should work. You can't use COM1 and COM2 at the same time. --- I think.

Dick Caro
============================================
Richard H. Caro, CEO
CMC Associates
2 Beth Circle, Acton, MA 01720
Tel: +1.978.635.9449 Mobile: +1.978.764.4728
Fax: +1.978.246.1270
E-mail: [email protected]
Web: http://www.CMC.us
============================================
 
It sounds like both software programs are trying to use COM1. Check in each software to make sure that one is using COM1 and the other is using COM2. You don't say what kind of software it is, but I've seen some that can only use COM1. Not very common thankfully, but not very useful if that's the way it is written.
 
S

Sandeep Shroff

The com port is being used by some other application and it is not allowing you the access for the same. Stop the application which uses the comport and run your application.
Or
If there is no other application which uses this than try closing the comport ( I am assuming you are using mscomm control for this) when you
terminate application.
Or
your two softwares are trying to access the same comport hence giving you this error.
Sandeep
 
P

Peter Whalley

Hi All.

Agreed. Sometimes the problem is some unexpected third application or device that's already using either the com1 physical port or has created an
emmulation of the com1 port (or other port). I have an external IR comms adaptor that is physically connected to com2 but also creates an emmulation of com4 which the software application actually talks to.

Older computers often have a serial mouse attached which uses a com port and it's easy to overlook this.

Dick may be thinking of conflicts beteen the IRQ lines used by com ports. Normally both com1 and com3 are configured to use IRQ4 and com2 and com4
use IRQ3. If you're running more than 2 com port devices you need to start looking around for alternative free IRQs to use. This is particularly a problem with ISA bus devices. PCI does allow for sharing of IRQs.

Regards

Peter Whalley.
Magenta Communications Pty Ltd
Melbourne, VIC, Australia
e-mail: peter*no-spam*@magentacomm.com.au
delete *no-spam* before sending
 
Dear All,

COM1 is running a Data Terminal program and COM2 is running a LabView based program. I have checked and both programs are using their respective COM ports. COM1 IRQ4 and COM2 IRQ3. No conflict in device manager. I am using a Dell optiplex GX150 PIII computer. Program on COM1 crashes out when Program on COM2 runs. I need them to run together.

Desperately need all your control experts advices.

Thanks for your time
 
A
Try starting the Data Terminal program first, then the LabVIEW app. Do you get an error then? Does LV complain about the port being open? Is the LV app an EXE or are you in development mode?

Be sure you have initialized the LV app properly. Are you using Serial VIs or VISA? Are you initializing only once at the start of the app and closing the port properly when the app exits? If you don't close the port, the only way to insure LV releases the port is to close the app.

Try switching cables and com port configurations, LabVIEW on Com1 and Data Terminal on Com2.

It sounds like the LV app is opening both of your ports and not allowing the Data Terminal access to Com1.

Regards,

Alan Brause
 
R

Rokicki, Andrew

Try connecting both devices.
Than run HyperTerminal and connect to COM1.
Than run HyperTerminal second instance and connect to COM2.
And see if they connects OK.

If yes than is most likely the custom applications are not written correctly.
If no something else grabs your ports first.
 
> It sounds like the LV app is opening both of your ports and not allowing the Data Terminal access to Com1.

If labview is anything like lookout (both by NI, its possible you have a second databse object setup that was using comm 2. Maybe you did this during testing, then took out all references to it later, but left the object. If you left the object it will still try to open comm 2. I know sometimes when I want to disable a comm device that i might want later, i will just assign it a different comm. How many have people messed with this computer anyway?

-jeff
 
Hi,

Whether I start the DT program on com1 first or the other way round, the DT program still has the "port already open 8005 error". The other program on com2 is actually TECView, an EXE.

Thanks
 
A
Something else has captured Com1. Do you have a PDA, for instance, or any other hardware that uses Com1? The connect program for this hardware could be loading automatically and prohibiting access to Com1.
 
Top