Author Topic: First Post, First Project, & Some Questions  (Read 10714 times)

Offline Tool-n-Around

  • Storm Trooper
  • ***
  • Posts: 211
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #45 on: August 02, 2021, 23:37:37 pm »
Hi Kelly.....As your just starting out with GRBL you should consider this plugin below as it'll save you a lot of grey hairs, it's tightly integrated with CB and works well and is really one of those must have plugins if you have an GRBL powered machine.

https://cambamcnc.com/forum/index.php?topic=6482.0

Happy cnc'ing. Dave

So I read all 12 pages of that, most of which is over my head but gathered it's a plug in that would allow me to run my GRBL machine directly from CamBam via th eplug in, correct?......and it would replace what is now UGS, correct?

I'm a little skittish about doing so but at the same time would like to simplify life where possible. I got the EMI issues sorted but now I'm struggling a bit with the machine set up and may have some XY+- travel convention errors. I posted this at the machine forum but it is pretty thinly traveled. Seems like a silly thing to be hung up on but any help would be appreciated.

I went through UGS set up wizard and tried to cut the demo file that cuts the Mill Right Name/logo and was getting soft limit errors and (air) cutting that didn't occur over the stock. As I recall, I believed the issue was wrong direction of travel designated on the Y axis. I swapped that in the set up wizard and after issuing a G92 X0 Y0 Z0 command with the cutter at the front/lower left corner of the stock, the demo file cuts just fine and still does now. However, now that I have created some of my own gcode files (from CamBam), I'm once again getting soft limit errors because the stock is in a different place than expected by the machine.

All the following reads from the convention of standing in front of the machine. The front of the machine is looking at the gantry from the side of the z-axis rails and router mount. For the avoidance of doubt, my machine homes to the back left corner when standing in front of the machine, because that's where the MegaV assembly video showed the limit switches.  But the beginners guide says when you execute $H the machine will home/move to the back right corner. ??? How can that be if both the X&Y limit switches aren't located there?

So as I'm set up, my machine happily homes to the (my) back left corner. It jogs with X+ being movement to the right, but Y+ is movement away from the front whereas the quickstart/beginner's guide says movement away from the front should be Y- (z- is down and Z+ is up so that is fine).

After I am homed, if I jog the spindle to the front left corner the DRO says I'm at about -34"(x), -34"(y). So isn't the homed location supposed to be 0,0? and Y axis aside, why isn't the front left corner X=0 if movement to the right is supposed to be X+?

The thing I don't understand is, if I issue G92 X0 Y0 Z0 with the spindle at the lower left corner of the stock near the front left corner of the machine, the demo file runs fine with the machine set up as is but doesn't run properly on any other file I download. It wont cut the demo file is if change the Y axis convention to that stated in the guide (Y- away from front). Do I possibly have two things flipped?

I'd really like the front left corner of the machine to be 0,0,0 for several reasons with X+ to the right and Y+ away from the front. First, everything I have drawn and have seen has the XY origin in the lower left corner of the screen with positive X+ to the right and Y+ upward and to me and my brain, that corresponds to the front left corner of the table, with X+ to the right and Y+ away. So to achieve this, would I need to move the homing switch to the front left corner and get the +/_ convention set properly with X= to the right and Y+ away? Would that do it? The other reason is the front left seems to be the most convenient for tool change but I suppose it could always be moved there for such.

I must have the cnc twisties and may need to change my screen name to dyslexia....or is that Lysdexia? LoL.


Best,
Kelly

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8820
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #46 on: August 03, 2021, 00:00:45 am »
"I'd really like the front left corner of the machine to be 0,0,0 for several reasons with X+ to the right and Y+ away from the front."
------------------------------

That's the correct way to view any CNC machine.  CB is perfectly-capable of making that the origin.  I do -- most of us do.

