The GCode section

@Mark

Question, so I noticed when I tried to do my first carve last night which was from GCode generated out of Easel, the carve went well but the machine did not prompt to probe like it does when I ran your sample file that came with the machine.

My question is, does the code in the GCode section of the controller get injected into ALL jobs that the machine runs, or is there something I need to add to the code for example from Easel to get it to probe as the sample file does? If it does not, is there a way to auto inject it into the code so it always prompts no matter what file you use?

First few lines of my Easel file:

G20
G90
G1 Z0.15000 F9.0
G0 X2.30038 Y2.99948
G1 Z-0.15000 F15.0
G1 X2.30209 Y3.00787 F60.0
G1 X2.29376 Y3.01270 F60.0
G1 X2.28934 Y3.01059 F60.0
G1 X2.28848 Y2.99960 F60.0

It has to do with the post processor that @Mark used when he programmed that file. (vectric with the post processor that asks for probe). M6 is the probe command. Easel does not put an m6 probe command in their export gcode, so if you use easel, it will never ask to probe during the cut. You’ll need to probe before running the file.

1 Like

to answer your question, all the code in the gcode section of the controller does is tell the controller what to do when it receives a m/g/s/f/gcode command.

1 Like

adding @charleyntexas

Can I not just add this code to my GCode export from Ease to achieve the same thing?l:
M70
G21
G0 Z100
M0 M6 (MSG, Attach T-Plate & Magnet to Router)
F100
G91
G0 Z100 [OR should this line be: G38.2 Z-100]
G0 Z25
M0 (MSG, Remove T-Plate & Magnet)
M72

In reading through the Buildbotics manual it looks like that is right, at least to my novice eye.

Thanks,
-Alex

at this to the very top of the easel gcode to add probing:
T1 M6

1 Like

Thanks… that’s exactly what I needed… much appreciated!

1 Like

Any idea why I’m getting this error?

Level Source Location Repeat Message
message Planner MCT Oil Holder.nc:5 1 Attach T-Plate & Magnet
error Planner Planner.py:370 1 Traceback (most recent call last): File “/usr/local/lib/python3.5/dist-packages/bbctrl-1.0.2-py3.5.egg/bbctrl/Planner.py”, line 367, in restart self.planner.restart(id, position) RuntimeError: Planner ID 40680 not found. Queue empty.
error Planner Planner.py:383 1 Z axis position -133.737mm is less than minimum soft limit -133mm While executing GCode block:G1 Z-0.625 F15 At: ./upload/MCT Oil Holder.nc:13827 Caused by: Z axis position -133.737mm is less than minimum soft limit -133mm
message Planner MCT Oil Holder.nc:10 1 Remove T-Plate, Magnet & Start Spindle
message Planner MCT Oil Holder.nc:5 1 Attach T-Plate & Magnet

Hey Alex… Looks like your bit can’t reach the bottom of your cutting profile. If possible, try pulling the bit out of the router collet by roughly 1mm (looks like you need at least .737mm more), or use a longer bit. If these suggestions aren’t possible, try mounting the Z-Slider using the lower set of holes or adding another layer to your wasteboard. Hope this helps. Please let me know how it goes. Talk soon…

2 Likes

Alex,
For future reference, only one M code is allowed for each line of code. M0 is program stop, and M6 is tool change.
More than one G code is allowed as long as they are not from the same group. Example, you cannot put a G0(rapid move) and a G1(linear feed rate move) on the same line.

4 Likes

Thank you Steven, that is super helpful. I was reading the buildbotics manual and they had both on a single line. So without that understanding it made sense to have both, but with your clarity it makes it more clear for sure.

Cheers’

Alex,
If you saw it in the Buildbotics manual, I may be mistaken about this controller. My 40+ years of programming G-code for CNC milling machines was mostly with Fanuc controllers. On their controllers, the rule is that only one M-code is allowed for each block of code. My apologies if I confused the issue.

1 Like

Thanks Steven

I’m sure putting it on two lines is safer and I cannot see any downside of doing that as it will be the next executed line regardless.

Appreciate your help and the experience you bring to the board!

-Alex

Just so you know, you can actually manually edit your gcode files and add multiple optional stop points and message boxes that will popup on screen giving you custom messages.

I created a gcode file that is actually a combination of four different carving files to carve 4 different parts. The parts are placed in a jig so they are always aligned the same. After each part is finished I inserted an optional stop code (M0) with a message to attach my probe magnet. When I click continue, the spindle moves to a pre designated location and probers the Z height and resets it. Then moves back to home and another MO with a message tells me to remove the magnet. When I remove the probe magnet and click on Continue, the router turns on automatically and it carves the part it just probed. This repeats until the last part is carved and the spindle moves towards the back of the machine instead of home so it is out of the way for me to change the parts out for the next set.

After I change out the parts putting in fresh blanks, I just hit the play button and the spindle moves to home and the first optional stop pops up telling me to put on the probe magnet. and everything just repeats. If you are making the same parts over and over this is a huge time saver.

2 Likes

Hi Charlie,
I am hoping you would give an example of a Gcode that you added these stops?