Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking in script for open and in-use COM ports

Status
Not open for further replies.

willy113

Programmer
Apr 27, 2004
33
US
Hi Procomm+ Guru,

I am trying to check using Aspect, whether 6 installed COM ports are good/active and if in use by another application.
But when I verify using the "set modem connection" command sequence and try to connect to a port in-use by Procomm+,
I do see a Procomm+ error message on the status line saying
"Connection in use by another Procomm Plus session" but my
script stills connects to COM1, and I want to have several
Procomm+ scripts runing and connecting to the next available COM port (COM1 - COM6)
Here is what I check for:

pwmode TERMINAL
set modem connection directConnectCOM1
if FAILURE
set modem connection directConnectCOM2
endif
if FAILURE
set modem connection directConnectCOM3
endif
; Keep going till COM6

dialsave
setup save
connect "DATA", "BROCADE_3200", "Brocade_3200_Serial", "", ""

This has been working for 2 years for COM1 ONLY.
Now I am trying to expand a BURNIN test process with 4-6 Procomm+ session runnning on a single PC with multiple PCI COM ports.

If I launch 4 generic Procomm+ applications with no script running, they automatically grap the next COM port,
(COM1 thru COM4) sequencially as I would expect and would also like to do in the script ...

Can you help me out what I am doing wrong ??


Best Regards,

Bill Lusche
Sr. Development Engineer
 
I can't test this at the moment, but what I think is happening is that Procomm is saying it is set to that connection, even though it is not active or available. When using a modem, you could turn on modem command mode and check for success/failure of that command to see if a modem is really available to Procomm, but I can't think of a way to run that check for direct connections. You might try clearing the status line using the statclear command, try setting the connection, and then get the current value of the status line via the $STATMSG variable to see if the connection was accessed successfully or not.

 
Knob,

Thanks for the response, let me know when you get a chance to test this out on your side ?
I am not using a modem, but only direct connections at this point.
I will try and use the $STATMSG variable per your input, since I do see the message "Connection in use by another Procomm Plus session" posted on the Procomm+ status line ...

Best Regards,

Bill Lusche
Sr. Development Engineer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top