CNC x2 Mill

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Day...I don't even know anymore. Trying to figure out this whole post processor thing. Main thing I'm stumped on is dynamic tool offsets. I'm using a grbl.cps post processor but I'm having to modify it to do what I want and so far it's winning the battle. The g code to make the machine do the offset is a simple g43.1. I want it to pull the tool length that I gad to define in cam into the post and compensate for length when I do a tool change. Simple ...no since I'm not up to speed with JavaScript it's a little painful. When I run the code the line that calls the tool (T7 M6 G43.1) is giving an error on the GUI on that line so something isn't jiving with grbl. I noticed that the modal wasn't defined in GRBL.cps so I am adding that in and seeing how it goes. I'm not sure where to place the function in the code so just trying different things hoping something sticks. It's inter-frustrating maybe by the time I get it working like I want I'll be an "expert". It runs my code just will not do the offset so I can make parts especially if I run each process individually requiring setting part zero for every tool change but that's too easy. I'm a glutton for punishment. I want it to do it all. I have some pics of progress and failures to post when I get them together. If anyone is a post processor guru please chime in to this CNC neophyte
 
Well I'm your man if you have questions on the grbl since that's what I am using to drive my servos and run my gcode. You should check out fusion hsm to generate your code. Only reason I didn't is because I already have inventor and inventor hsm is an add on so wouldn't need to figure out yet another program. They are pretty much the same thing on the cam (hsm) side. Mine is grbl v5. I have been digging through the arduino code to see where I can modify it and or just seeing how it ticks. Me being me am trying to do things a little unorthodox which means steep learning curve but learn more during the process. I picked up a power supply for about 20 bucks off amazon for the grbl servo drivers. The board itself runs from the arduino. I did make a filter shield that sandwiches between the Gshield and the arduino though just to make my limit switches less sensitive to noise. I'm using an uno for the arduino since I have a couple of them. My mega is used on something else and I have a few nanos but they are too small to use the Gshield on. I used ugcs initially and it works out of the box with the Gshield making it all pretty much plug and play. I eventually started using grbl controller bc I like the interface better. I also mapped a game controller to it for a makeshift dongle where I got the pleasure of learning auto hot key which is kind of neat in its on right. The java script I'm learning now is so I can modify and read the post processor for the Gcode which essentially just customizes the code output to play nice with grbl since some Gcode isn't supported by it...yet. On G code...I didn't know any when I started this journey. Now it's fairly easy to see what is / or is supposed to be doing. Tons of info on the net too.
 
Can't be . . . Granddaughters birthday was the day before thanksgiving - She's 9, gave her an Etch-a-Sketch
HMM couple small steppers, control board with a nano and perhaps with a button push a 'Circle'

G00 X3.000 Y2.000 F5
G03 X3.000 Y2.000 I-1.000 J0.000
G01 X3.000 Y2.000
M30

Circle can't be that easy - Can it?
 
Ha. You sure you don't have a camera in my house. I was just messing with one of my kids the other day and told the other one....you know, I could make this thing draw by itself. The codes simple. I'm trying to figure out how the post processor tracks what step/tool it's on. I need to make it ignore the first tool since it's a touch off and is at zero already then either subtract or add the tool.bodylength from the other depending on if it's shorter or longer than the original tool. Simple - if I can figure out how to make it know one tool from the other. If it number d them it would be a piece of cake. I'm still poring over the exported parameters trying to find something to use as a marker. I modified the code so it does the offset but now it does it on the first tool too so it's the length of the tool too high at the start and the next is shorter so it's way too high at that point. I'm getting there though.
 
...you know, I could make this thing draw by itself. The codes simple.

"The codes simple" - Famous last words - - Lets see some 99 or so G series codes and I'm on G00, G01, G02 + G03 X-Y only - After my brain explodes I'll step into Z axis

Took me long enough to find where and what to change to compensate for the 2:1 gear reduction

#define DEFAULT_X_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)

#define DEFAULT_Y_STEPS_PER_MM ((STEPS_PER_REV*2)*MICROSTEPS/MM_PER_REV) @2:1 for y

I think - - - Lets see, by time spring comes around . . . Who am I kidding - is not easy stuff . . . I better get a couple more Etch-a-Sketches - One or more will be given over to destructive testing
 
I made an excel sheet to keep up with all the "maf". That way I can make mods to my settings and not forget what or where I am. Once I get things moving and adjusting like I want I'm going to jump back into that part to see how fast and or smooth I can make it go. Right now I have things moving nice and slow. Got a new toy yesterday to sink money into. Standard m4 looks kinda cute next to it.

image.jpg
 
Got a new toy yesterday to sink money into.


Toys - - Last year decided to take up reloading. Have an old Krag 30-40 like to shoot once in a while and some -06 tracer rounds. As she's an old girl kept the load 'bout 10% under what the data chart called for. Have a few others . .

DSCF0107_zpsylfbjxl7.jpg


Top girl is my favorite - Had it since I was 10 - - Mossberg 142M - She'll put 3 in the same hole at 100ft. Bottom looks like the Ruger 10-22, She's a Rugar .44 mag Deer Slayer and she kicks like a mule . . .

For show and tell the black powder pistol. She's fun to make noise with. Had to hand over the AR, to easy to convert them over to Rock-n-Roll and the locals had no sense of humor - -

Now back to beating my head against the wall - - Dug up the old laptop to use - it's a windows box and I like Ubuntu, buuut seems most software is windows based and as it is now the odds of breaking something is higher, don't want to break my goto computor . . Windows BLAH - argues with Arduino - not in sync -
Check all the drivers - you know the drill . .

I*f all else fails - - Got a stump out back and some tracer rounds - -
 
