CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 13, 2018, 21:58:40 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Cambam and GRBL  (Read 207 times)
tshawkins
CNC Ewok
*
Offline Offline

Posts: 3


View Profile
« on: November 09, 2018, 03:06:59 am »

Im new to CamBam, and CNC in general, but im struggling with coordinate systems

I have a small GRBL based CNC system with limit and homing switches fitted, and the ability to run the $H homing cycle

if i'm sitting looking at my machine from the front, looking down on the bed, the machine by default homes to the closest left hand corner of the bed, and because of backoff it considers that to be position (-4,-4). The default coordinate system that GRBL uses has negative numbers going left to right, and negative going closest to furthest, ie if i move my x position to the right hand side of the bed it will be at (-130,-4). This is apparently the default GRBL behavior and is expected, so the furthest away right hand corner is (-130,-100) based on the size of my bed.

Now CAMBAM seems to have an inverted coordinate scheme, in that the only way i can get negative coordinates is to move my work piece into the bottom left most quadrant of the drawing screen, where it is upside down and back to front.

Am i missing something obvious here, how can i align the coordinate system in CAMBAM with the physical CNC machine so i dont keep on having to do metal jiggery pokery to correct the coordinates.

I'm obviously missing something.

Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3654



View Profile
« Reply #1 on: November 09, 2018, 08:28:27 am »

The first thing is, have you seen this plugin for GRBL ?
http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/GRBLmachine.html

and the forum thread for it here; http://www.cambam.co.uk/forum/index.php?topic=6482.msg51798#msg51798
« Last Edit: November 09, 2018, 08:30:24 am by EddyCurrent » Logged
onekk
Wookie
****
Offline Offline

Posts: 390


View Profile
« Reply #2 on: November 09, 2018, 09:40:11 am »

Maybe, the coordinate system 0, is the right far corner, a little convention is that the machine coordinate are all negatives, so they are right, far from you and Z all high.


(case 1) This is one convention:

http://www.mechscience.com/wp-content/uploads/2017/12/image-133.png

(case 2) another convention, the one that i use and that is more easy, as all the machine coordinates (G53) are negative and all the working coordinate are in the right order (left to right as we are accustomed to read the XY cartesian Axis)
http://www.mechscience.com/wp-content/uploads/2017/12/image-136.png

But right or wrong, is a matter of taste, but with the "case 2" when you zero the G54 (1st working coordinates) the positive Y are far from you and the X increase to the right like in the cartesian axis.

Simply put the Xmin and the Ymin in the right position and all the things go in the "proper place".

I'm controlling Grbl with a little piece of code, bCNC, very used as it could run even on a little Raspberry Pi.

My two Cents

Regards

Carlo D.
Logged

Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam
Garyhlucas
CNC Jedi
*****
Offline Offline

Posts: 1169


View Profile
« Reply #3 on: November 09, 2018, 18:14:22 pm »

I never home my machine to any position of the spindle to the bed because it only matters if you are using soft limits to keep from crashing against the end stops.

The commonly used origin for milling is the upper left corner only because milling vises have a movable front jaw and working against a stop on the fixed back jaw allows you repeat the part.  For round parts you would likely want to work from center. On a router machine with vacuum or clamps it makes absolutely no difference. So position your spindle over the part at the same place you chose to put it in CamBam and zero the X and Y readouts and you are good to go.

Same deal with Z axis. Many people use top of part as zero. If the stock varies in height you may want to program from the table so you can cut the material to a specified thickness by simply machining at the appropriate Z height.  Again neither CamBam nor a CNC care which way you do it.
Logged

Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/
onekk
Wookie
****
Offline Offline

Posts: 390


View Profile
« Reply #4 on: November 10, 2018, 18:10:36 pm »

@GaryLucas  you are right, but if you are putting the 0 at the wrong place your working coordinate are reversed as the orginal author reported, saying that CamBam uses the wrong coordinates, resoect to GRBL.

As I'm a GRBL user and a CamBam user, I have pointed out that "wrong" is not the exact term, as Cambam uses the right coordinates, (0 to X+ moving to the right) and (0 to Y+) moving far from you, as in the cartesian Axis (like in the CamBam drawing Canvas).

The problem maybe is not setting G54 and not zeroing it at the correct place at the starting of the work, and maybe a wrong origin (and x direction settings).


Im new to CamBam, and CNC in general, but im struggling with coordinate systems

I have a small GRBL based CNC system with limit and homing switches fitted, and the ability to run the $H homing cycle

if i'm sitting looking at my machine from the front, looking down on the bed, the machine by default homes to the closest left hand corner of the bed, and because of backoff it considers that to be position (-4,-4). The default coordinate system that GRBL uses has negative numbers going left to right, and negative going closest to furthest, ie if i move my x position to the right hand side of the bed it will be at (-130,-4). This is apparently the default GRBL behavior and is expected, so the furthest away right hand corner is (-130,-100) based on the size of my bed.

Now CAMBAM seems to have an inverted coordinate scheme, in that the only way i can get negative coordinates is to move my work piece into the bottom left most quadrant of the drawing screen, where it is upside down and back to front.

Am i missing something obvious here, how can i align the coordinate system in CAMBAM with the physical CNC machine so i dont keep on having to do metal jiggery pokery to correct the coordinates.

I'm obviously missing something.


From these words I suspect that @tshawkins has some settings in his machine that are "incorrect" respect to  the "right" behaviour when machining a piece.

As I remeber when I've setup my GRBL machine, I've found some "instructions" using the "3D printer" convention of Z 0 at the bottom (working plane) and they placed the "Z min" limit switch at the bottom.

As I'm a owner of a 3d printer and  similar discussion are daily discussed on "3d printing forum" asking if a modified 3d printer firmware could be used to drive a CNC (dremel type ones, ad the CNC derived from 3d printers are not very stiff), and almost daily I'm struggling with those that didn't know these differences, and obstinately tell that a 3D firmware that didn't have the distintion between "working coordinates" and "machine coordinates" (some firmwares lack even a difference between G0 and G1) are perfectly usable for "CNC machining".

If I guessed wrong, I will apologize, but speaking of "wrong" behaviour about a widely used program like CamBam is somewhat "strange" if you are accustomed with a CNC.

Regards

Carlo D.


 
Logged

Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.118 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap