CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 26, 2017, 06:17:37 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: TinyG Drill Canned Cycle / Custom Script Help  (Read 356 times)
Ignamious
CNC Ewok
*
Offline Offline

Posts: 2


View Profile
« on: July 29, 2017, 21:47:57 pm »

I have a TinyG with an older XCarve (was ShapeOko 2).

I would like to set up CamBam to do Drilling normally as the TinyG does not support G81/82/83 operations and i don't want to do spiral or pockets for PCB's or small holes, broken to many bits that way.

I've already been working on it and have a working G81 and G82 set up (Example will Follow) that seems to work. However it does produce an error but Chilipepper shows it'll run just fine.

First in the Post Processor i changed the G81,82,83 to all be G1 in the G Codes section in the Canned Cycles Section the Drill and Drill Dwell are:

Drill:
{$g81} {$_x} {$_y}
G1 {$z} {$_f}
G0 Z{$r}

Output:
G1 X50 Y150
G1 Z-5.0 F300.0
G0 ZR3.0
G1 Y180
G1 Z-5.0
G0 ZR3.0

And in the simulator it works but when I create the output file in cambam I do get an error for the Z in front of the {$r} but it works.

Drill Dwell:
{$g81} {$_x} {$_y}
G1 {$z} {$_f}
G4 {$p}
G0 Z{$r}

Output:
G1 X50 Y150
G1 Z-5.0 F300.0
G4 P5.0
G0 ZR3.0
G1 Y180
G1 Z-5.0
G4 P5.0
G0 ZR3.0

Same Effect but with a pause.


It works but i'd rather not have a massive amount of errors when i have lots of drilling options. So i decided to try a custom script:

G0 X$x Y$y
G1 Z$z F$f
G4 P$p
G0 Z$r

and it's all correct with no errors. (if no dwell is set in the drill G4 to shows up but with P0).

Question Portion:

Can I do conditionals in custom scripts? or is there a way to get the clearance height in the actual Canned Cycles portion without a R? G0 ZR3.0?

I'd also like to do G83 Peck but i don't think you can do any type of math at all or any loops haha. and i don't feel like learning how to make an addon to do it (unless there is already one available to go G81-83 using only G0 and G1 >.<

Thanks for any help.
Logged
kvom
CNC Jedi
*****
Offline Offline

Posts: 1383


View Profile
« Reply #1 on: July 29, 2017, 22:21:46 pm »

How about {clearance} instead of {r}?
Logged
Ignamious
CNC Ewok
*
Offline Offline

Posts: 2


View Profile
« Reply #2 on: August 04, 2017, 03:29:04 am »

Sadly that causes more issues then it solves.

Sample output with just {$r}

G98
G1 X0.26458 Y0.26458
G1 Z0.0 F300.0
G0 ZR3.0
G1 X29.89792
G1 Z0.0
G0 ZR3.0
G80

Output with {$clearance} instead of {$r}

G1 X0.26458 Y0.26458
G1 Z0.0 F300.0
G0 ZG0 X0.26458 Y0.26458
G98
G0 Z3.0
G80

Ignoring G98 as it's not supported you can see the output won't work. also tried {clearance} just in case but that just gave me a G0 Z.

Logged
dave benson
CNC Jedi
*****
Offline Offline

Posts: 771


View Profile
« Reply #3 on: August 05, 2017, 05:13:31 am »

Is this thread any usehttp://www.cambam.co.uk/forum/index.php?topic=3675.0
Dave
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

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

Copyright © 2008 HexRay Ltd. | Sitemap