Most folks don't make the exact 'limit of travel' to be 0,0,0, but pick the spot at the very front-left corner of the work as being that.  Most machines travel sufficiently past both edges of a work-piece in both X and Y, such that there's a bit of 'over-travel' available in order to cut clear to the edges.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Tool-n-Around

  • Storm Trooper
  • ***
  • Posts: 211
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #47 on: August 03, 2021, 00:28:06 am »
"I'd really like the front left corner of the machine to be 0,0,0 for several reasons with X+ to the right and Y+ away from the front."
------------------------------

That's the correct way to view any CNC machine.  CB is perfectly-capable of making that the origin.  I do -- most of us do.

Most folks don't make the exact 'limit of travel' to be 0,0,0, but pick the spot at the very front-left corner of the work as being that.  Most machines travel sufficiently past both edges of a work-piece in both X and Y, such that there's a bit of 'over-travel' available in order to cut clear to the edges.

Lloyd

That's good to know because I think that means I either have conflicting instruction from the machine manufacturer or I'm misinterpreting the instruction. In my mind, you could home in any corner and as long as the direction of travel was correct, seems like it should be fine after the G92 call, right? But, and I know you can do it with the G54 and up commands, but for the sake of simplicity, if you wanted to intuitively send the spindle to a table position, doesn't it make more sense for the front left corner to be 0,0,0? and if so, dont the limit switches need to be there? FWIW, the machine is supposed to back off the homed position 4mm in each axis after homing.

Still scratching my head a bit.

Best,
Kelly

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8820
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #48 on: August 03, 2021, 00:55:37 am »
Kelly,
The front-left corner of the WORK is 0,0,0.   That's NOT the 'home' position.  The front-left limit of travel is usually past the corner of the work, in both directions.

My two bed-router machines 'zero' at about -9" in X and about -5" in Y from the front-left of the work-piece, assuming a 4'(X) x 8'(Y) sheet of stock.

My milling machine zeros about 2" left and 2" below my customary placement of the work, which might be any size up to 18"(X) x 12"(Y).

Lloyd



« Last Edit: August 03, 2021, 00:59:40 am by lloydsp »
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Tool-n-Around

  • Storm Trooper
  • ***
  • Posts: 211
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #49 on: August 03, 2021, 01:32:47 am »
Kelly, The front-left corner of the WORK is 0,0,0.   That's NOT the 'home' position.

This I understand. What I don't understand is this: If I jog X+ the spindle moves right and Y+ is away from the front of the table. After I home in the back left corner of the table, when I jog back to the front left corner, the DRO says the position is (-34".xx,-34.yy"). So I understand Y= -34" and change because I jogged the spindle in the negative direction from home just about to the limit of travel, but why does X = -34.xx"?

Isn't machine zero supposed to be where you are homed and work zero where I call G92 X0 Y0 Z0? The origin of my CB part is offset in the stock such that the lower left hand corner of the stock is 0,0,0. Isn't that location what you would expect it to be placed at the G92 command? What appears to be happening is that is indeed the case but because the machine thinks I'm at -34,-34, all the machine work is outside the limit of the work space beyond the far right corner of the machine, resulting in error.

The front-left limit of travel is usually past the corner of the work, in both directions. My two bed-router machines 'zero' at about -9" in X and about -5" in Y from the front-left of the work-piece, assuming a 4'(X) x 8'(Y) sheet of stock.

The advertised XYZ work space on the machine is 35 x 35 x 3.75. The router spindle overshoots the front edge of the table/wasteboard by a couple inches but I could extend the table surface several inches forward beyond the machine framework if I need every inch of workspace travel.

Best,
Kelly
« Last Edit: August 03, 2021, 13:18:12 pm by Tool-n-Around »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1745
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #50 on: August 03, 2021, 12:15:48 pm »
Hi Kelly

