Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Ultimaker Cura 4.2.1
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Ultimaker Cura 4.2.1

by fid on Tue Apr 07, 2020 3:25 pm

Hi,
I have a PyGamer plugged into my Mac (Catalina) via USB. The PyGamer is running CircuitPython 5.1.0. It has a python code moving a sprite around on the screen. When I start up Ultimaker Cura 4.2.1 and get to its screen the CircuitPython crashes back to the >>> prompt and displays S2M105. It repeats the M105 continuously until I close Cura. It looks like S2M105M105M105M105... Gcode M105 is get temperature. I don't know what the S2 means, but it seems like it should not crash the running python code.

I haven't overclocked the PyGamer and I am using common python commands. I don't have a windows computer to test this to see if it also bonks the running python code.

I will test it with the basic blink the LED code to see if that still crashes. Yes, it still crashes.

The screen on the PyGamer reads:
Code done running. waiti
ng for reload.

Adafruit CircuitPython 5
.1.0 on 2020-04-02; Adaf
ruit PyGamer with samd51
j19
>>> S2M105M105M105


When I launch MU to write the code and save it to the PyGamer, the code doesn't automatically run. Mu is not usually running when PyGamer crashes. It saves the code, but I have to press the RESET button to get the code to run.

Does this also happen on a computer running Windows? Is it something I am going to have to live with?

It must be something that a broadcast to USB from Cura is causing CircuitPython to crash. Is there something I can include in my code to prevent this from happening?

Perhaps I should see what happens when I try a different slicer.

fid
 
Posts: 55
Joined: Wed Sep 25, 2013 3:00 pm

Re: Ultimaker Cura 4.2.1

by mikeysklar on Tue Apr 07, 2020 7:07 pm

Hello fid,

Are you seeing the same behavior with Cura 4.5 for OS/X?

I also use Cura as my slicer from my Mac and have always printed over WiFi. I'm not connecting a USB cable directly to the printer as Ultimaker discourages it on their forums.

https://community.ultimaker.com/topic/1 ... g-via-usb/

You should be able to disable the USB printing by either disconnecting any USB connection to your 3D printer or re-adding your printer as a WiFi device.

mikeysklar
 
Posts: 1243
Joined: Mon Aug 01, 2016 8:10 pm

Re: Ultimaker Cura 4.2.1

by fid on Tue Apr 07, 2020 8:12 pm

Thank you mikeyskylar. I will go get the latest version.
I have only copied the sliced gcode files to an SD card and printed from there. It is strange that a USB poll request would cause python to drop out of what it was doing. Maybe that is the nature of the beast since the PyGamer is connected to the computer as a USB drive.
I just tested it with a CircuitPlayground Bluefruit. I had the D13 LED running a PWM to make the LED go from off to brighter and back dimmer to off. I started up Cura and it killed the running of the program on the CircuitPlayground.
If I have MU running with the code.py from the CircuitPlayground listed on the files for editing and I start Cura the program stops running. If I have the Serial panel in MU showing and I start Cura then the program running on the CircuitPlayground does not stop running. I am going to have to figure out this one.
I now have Cura v4.5 installed. I get the same behavior with the new version. I think I am going to have to make sure the Serial panel is open in MU when I am programming and decide to slice an stl file.

fid
 
Posts: 55
Joined: Wed Sep 25, 2013 3:00 pm

Re: Ultimaker Cura 4.2.1

by mikeysklar on Wed Apr 08, 2020 3:19 pm

Hi fid,

I think I understand part of what is happening. CURA will grab the serial port if you are not already holding it open with the MU serial panel. If CURA is able to start spewing out Gcode commands it will crash the CircuitPython REPL prompt.

mikeysklar
 
Posts: 1243
Joined: Mon Aug 01, 2016 8:10 pm

Re: Ultimaker Cura 4.2.1

by siddacious on Wed Apr 08, 2020 8:07 pm

TLDR: In Cura, open Market > Installed > Uncheck "USB Printing", restart

I ran into this same issue myself a while back. Cura has the obnoxious default behavior of sending GCODE commands on what seems to be every available Serial port to support USB printing.

You can see the bug hunt here:
https://github.com/adafruit/circuitpython/issues/2585

and the Issue in the Cura repo:
https://github.com/Ultimaker/Cura/issues/5207

siddacious
 
Posts: 271
Joined: Fri Apr 21, 2017 3:09 pm

Re: Ultimaker Cura 4.2.1

by mikeysklar on Thu Apr 09, 2020 4:48 pm

Thank you for the solution siddacious.

mikeysklar
 
Posts: 1243
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.


cron