PE6 Problem

tracecom

Senior Member
Win 7
AXE027
20M2
PE6 6.0.8.0

Open PE6 with AXE027 connected and circuit powered.
Check PICAXE chip connected. OK.
Download code. OK.
Check PICAXE chip connected. Error: Can't open COM3 (which is where AXE027 is connected.)
Try to download code. Error: Can't open COM3.
Close PE6.
Restart PE6 with AXE027 connected and circuit powered.
Check PICAXE chip connected. OK.
Download code. OK.
Check PICAXE chip connected. Error: Can't open COM3 (which is where AXE027 is connected.)
Try to download code. Error: Can't open COM3.
etc.

Code:
[color=Navy]#picaxe [/color][color=Black]20M2[/color]
[color=Navy]#no_data[/color]
[color=Blue]setfreq m4
symbol red_pot [/color][color=DarkCyan]= [/color][color=Blue]B.2
symbol grn_pot [/color][color=DarkCyan]= [/color][color=Blue]B.1
symbol blu_pot [/color][color=DarkCyan]= [/color][color=Blue]B.0
symbol red_LED [/color][color=DarkCyan]= [/color][color=Blue]C.3
symbol grn_LED [/color][color=DarkCyan]= [/color][color=Blue]C.2
symbol blu_LED [/color][color=DarkCyan]= [/color][color=Blue]C.5
symbol [/color][color=Purple]red_duty [/color][color=DarkCyan]= [/color][color=Purple]w2[/color]
[color=Blue]symbol [/color][color=Purple]grn_duty [/color][color=DarkCyan]= [/color][color=Purple]w3[/color]
[color=Blue]symbol [/color][color=Purple]blu_duty [/color][color=DarkCyan]= [/color][color=Purple]w4[/color]
[color=Black]init:
   [/color][color=Blue]pwmout pwmdiv4[/color][color=Black], [/color][color=Blue]red_LED[/color][color=Black], [/color][color=Navy]249[/color][color=Black], [/color][color=Navy]500
   [/color][color=Blue]pwmout pwmdiv4[/color][color=Black], [/color][color=Blue]grn_LED[/color][color=Black], [/color][color=Navy]249[/color][color=Black], [/color][color=Navy]500
   [/color][color=Blue]pwmout pwmdiv4[/color][color=Black], [/color][color=Blue]blu_LED[/color][color=Black], [/color][color=Navy]249[/color][color=Black], [/color][color=Navy]500[/color]
[color=Black]main:
   [/color][color=Blue]readadc10 red_pot[/color][color=Black], [/color][color=Purple]red_duty
   [/color][color=Blue]readadc10 grn_pot[/color][color=Black], [/color][color=Purple]grn_duty
   [/color][color=Blue]readadc10 blu_pot[/color][color=Black], [/color][color=Purple]blu_duty
   [/color][color=Blue]pwmduty red_LED[/color][color=Black], [/color][color=Purple]red_duty
   [/color][color=Blue]pwmduty grn_LED[/color][color=Black], [/color][color=Purple]grn_duty
   [/color][color=Blue]pwmduty blu_LED[/color][color=Black], [/color][color=Purple]blu_duty
   [/color][color=Blue]debug
goto [/color][color=Black]main[/color]
Is it me? or PE6?

Thanks.
 

nick12ab

Senior Member
This issue is not caused by the code or the circuit the cable is connected to. It's an issue on the computer side, either with the AXE027 not being COM3 or the port in use by something else. Check in Device Manager that the drivers have been installed correctly too.
 

tracecom

Senior Member
This issue is not caused by the code or the circuit the cable is connected to. It's an issue on the computer side, either with the AXE027 not being COM3 or the port in use by something else. Check in Device Manager that the drivers have been installed correctly too.
Thanks for the quick response. What is puzzling is that I can check the PICAXE connected multiple times through the AXE027 connected to COM3 with no problems. Then, I can download code to the PICAXE using the AXE027 connected to COM3 one time. But, then the next time I try to check the PICAXE connected or download code again still with the AXE027 connected to COM3, I get the error: Cannot open COM3. Nothing is different except that I have downloaded code one time.


ETA: After a lot of lost time, I discovered that commenting out the debug command in the code eliminated the issue. My question now is, "is this the way it's supposed to work?"

Thanks.
 
Last edited:

nick12ab

Senior Member
ETA: After a lot of lost time, I discovered that commenting out the debug command in the code eliminated the issue. My question now is, "is this the way it's supposed to work?"
In the past, having the debug command in your code will cause the debug window to open immediately after a download and the debug window requires use of the COM port.

Is the debug window opening anywhere in the background?
 

Technical

Technical Support
Staff member
If you have debug active (see 'orange' depressed button in screenshot) the COM port is already in use, receiving the 'debugging' data from your program.

When you then click 'Program' the debugging should be automatically stopped on that COM port, so that a new program can then be downloaded instead. This works ok in our testing, but seems to be your problem.

Is there a specific sequence that you can duplicate to re-create the problem?

A simple workaround may to be disable the debug (by clicking on the button) before trying to program.
 

Attachments

Technical

Technical Support
Staff member
Is the issue actually when you click 'check picaxe connected ' to see if chip is connected? It looks like this doesn't check to see if a debug is already in progress, so we will fix this.

What happens if you just click 'program' without 'check picaxe connected' (which is actually unnecessary before a program).
 

tracecom

Senior Member
Is the issue actually when you click 'check picaxe connected ' to see if chip is connected? It looks like this doesn't check to see if a debug is already in progress, so we will fix this.

What happens if you just click 'program' without 'check picaxe connected' (which is actually unnecessary before a program).
Currently, if there is a debug command in the program, no problems occur unless I "check picaxe connected," in which case I get the "Can't open COM3" error message. At that point, if I try to download the code, I again get the "Can't open COM3" error message. Disabling debug corrects the problem.

The reason I said "currently" is that I tried so many different things yesterday that I am not sure what the exact scenario was. However, I believe I stated it correctly in post one of this thread.

Thanks.
 

coparu67

Senior Member
I get the same error many times too when I'm working with my students.
And I don't know why sometimes PE6 raises the error and sometimes it works fine.
After the error, most of times we must close PE6, unplug the USB cable and begin again.
 

tracecom

Senior Member
I was wondering if this problem is under investigation in PE6, or has it been resolved, or is it deemed a non issue. Thanks.
 

Technical

Technical Support
Staff member
The next release has an extra check added to make sure debug is not already active upon a new download.
But you can also do exactly the same thing yourself as described in post #6.
 

tracecom

Senior Member
The next release has an extra check added to make sure debug is not already active upon a new download.
But you can also do exactly the same thing yourself as described in post #6.
Thanks for the update.

25 Aug 2015, ETA: I noted that the issue has been addressed in PE6 6.0.8.1. Thanks.
 
Last edited:
Top