The Homing and soft limits are in G53 "Machine Co-ordinates"
There are what they call workspaces, for you the important one's are
Machine c-ordinates and part or work piece co-ordinates.
The homing switches being where they are is ok, as this would (after an homing operation)
move the machine a convenient place so that you can load and unload the stock unencumbered.
where the co-ordinates are\can be  set to zero in G53 they don't always have to be zero, and could
be the tool changer co-ordinates.
This page has a reasonable amount of info directly related to what your doing now.

https://github.com/gnea/grbl/wiki/Grbl-v1.1-Commands
Quote
If you are using soft limits then you may have to set these parameters:
Set your $130,$131, and $132 max travel settings if you plan on using homing or soft limits. It's recommended to enter something approximately close to actual travel now to avoid problems in the future. Note that $130,$131, and $132 max travel parameters correspond to the 'Machine coordinates' parameters in grblControl.

It's ok for the homing to be where it is at the back of the machine.
this position is not the work piece x0,y0,z0.

If ok for you to have your drawing co-ordinates XYZ=0 at the lower left hand corner.
You then place the work piece in the upper right hand quadrant.
In the picture I've made a blue rectangle in my start up template.
This represents the machine work envelope.
This is a visual cue for me to place anything outside this area. else you'll hit the limits

If a new user fails take this into account and there’d followed the recommended set up for the machine and drawing
procedure may not  realise that some tool paths can dip in to negative territory triggering the hard or soft limits. I have my soft limits turned off for the grinder and laser, but if you do want to use then then you have to set them in your controller as above.

Side note: I very seldom on the mill use homing,(because I start my drawings from a template)
 I just indicate stock in and smash that start button.
I went and had a look at your blog it was a good read.
I do have some thought's about the cad, If you are happy with the terms and conditions for fusion
then it would be the one to learn.
If you want a “buy once” parametric modeller then there are a few of those too.
If you want a free one then freecad is a good choice, I use the linkstage version not
the downloadable current version.
Here is a pic of the freecad linkstage screen displaying a model that I 3d printed in various
sizes.
There is a shreen shot of GRBLMachine running the manifold file with live up dates to the CB drawing screen,I will post the CB file that is running in GRBLMachine as well.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1745
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #51 on: August 03, 2021, 12:56:49 pm »
Couldn't get the last pic in.

Offline Tool-n-Around

  • Storm Trooper
  • ***
  • Posts: 211
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #52 on: August 06, 2021, 16:06:04 pm »
I haven’t gone away. Just had to step away for a couple days and remove all the sharp objects from my shop! First I must say I appreciate your help and patience. I spoke with Gary yesterday and he is helping as well. Long post but maybe it will click.

I now have six cb files made. Two for this part (base and lid), and 4 others for an air filter assembly, top and bottom feature of the AF base and lid. They all look good in CB, nicely generate the expected tool paths in cb, and simulate well in CAMotics. None of them will run on my machine. I’ll try to stick with this part for now and post the others when I get my machine sorted. I think I have different issues with different parts, and think I still have intermittent EMI issues.

On the EMI, sometimes when I jog, if I hold the jog button, my machine will occasionally throw an error about receiving an unexpected command from the controller and pause. But it won’t (always) alarm or hold and I can usually resume by reengaging the jog. My homing wires as supplied with the machine are neither shielded nor twisted pairs and I think the are 5v signal. If I set my lap top computer in my machine space, even with no machine movement, my touch pad becomes unresponsive until I move the computer. I’m going to buy some shielded cable for the homing switches, check the stepper cable shielding, and replace those if necessary. -Just isn’t worth it.

The Homing and soft limits are in G53 "Machine Co-ordinates" There are what they call workspaces, for you the important one's are Machine c-ordinates and part or work piece co-ordinates. The homing switches being where they are is ok, as this would (after an homing operation) move the machine a convenient place so that you can load and unload the stock unencumbered. Where the co-ordinates are\can be  set to zero in G53 they don't always have to be zero, and could be the tool changer co-ordinates.

This much I understand and have done. Just to save the read back, homing switches are in left rear corner of table and X+ motion to the right, Y+ away from front of table. I home, issue G10 L20 P0 X0 Y0 Z0. Move to a convenient position near the front of the table, issue G10 L20 P1 X0 Y0 Z0 and then G54 (and also G20 to make sure units are correct). I have also tried G92 X0 Y0 Z0 but no matter what, I’m in negative XY machine space. I understand Y being negative because I moved in the negative direction from machine 0, but I don’t understand why I am in X- space when I zeroed and moved in the positive direction.

If you look at the picture I attached, it looks like the controller thinks I have placed the entire part outside the machine space. Am I interpreting that correctly?

In the CB file, I have not changed the Machine Origin from 0,0

By moving my work origin to the right, I can get closer to the machine space but never in it. This has me perplexed because I have a trail file from the machine manufacturer and it positions exactly where I expect it to and runs fine. I also have another file I created that positions and runs through the first MOP but then fails because of the same error 33. I guess it doesn’t like an arc imbedded in the poly line.

I attached a pdf of the console dialogue including the errors after sending the file. That erro 33 I get on other files.

I had and did re-read the Github link so thank you.

If you are using soft limits then you may have to set these parameters: Set your $130,$131, and $132 max travel settings if you plan on using homing or soft limits. It's recommended to enter something approximately close to actual travel now to avoid problems in the future. Note that $130,$131, and $132 max travel parameters correspond to the 'Machine coordinates' parameters in grblControl.

I believe I have these set properly. I did it in USG set up wizard but I can’t jog beyond the soft limits so I think I’m good there. I think you can see it in the attached a pdf (albiet in mm) with the command and response string. I edited out the pages of jog commands but left the (EMI induced?) error.

It's ok for the homing to be where it is at the back of the machine. This position is not the work piece x0,y0,z0. If ok for you to have your drawing co-ordinates XYZ=0 at the lower left hand corner.

I’m not so hung up on the back left being XYZ=0. I figure the important thing is the direction of travel signage is correct because once G54 or G92 is established, it shouldn’t matter other than soft limits, right?

You then place the work piece in the upper right hand quadrant.

This I don’t understand. Why upper right quadrant?

In the picture I've made a blue rectangle in my start up template. This represents the machine work envelope. This is a visual cue for me to place anything outside this area. else you'll hit the limits

Need to learn to do this. Is this same as bounding box?

If a new user fails take this into account and there’d followed the recommended set up for the machine and drawing procedure may not realise that some tool paths can dip in to negative territory triggering the hard or soft limits. I have my soft limits turned off for the grinder and laser, but if you do want to use then then you have to set them in your controller as above.

This may indeed be the case but until I get my head straight and machine debugged, I’ll leave soft limits on. I think I’d have crashed my machine 20 times by now without them.

I do have some thought's about the cad, If you are happy with the terms and conditions for fusion then it would be the one to learn. If you want a “buy once” parametric modeller then there are a few of those too. If you want a free one then freecad is a good choice, I use the linkstage version not the downloadable current version.

I looked at and like Aliebre for CAD because of features and buy to own, but it has no CAM package. I chose Fusion not only because I have a free copy but also because it had a CAM package with a GRBL post.

Here is a pic of the freecad linkstage screen displaying a model that I 3d printed in various sizes.

I certainly like the example you chose.

Thanks again.

Best,
Kelly
« Last Edit: August 06, 2021, 16:09:02 pm by Tool-n-Around »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5156
  • Made in England
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #53 on: August 06, 2021, 18:46:28 pm »
It likely doesn't matter, but polyrectangles 15,16,17 are up in the air at Z=31

Normally the x,y zero position work coordinates would be set at an easy position to locate, such as the bottom left corner of the stock, but you have it set to somewhere that looks difficult to establish.

If you Align the piece to bottom left corner of stock in CamBam then all you need do when it's on the machine is put it in the middle of the table then zero your X and Y to the same bottom left point of the stock.
Filmed in Supermarionation

Offline BR52

  • Wookie
  • ****
  • Posts: 368
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #54 on: August 07, 2021, 01:11:19 am »
Analyzing your generated gcode file,  in NCnetic see attached image.
More information here: https://cambamcnc.com/forum/index.php?topic=9085.0

I changed the post processor to GRBLMachine, see attached image.
See here: http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/GRBLmachine.html
See here: https://cambamcnc.com/forum/index.php?topic=6482.msg62667#msg62667


   Armando
« Last Edit: August 07, 2021, 01:47:24 am by BR52 »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1745
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #55 on: August 07, 2021, 03:28:38 am »
Hi Kelly

I've posted a file with a conceptual template.
The Blue line is the maximum work envelope of your machine.
The purple line is a safe working area where you can place your work and not
hit the soft limits
I've placed a 100mm X 100mm piece of stock at the center of the table and am going to cut
a 50mm X 50 mm part out.

I'll tell you why it might be advantageous to have you machine and work space co-ordinates
aligned.

For example, say your sitting in front of your pc and have opened up a new CB file
and draw a rectangle in the upper right hand quadrant. Now if your machine and drawing
co-ordinates are the same then if go to the front of your machine and look down on top of the table
what you see being cut out is identical to the view in CB on the pc.This helps no end when running or debugging a new files. 