The 44 is pretty awesome. I have a 10/22 just like it that I've had since I was a kid. I like rugers I have 5 of them. 22,380,9,45, ( built like tanks)and the new one is their new precision rifle in 308. AR is a lowly Colt. Lol. Check the brate. It's pretty high for the g shield. Last time one of my boards did that I had to reflash it with another board. Easy enough but would rather not have to. Been too distracted by everything else to do any reloading lately but it's cooling down and it's time to refill this summers brass...
 
'membering why I don't like windows - Way to much time spent trying to get XP and the Arduino IDE to cooperate. Got a buddy runs a little computer shop - Nice big New York Cheese Cake bribe to go with 'Here, I'm too dumb to fix it, see what you can do . . . '

Couple more toys - Top one single shot 22 kids rifle - Pop got it for me when I was 8, we didn't have much back then but he scrapped it up to have the lyman peep sights put on it. 10-22 looks just like the .44 - High Standard Sport King. an H&R Sportsman [22 cal] -Always leave one chamber empty for the hammer to rest on and my carry toy - Walther PPK - Slide has nicked the top of my hand more than once.

DSCF0111_zpsmttqgkbb.jpg

Think I'll go do something useful today, Long as the bride is not around - take the car out, see how the new cam is and smoke the tires a bit . . .
 
Gees not sure when I'm going to see my shop again. Got a week off for Christmas then work is going to be nuts for a while. I'm right there from finishing this little exercise too. Might be my saving grace to get me away from my computer and not going crazy. I hate doing hospitals, they are one complicated beast. Well I'll get some hot lead therapy in before the craziness at least. Got the new one a nice set of glasses finally.

image.jpg
 
Been tinkering with Arduino, NES game pad, 20x4 LCD, NEMA 17 stepper and a 3" rotary table using CFellows bit of code - -

laststep = round(stepsDiv * lastPosition);
nextstep = round(stepsDiv * currentPosition);
divSteps = abs(nextstep - laststep);

In a different wrapper - Divisions and Degrees - -

Making the adapter to mount the stepper to the little table has been a case of "Really?" Had this hunk of 2 1/4 round . . .
Lets see - one each AA109 lathe, bore a hole 3" inches deep?
Cut away all that is not needed on the outside?

Subtractive Process Defined - More of the stock goes to the trash bin than is left . . . But its Fun - -

Week or so - should be done - - Have no idea what I'll do with it - Just seemed like something to do - Run a Rotary using a NES Game pad . . .
Robert
 
Had to quasi-assembly and check it out - And, well it works - Have 2 menu choices, one for divisions, one for degrees - Running it through its paces and so far seems not to skip a beat. NES Controllers are dangerous, can get way to many button choices . . .
#define btn_A 254 // Select Divisions
#define btn_B 253 // Select Degrees
#define btn_Start 247 // Enable Stepper
#define btn_Select 251 // Disable Stepper
#define btn_Up 239 // Not used
#define btn_Down 223 // Not Used
#define btn_Left 191 // Jog Forward One Division (CW)
#define btn_Right 127 // Jog Back One Division (CCW)
#define btn_A_Up 238 // Increase Divisions (also Disables Stepper)
#define btn_A_Down 222 // Decrease Divisions (also Disables Stepper)
#define btn_A_Right 126 // Future use - Increase Divisions Step Rate
#define btn_A_Left 190 // Future Use - Decrease Divisions Step Rate
#define btn_B_Up 237 // Increase Degrees by One Degree (also Disables Stepper)
#define btn_B_Down 221 // Decrease Degrees by One Degree (also Disables Stepper)
#define btn_B_Right 125 // Future Use - Increase Degrees Step Rate
#define btn_B_Left 189 // Future Use - Decrease Degrees Step Rate
#define btn_Menu 243 // Return to main menu

Still can't get the LCD screen to show in pic - - -
Now to find a little project box and package it up
What I'll do with it? Haven't a clue . . .
DSCF0129_zpsufjpvn1b.jpg
 
I've got a little three inch rotary table I was think of doing something with eventually. It's so small it's hard to mount anything to it. I made an adaptor that fits in the t slot so I could bolt things down to it. Haven't had time to do any work in my shop other than looking for tools my 6 year old hides from me. Lol. Been so busy with work and fixing things for friends (tvs and washing machines lately). Mostly work. I need to just slate a weekend to finish some stuff but hard to get motivated after a long week of the grind. Last weekend I got a little reloading done but that's about it. Love the new rifle. She is quite accurate. Wife likes it so I Guess she can stay. Lol. Annoyed because I have one little coding thing to fix on the mill but haven't had time. Just kicking the can....
 
Yup, the 3" is, ah, it is what it is. When I started to wonder about having the two Arduino's (x-y and rotary) talk to each other, I stuck it on a shelf and went back to putting with the car. Still have a couple of things that worked before I took it apart that - - - All good as long as I get er done by spring.
 
When I started to wonder about having the two Arduino's (x-y and rotary) talk to each other, I stuck it on a shelf and went back to putting with the car.

Foozer, Google "Xbee Shield" and have fun. Don't blame me now if your car is not ready in time......
 
I'm baaaack! Finally slowed down at work a bit. Spent the last two days cleaning my shop. It was a disaster. Felt like a contestant of American ninja trying to get to anything! Now I need to figure out where I left off. .....to the bat cave.
 
Here is the only machining I've done in a while. A rocket to entertain me and the kids a while back.

image.jpeg
 
Beginning to think the wolves got ya . . . When work interferes with shop time, it's time to find new work . . . Unless of course when 'She Who Must Be Obeyed' wants something, that something must be done . . .Yard Art . . .

DSCF0218.JPG
 

Latest posts

Back
Top