Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

Foam Cutter Display

Open rcKeith opened this issue 3 years ago • 67 comments

Hi DerAndere1 Thanks for your work on the 4 axis display. I have this issue compiling I followed your instructions and have commented out AXIS4_ROTATES and AXIS5_ROTATES in configuration.h Spent most of today to try and trace it but my skills aren't good enough. Any idea what might be causing this?

Error as below from VSCode Compiling .pio\build\mega2560\src\src\lcd\dogm\u8g_dev_tft_upscale_from_128x64.cpp.o Marlin\src\lcd\dogm\status_screen_DOGM.cpp:506:23: error: macro "BOTH" requires 2 arguments, but only 1 given #if BOTH(AXES4_ROTATES) ^ Marlin\src\lcd\dogm\status_screen_DOGM.cpp:30:0: error: unterminated #if #if HAS_MARLINUI_U8GLIB && DISABLED(LIGHTWEIGHT_UI)

rcKeith avatar Jan 31 '22 18:01 rcKeith

The error only happens when I define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER . This is the LCD I have which does work with the default Marlin 2.0 code. It shows a error in \Marlin-Marlin2ForPipetBot\Marlin\src\lcd\dogm\status_screen_DOGM.cpp cannot open source file "U8glib-HAL.h" (dependency of "dogm_Statusscreen.h") I wonder is there some dependency I need to add somewhere Thanks Keith

rcKeith avatar Feb 01 '22 08:02 rcKeith

@rcKeith

Hi. I made the initial tests a long time ago on the XY UV foam cutter, and I did write in planner.cpp a speed rule which is MAX ( speed(X,Y), speed ( U,V) ) to be used as the speed of cut for the max wire speed displacement. Have your tried this?

Regarding U8glib, this is not specific to that branch of Marlin with the multiaxis. Should not.... Unless nobody else has tried to compile a multi axis version on something else than STM32.

the piece of code \u8g_dev_tft_upscale_from_128x64.cpp is used to upscale by doubing pixels size to upscale from the small DOGM screen, and place a picture on a TFT RGB display 320x240. This is what we have on the Alfawise u30 STM32 board. For regular / standard black and white display, that should not be called.

There might be a problem in the options you selected in config.h.

hobiseven avatar Feb 01 '22 11:02 hobiseven

Hi Hobiseven Thanks for your reply. I've only been testing on a Mega2560 not connected to any motors yet. So not tried your planner.cpp. The reason for this is that I already have a GRBL Mega 5X compiled for the foam cutter https://rckeith.co.uk/grbl-hotwire-mega-5x-for-cnc-foam-cutters/ but it needs a Windows PC with the windows software I've adapted based on GRB-Panel. Several guys have asked can we run the foam cutter like a 3d printer so I started some investigations which have led me here. Yes, it looks like I may have some configuration issues. I'll look into it Thanks Keith

rcKeith avatar Feb 01 '22 13:02 rcKeith

Hi, Well, what you are looking for is exactly what this option in Marlin can do. So this is the right website you ended up at! This will work in a standalone mode with if needed firmware in an SDcard reader, and you can actually configure the Gcode reader to use the letters you want to designate the axis systems.

Regarding configuration, you need to be able to compile and then display on the 3 axis systems. Once that works, then I suggest to go for a 5 axis system, and do not use Z. I assume Mega 250 uses the regular DOGM display if I am correct.

If that does not compile anymore, it would mean that there is an error in the definition of the menus/includes of the additional axis. This is possible. As I only compiled for a TFT screen, using pixel doubling, I never tried you configuration , and I do not know wether or not @DerAndere1 did try that on a Mega. He might tell us!

Regards.

hobiseven avatar Feb 01 '22 14:02 hobiseven

Hi everyone. @hobiseven: for context: Keith asked for a feature to display axis positions on the DOGM display. The error reported here is due to the fact that I just added that feature to the Marlin2ForPipetBot_edge branch but made some typos.

