Notifications
Clear all

Is it possible to automatically insert beeps in g-code  

  RSS
hawai
(@hawai)
Estimable Member
Is it possible to automatically insert beeps in g-code

Hi all,

 

admittedly this is an almost non problem. When I do calibration squares for new filaments I constantly forget to manually insert the halftime beeps into the g-code that would remind me to change the z-adjust. Of course I can and do insert those manually later, but is there a way to include them in the .3mf?

 

Cheers

Hansjoerg

Posted : 16/06/2021 1:42 am
bobstro
(@bobstro)
Illustrious Member
RE: Is it possible to automatically insert beeps in g-code

I can't think of a clever way to detect that you're partway through printing a single layer. All the custom gcode options are for layer changes. You can slice your part, then use the horizontal layer progress slider to see the XY & Z position, then search the gcode based on that info.

There may be a better gcode analyzer that shows the gcode line-by-line as it simulates the print, but I can't think of any offhand.

Edit: gcode.ws will do it. Preview the print to where you want to insert the beep commands, then select the gcode tab.

My notes and disclaimers on 3D printing and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan...
Posted : 16/06/2021 1:54 am
hawai
(@hawai)
Estimable Member
Topic starter answered:
RE: Is it possible to automatically insert beeps in g-code

Thanks bobstro,

 

I was afraid that would be the case. I will have to try to remember every time I slice a new calibration square. I used gcode.ws to identify the correct spots and was at least smart enough to save the relevant line so that I can search the new gcode directly for that spot...

Posted : 16/06/2021 4:28 am
Swiss_Cheese
(@swiss_cheese)
Prominent Member
RE: Is it possible to automatically insert beeps in g-code

I haven't tried it but couldn't you do it by estimated time?

 

just spitballing

 

Swiss_Cheese

The Filament Whisperer...
Posted : 16/06/2021 4:48 am
bobstro
(@bobstro)
Illustrious Member
RE: Is it possible to automatically insert beeps in g-code
Posted by: @swiss_cheese

I haven't tried it but couldn't you do it by estimated time?

Pary of the problem is that there are no time hints within a single layer like a 1st layer calibration print. All time codes are inserted between layers. Going by line count might work since each segment is the same amount of gcode regardless of length, but it'll still be a manual process.

I suppose you could be clever knowing the print is a flat square and write a script to identify the extreme XY coordinates for the start and stop points of a segment.

At least that's all I can think of!

 

My notes and disclaimers on 3D printing and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan...
Posted : 16/06/2021 2:10 pm
karl-herbert
(@karl-herbert)
Illustrious Member
RE: Is it possible to automatically insert beeps in g-code
Posted by: @hawai

Hi all,

 

admittedly this is an almost non problem. When I do calibration squares for new filaments I constantly forget to manually insert the halftime beeps into the g-code that would remind me to change the z-adjust. Of course I can and do insert those manually later, but is there a way to include them in the .3mf?

 

Cheers

Hansjoerg

What the slicer can't solve to my satisfaction can be automated e.g. with a Python script when calling the postprocessor. To do this, simply query one or more conditions and then insert them into the gcode.
To give an example of the procedure: prusa-i3-mmu2s-mmu2

wbr,

Karl

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen....
Posted : 16/06/2021 6:52 pm
hawai
(@hawai)
Estimable Member
Topic starter answered:
RE: Is it possible to automatically insert beeps in g-code

@Karl:

That seems a bit of an overkill to me. Learning Python just to counteract my lazy stupidity is honestly way too nerdy even for me 😉

 

Cheers

Hansjoerg

Posted : 16/06/2021 8:39 pm
bobstro
(@bobstro)
Illustrious Member
RE: Is it possible to automatically insert beeps in g-code
Posted by: @hawai

[...] That seems a bit of an overkill to me. Learning Python just to counteract my lazy stupidity is honestly way too nerdy even for me 😉

I did some postprocessing scripts back before a lot of features were added to PrusaSlicer. It's not that hard, and you don't have to code them in python. For something you'll do very infrequently though, it's definitely overkill. 

One of my scripts would determine the minimum and maximum X&Y positions throughout a print. It could easily be modified to look for the longest XY move -- something that will only be useful on such a test print -- and insert some gcode. As long as your prints are rectangular or circular, it would work.

My notes and disclaimers on 3D printing and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan...
Posted : 16/06/2021 9:14 pm
karl-herbert
(@karl-herbert)
Illustrious Member
RE: Is it possible to automatically insert beeps in g-code

@hawai

It is only one possibility of several. I use a Raspi and often use a simple bashscript to edit the gcode and start printing. If you are a bit familiar with Unix/Linux, you can create simple scripts quite quickly.

wbr,

Karl

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen....
Posted : 16/06/2021 9:45 pm
Share: