Author |
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: April 20 2009 at 12:49 | IP Logged
|
|
|
I have had this problem a few times now. If I have to do an end task on power home when I reopen PH it comes up saying that it can't open COM port 3. My PLM is on COM port 3. If I restart the box everything is fine. The problem is that my server isn't doing remote restarts very gracefully anymore and this makes restarting a pain. I am guessing that Windows thinks the COM port is still being used by the PH task that is no longer running. Is there anything I can do short of restarting the box?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 20 2009 at 13:42 | IP Logged
|
|
|
AFAIK, you need to have PH close the com port first.
|
Back to Top |
|
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: April 20 2009 at 13:51 | IP Logged
|
|
|
That's what I was afraid of. This last time PH hung completely and wouldn't even draw the window (Title bar and a white box).
Part of the restarting problem is that my PLM (2412U) doesn't work unless I plug it in (USB) after Windows comes all the way up and if PH hangs the PLM needs to be unplugged from the wall for Windows to detect it. Any ideas?
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 20 2009 at 14:54 | IP Logged
|
|
|
Sounds like Device Manager is getting squirrelly. Have you tried a different USB port? Although I don’t think that is going to fix the problem. My experience is PH does not handle USB failures very well and will hang so you have no control. I wonder what would happen if you did a ph_reinitialize ( ) in the startup of PH?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: April 20 2009 at 15:03 | IP Logged
|
|
|
It gives the same error that I get when I start PH.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 20 2009 at 17:42 | IP Logged
|
|
|
OK, I’m thinking out loud again. What would happen if in pH startup you closed the open port ph_comclose ( comnum ) and then do an open port ph_comopen. Or does PH hang before startup happens? My experience is PH will go through some kind of a long time out and give a message then continues. If you don’t find a solution I might be able to test it on my test system.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 20 2009 at 21:23 | IP Logged
|
|
|
Kev,
Do you have any details on why PH is hanging in the first place? I would like to try and attack the root of the problem if possible.
PH uses the Microsoft COMM control for all of its COM port routines. Apparently, if PH is not closed gracefully then the port will appear hung. While I have not seen this happen often (it seems to be dependant upon some other factor), once it is in this state, Ive only been able to fix it by restarting. Like you, my servers are very tricky to restart sometimes. Ive found what works best for me is the shutdown command with the following parameters:
shutdown.exe -r -f -t 10
This will do a forced restart in 10 seconds. It's been very reliable for me but then Im not sure what method you're using to restart the server in the first place.
Dave.
|
Back to Top |
|
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: April 21 2009 at 18:00 | IP Logged
|
|
|
I tried the shutdown command and didn't have any luck.
I am not sure what is causing PH to hang, but I am not entirely sure its a PH problem. I have been making other substantial changes on the computer and that is where I have had problems. This last one happened after I installed ActivePerl.
|
Back to Top |
|
|