@rcKeith: This shoud be fixed now in Marlin2ForPipetBot_edge. The reason why I added the LCD_SHOW_SECONDARY_AXES feature to the Marlin2ForPipetBot_edge branch is because we need to test both, the newest planner, as well as the position display, anyway. When testing the edge branch, please do not modify planner.cpp for now. just #define FOAMCUTTER_XYUV . That already does what you want: see the code in Marlin2ForPipetBot_edge :

https://github.com/DerAndere1/Marlin/blob/e9f3a607186fa593a16b3930710798db3472a611/Marlin/src/module/planner.cpp#L2122-L2125

I will prepare a seperate pull request for Marlin with just the LCD_SHOW_SECONDARY_AXES feature after everything in Marlin2ForPipetBot_edge works as expected.

DerAndere1 avatar Feb 01 '22 19:02 DerAndere1

@hobiseven nice to see that you are still active here. If you are interested, you can also test the https://github.com/DerAndere1/Marlin/tree/Marlin2ForPipetBot_edge branch. It contains a mayor overhaul of the planner that now works similar to LinuxCNC for other multi-axis machines. I hope, FOAMCUTTER_XYUV still works as before. You will have to rename LINEAR_AXES to NUM_AXES and make sure the new options AXIS4_ROTATES and AXIS5_ROTATES are not defined. Of cause, also add #define FOAMCUTTER_XYUV. Don't feel pushed, though.

DerAndere1 avatar Feb 01 '22 19:02 DerAndere1