What I'm not saying is that you need to draw you geometry in between the purple
lines, you can draw you geometry anywhere in the drawing you like (sometimes I like to center my drawing about the center of the XYZ),  anyway if you have moved your geometry (to somewhere inside the purple line and set your stock size and positioned it around the work piece then the stock offset values X and Y are the values that you type in
when indicating the stock in stead of X=0 Y=0.

Ps your error 33 means that your PP is not spitting out enough decimal points and GRBL
can't find a point on an arc.
Modify your PP so that it looks like the 'number format' highlighted text in the pic.

Ah I see things have moved on post wise, I'll post the above  for the sake of completeness.

I downloaded the file and applied the same technique as in the first file and move the
geometry and stock to the center of the table then indicated the stock in with the stock offset values.
It ran ok in the sim and with GRBLMachine connected to a micro controller.


Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1745
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #56 on: August 07, 2021, 03:30:17 am »
more

Offline Tool-n-Around

  • Storm Trooper
  • ***
  • Posts: 211
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #57 on: August 07, 2021, 11:24:21 am »
It likely doesn't matter, but polyrectangles 15,16,17 are up in the air at Z=31

Thank you, good catch. Not sure how that happened. It doesn't show up in CAMotics perhaps because I designated a stock thickness. Not sure if it matters but probably would at some point because my units are imperial and 37 inches would be a bit tall for my 3-axis machine with Z3.75" soft limit!

Normally the x,y zero position work coordinates would be set at an easy position to locate, such as the bottom left corner of the stock, but you have it set to somewhere that looks difficult to establish.

It's was just a familiar dimensional location for drawing features since it made the bores symmetric about the Y and one bore coincident on X.

If you Align the piece to bottom left corner of stock in CamBam then all you need do when it's on the machine is put it in the middle of the table then zero your X and Y to the same bottom left point of the stock.

When I get through fiddling with and get it to run, I'll just drag the machine origin to the corner of the stock.

Best,
Kelly
« Last Edit: August 07, 2021, 16:59:51 pm by Tool-n-Around »

Offline Tool-n-Around

  • Storm Trooper
  • ***
  • Posts: 211
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #58 on: August 07, 2021, 22:52:41 pm »
I've posted a file with a conceptual template.

Thank you.

Ps your error 33 means that your PP is not spitting out enough decimal points and GRBL can't find a point on an arc. Modify your PP so that it looks like the 'number format' highlighted text in the pic.

I made the change but still throwing error 33. I set it to 4 decimal places because I read somewhere GRBL will only accept up to four, but I think that may be automatically corrected by the post even if greater precision is set. The cb ARC Center Mode is default. I pasted the console dialogue/error below. I was still using UGS. I downloaded and installed the GRBL Machine plugin. Have something wrong there in my settings because it couldn't move with out thinking it was being commanded to move outside of machine space. Maybe the tool change location?//dunno.

Pretty frustrated. Done with it for the day and going to stick with something I understand for the rest of the evening.....drinking beer and watching MMA.

I attached the latest cb and gcode file. Not much different but I made a couple minor changes to features, corrected the polyrectangle errors EddyCurrent pointed out, and moved the machining origin to the corner of the stock with the corresponding change to the stock offset. Looks like it cant get past the drilling the mounting holes.

>>> G10 L20 P1 X0 Y0 Z0
ok
Skipping comment-only line: (Made using CamBam - http://www.cambam.co.uk)
Skipping comment-only line: (B302 IR Ported Spacer Final.1 8/7/2021 12:38:37 PM)
Skipping comment-only line: (Post-pro: GRBL)
Skipping comment-only line: (T4 : 0.25)
>>> G20G90G40
>>> G0Z0.13
Skipping comment-only line: (T4 : 0.25)
>>> T4
Skipping comment-only line: (Mtg Holes)
>>> G17
ok
>>> M3S1000
>>> G0X1.34Y19.89
>>> G0Z0.13
>>> G0X1.37Y19.89
>>> G0Z0.06
>>> G1F20.0Z0.0
>>> F120.0
>>> G2X1.32Y19.86Z-0.04I-0.03J0.0
ok
ok
ok
ok
>>> G2Y19.92Z-0.08I0.02J0.03
ok
ok
ok
>>> G2X1.37Y19.89Z-0.13I0.02J-0.03
ok
ok
>>> G2X1.32Y19.86Z-0.17I-0.03J0.0
ok
[Error] An error was detected while sending 'G2X1.32Y19.86Z-0.04I-0.03J0.0': (error:33) Motion command target is invalid. Streaming has been paused.
**** The communicator has been paused ****
**** Pausing file transfer. ****
[Error] An error was detected while sending 'G2Y19.92Z-0.08I0.02J0.03': (error:33) Motion command target is invalid. Streaming has been paused.
**** The communicator has been paused ****
**** Pausing file transfer. ****
« Last Edit: August 07, 2021, 23:36:10 pm by Tool-n-Around »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1745
    • View Profile
Re: First Post, First Project, & Some Questions
« Reply #59 on: August 08, 2021, 04:00:41 am »
Hi Kelly

It can be frustrating at the start, just hang in there.
Before I forget, earlier you asked in post 44 if those runners could be plane sliced to be made in a top and bottom
piece.
I fiddled about with Freecad and yes you can do this, the only snag was the cut took maybe 20 min's or so
to process one slice you would need a fairly newish PC and a video card,I did on my laptop 64bit win
ten and it was hopeless.

I downloaded your .nc file (to keep your PP settings) and ran it through the simulator it was ok no errors reported.
I then ran the code in GRBLMachine in CB (in G20 and G21) (with and without GRBLMachines own PP) and
the file ran as expected with no errors. the micro-controller is running the latest version of GRBBLver1.1, the five axis fork
on github.
As a last test I ran the file through the GRBLGRU  Gcode sender besides it not liking the tool change it ran through
to the end with no errors as well.

I went and had a look at the manufactures website again and they are using there own locked in time 4 axis fork.

My first though would to be check if the arc's are causing the problem, go to your PP and set your arc output to lines.
If this eliminates your errors then the arc's are the culprit and you can then change the Arc output back to arc's
and change the variable $12 arc tolerance.

There is a picture of my test controller GRBL config which runs the posted code as is
with no errors.

Hope this helps.

Dave