@rcKeith: When the other people asked "can we run the foamcutter like a 3d printer" I hope they dont expect a slicer to outpt multi-axis G-code. That does not exist. You still have to use a dedicated CAM software to generate the G-code. Also, I am not aware of any G-code sender (host software) that has controls for 4 axes (besides yours). So, using Marlin with the usual G-code senders like pronterface or octoprint will be the same experience as using grblHAL with G-code senders for 3 axis CNC machines (e.g. UGS https://winder.github.io/ugs_website/). It works also for 4 axis foam cutters, but only through G-code, as no buttons for the 4th axis exist in the GUI of the host software.

DerAndere1 avatar Feb 01 '22 19:02 DerAndere1

Hi DerAndere1 No, they don't. It's usually because the foam cutter is quite a big machine in an outside workshop where they don't want to leave a laptop or a PC. I have several posts and videos showing how to generate g-code for foam cutters. Thanks for all your work on this. Keith

rcKeith avatar Feb 01 '22 19:02 rcKeith

Understood. customizing octoprint should be possible. I just saw this plugin for adding custom controls: https://community.octoprint.org/t/adding-my-own-buttons-to-the-control-tab-system-commands-not-gcode/4753

DerAndere1 avatar Feb 01 '22 20:02 DerAndere1

Yes, I had thought about that. I use it on my CR-10 V2 it works well on that. Keith

rcKeith avatar Feb 01 '22 20:02 rcKeith

btw. Keith, is it ok if I add a link to the download section of your home page in my wiki or blog? I like to gather links to software for multi-axis CNC machines.

DerAndere1 avatar Feb 01 '22 20:02 DerAndere1

Yes that fine, thank you

rcKeith avatar Feb 01 '22 21:02 rcKeith

Another combinatiion that might be worth investigating is grblHAL (the succesor of grbl that supports many boards and up to 6 axes) with https://pypi.org/project/bCNC/ (GUI for 3 or 6 axes). octoprint also has support for grbl: https://plugins.octoprint.org/plugins/bettergrblsupport/ . feedrate interpretation might not be as good as with Marlin's FOAMCUTTER_XYUV feature, though.

DerAndere1 avatar Feb 01 '22 22:02 DerAndere1

Hi Having these issues when trying to compile with status_screen_DOGM.cpp I have REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER defined in Configuration.h Tried my best to figure it out but no luck. Any help is greatly appreciated. image

Keith

rcKeith avatar Feb 02 '22 07:02 rcKeith

My bad again. hope it compiles now. Sorry, I dont have the time to test compilation.

DerAndere1 avatar Feb 02 '22 13:02 DerAndere1

Thanks, DerAndere1. Compiles fine thank you. Will update you when I have a working system. Keith

rcKeith avatar Feb 02 '22 17:02 rcKeith

Hi DerAndere1 I think I spoke too soon about the compilation. I didn't have defined LCD_SHOW_SECONDARY_AXES in Configuration_adv.h. When I defined it I get a #if LCD_SHOW_SECONDARY_AXES expected an expression error. I've attached a screenshot.

Hope I'm not taking too much of your time Thanks

LCD_SHOW_AXIS

rcKeith avatar Feb 03 '22 15:02 rcKeith

Can you Change that erroneos Line to

#if ENABLED(LCD_SHOW_SECONDARY_AXES)

? Im not at my PC right now

DerAndere1 avatar Feb 03 '22 18:02 DerAndere1

Hi DerAndere1 That did it, thank you very much Keith

rcKeith avatar Feb 03 '22 18:02 rcKeith

Can you attach a photo of how the status screen looks like with LCD_SHOW_SECONDARY_AXES when you have your setup ready? When I have seen the result, I could then further develop this feature to get some of the icons back and squeeze the positions of secondary axes into one small corner of the screen,

DerAndere1 avatar Feb 06 '22 14:02 DerAndere1

Hi Yes, no problem it's going quite well. I have been adding some menus and hiding the Z-axis. Will get some pictures out today or tomorrow. Keith

rcKeith avatar Feb 06 '22 14:02 rcKeith

Hi DerAndere1 Photo attached of the status screen xyuv-marlin (Medium) Keith .

rcKeith avatar Feb 06 '22 16:02 rcKeith

When you have time, Can you test the latest Marlin2ForPipetBot_edge ? With your existing configs (LCD_SHOW_SECONDARY_AXES enabled), it should now show the positions for the extra axes in the top right corner instead of the fan icon. This should now allow other icons to be displayed.

DerAndere1 avatar Feb 07 '22 01:02 DerAndere1

@rcKeith

So right now, it seems that you have all compiled and working fine on a Mega2560, is this correct? You also have this LCD display with a few buttons, correct? I will have to also recompile on the Mega, as my Foam cutter was initially using the mega + a ramps all running with the Jedicut plugin. It will be simpler for me to reuse the Mega, although I did debug the code initially only on an STM32... Do you have a git accessible with your config please? I have to cut new foam profiles ... Do you also manage the heat percentage?

hobiseven avatar Feb 07 '22 11:02 hobiseven

Hi Yes compiled and working on the Mega2560 but haven't actually connected any motors yet to confirm pinouts. Hopefully later this week. The LCD is working with a few custom menus and I have updated the language file as well. I've created a GitHub repository here https://github.com/rcKeith/MarlinFoamCutter but haven't added those changes from your last email. We've been to the vet's this morning with our dog. Had a few problems with him but he's fine now, The heat control is via the D8 connector on the RAMPS board which is the same as the spindle control so I've set that as a percentage reading and altered the language file to say Heat control instead of Spindle. I haven't used GitHub a great deal so hopefully, the repository is OK. I'll add those changes later today. Thanks Keith

https://rckeith.co.uk http://www.rckeith.co.uk

On Mon, 7 Feb 2022 at 11:03, Olivier Briand @.***> wrote:

@rcKeith https://github.com/rcKeith

So right now, it seems that you have all compiled and working fine on a Mega2560, is this correct? You also have this LCD display with a few buttons, correct? I will have to also recompile on the Mega, as my Foam cutter was initially using the mega + a ramps all running with the Jedicut plugin. It will be simpler for me to reuse the Mega, although I did debug the code initially only on an STM32... Do you have a git accessible with your config please? I have to cut new foam profiles ... Do you also manage the heat percentage?

— Reply to this email directly, view it on GitHub https://github.com/DerAndere1/Marlin/issues/65#issuecomment-1031340513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDLLTZONIEPNRWXB5H7UPDUZ6RHXANCNFSM5NHALHJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

rcKeith avatar Feb 07 '22 13:02 rcKeith

Hi DerAdnere1 Have an error at line 741 in dogm_StatusScreen.h It looks like it's trying to reference a macro NEITHER which doesn't; seem to be defined. Keith image

rcKeith avatar Feb 07 '22 15:02 rcKeith

Ah you have been too fast :D I corrected that error just after asking you to test. Should be fixed already

DerAndere1 avatar Feb 07 '22 20:02 DerAndere1

OK, I'll try again tomorrow, thanks Keith

https://rckeith.co.uk http://www.rckeith.co.uk

On Mon, 7 Feb 2022 at 20:06, DerAndere @.***> wrote:

Ah you have been too fast :D I corrected that error just after asking you to test. Should be fixed already

— Reply to this email directly, view it on GitHub https://github.com/DerAndere1/Marlin/issues/65#issuecomment-1031870048, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDLLT2MOOACV6BLXMZ4BPLU2AQ35ANCNFSM5NHALHJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

rcKeith avatar Feb 07 '22 20:02 rcKeith

Regarding your repository: it is ok to upload a local copy of the source code to your repo, but you lose the old commit history, so it will become more difficult to track authorship and to update your code with changes from upstream. Therefore, it is usually recommended to start with a fork as described below. I wrote down a detailed description of how to do it with VSCode/PlatformIO IDE here: https://derandere.gitlab.io/version-control#:~:text=Using%20Git%20with%20Microsoft%20Visual%20Studio%20Code%20and%20GitLens

  1. fork my repo https://github.com/DerAndere1/Marlin on github: https://docs.github.com/en/get-started/quickstart/fork-a-repo
  2. , then git clone your new remote repo (the fork) to get a local copy under version control that preserves the whole commit history
  3. Switch to the Marlin2ForPipetBot_edge branch of your local repository (git checkout Marlin2ForPipetBot_edge)
  4. Create a new local branch (e.g. called master) from the Marlin2ForPipetBot_edge branch.
  5. Switch to the master branch (git checkout master). Make your modifications and commit your changes to that new branch.
  6. git push the changes to the online repository
  7. You can then go to the settings of your github repo and change the default branch to master: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository
  8. You can delete your old repository on github and rename your new repository later. The warnings can be ignored if your repo was not forked by others.
  9. Clone the renamed repository to continue commiting changes to it.
  10. You can change the description of the repository anytime

DerAndere1 avatar Feb 07 '22 21:02 DerAndere1

Hi Followed the instruction you sent and just one repository forked from yours. Thanks Keith

https://rckeith.co.uk http://www.rckeith.co.uk

On Mon, 7 Feb 2022 at 21:22, DerAndere @.***> wrote:

Regarding you repo: it is ok to upload a local copy of the source code to your repo, but you lose the old commit history, so it will become more difficult to track authorship and to update your code with changes from upstream. Therefore, it is usually recommended to

  1. fork my repo https://github.com/DerAndere1/Marlin on github: https://docs.github.com/en/get-started/quickstart/fork-a-repo
  2. , then git clone your new remote repo to get a local copy under version control that preserves the whole commit history
  3. Create a new local branch (e.g. called master) from the Marlin2ForPipetBot_edge branch.
  4. Switch to the master branch (git checkout master). Make your modifications and commit your changes to that new branch.
  5. git push the changes to the online repository
  6. You can then go to the settings of your github repo and change the default branch to master: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository
  7. You can delete your current repository on github and rename your new repository later: https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository . The warnings can be ignored if only you contributed changes after the forking.

— Reply to this email directly, view it on GitHub https://github.com/DerAndere1/Marlin/issues/65#issuecomment-1031937939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDLLTYR7CCDH2CMTVRGQZLU2AZXTANCNFSM5NHALHJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

rcKeith avatar Feb 08 '22 07:02 rcKeith