CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 18, 2018, 00:48:12 am


Login with username, password and session length


Pages: [1] 2
  Print  
Author Topic: Lathe C-axis  (Read 9414 times)
coolant slinger
Wookie
****
Offline Offline

Posts: 306



View Profile
« on: August 29, 2017, 21:33:23 pm »

I am trying to get my mill post altered so it produces workable C-axis live tool Lathe code.
I need to double the X values
I also need to change the Y values to C

I attached example .cb file, standard posted code and edited code of what I am trying to do.
Does anyone know how to make those changes in the post processor.

Thanks

* 1.745 HEX.cb (6.85 KB - downloaded 40 times.)
* 1.745 HEX.txt (0.87 KB - downloaded 45 times.)
* 1.745 HEX EDITED.txt (0.94 KB - downloaded 42 times.)
Logged

lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7530



View Profile
« Reply #1 on: August 29, 2017, 22:29:22 pm »

Slinger,
I'm not in a position to write it just now, but all you need is a very simple post-build processor to edit the file for those specific values.

I can help, now and again, but just don't have the time to write it until I get past a job I'm doing for a big client.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
dave benson
CNC Jedi
*****
Offline Offline

Posts: 894


View Profile
« Reply #2 on: August 29, 2017, 23:17:34 pm »

Have you tried the G-code ripper.
It may do the job.

Dave


* G-code Ripper.PNG (63.79 KB, 792x589 - viewed 76 times.)
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7530



View Profile
« Reply #3 on: August 30, 2017, 00:01:55 am »

Dave,
I don't mean to sound negative about your suggestion, so please excuse me if I do...

But why would you want to use an 'external package', when all the tools to do the job are built-in in CamBam.  What he wants to do is exactly why Andy included the post-build processor feature.

It allows you to 'seamlessly' cause such things to happen to the g-code as can't be done directly within the post-processor.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4991



View Profile WWW
« Reply #4 on: August 30, 2017, 00:12:49 am »

Hello

I just write quickly a post treatment to change Y to C

- unpack the archive and copy the Y2C.exe to you post processor folder.

- in you actual post processor, edit the Post-Build Command Args property, enter the following text: "{$outfile}" (the quotes must be used)

- in the Post-Build Command property, click on the |...| button and browse for the Y2C.exe file that you have just copied.

- Save your modified post processor.

Note, the exe search for a .nc file

by careful, it works well on my cambam files, but I encounter a problem on your example ; this is due to the "Gcode file" property in the Machining folder ; it must be {$cbfile.name}.nc, and in your it is only {$cbfile.name} ; that  cause the post treatment working only one time and return a bad file name, so change this to {$cbfile.name}.nc to avoid problems.

If you need another extension than .nc, I can modify that in the code.

++
David

* Y2C.zip (4.76 KB - downloaded 38 times.)
Logged
coolant slinger
Wookie
****
Offline Offline

Posts: 306



View Profile
« Reply #5 on: August 30, 2017, 01:52:29 am »

David,
That worked great converting the Y to C.
Any ideas on how to double or multiply X values?

Thank you,
Slinger
Logged

lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7530



View Profile
« Reply #6 on: August 30, 2017, 01:55:09 am »

I didn't look at Y2C, but the next step is to parse for X###.### values, extract the value up to the next space after the X, and double it.

In terms of programming, fairly minor, but it will require extraction and examination of strings to find the X values.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4991



View Profile WWW
« Reply #7 on: August 30, 2017, 03:08:15 am »

Quote
Any ideas on how to double or multiply X values?

Maybe with the Lathe X Mode property in the PP ? ; this can switch between radius and diameter value for X axis.

++
David
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7530



View Profile
« Reply #8 on: August 30, 2017, 11:39:08 am »

Ah... you can tell I don't lathe turn with CB, yet, David!

('Got a heap of milling work to do today, though!)

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
kvom
CNC Jedi
*****
Offline Offline

Posts: 1467


View Profile
« Reply #9 on: August 30, 2017, 12:31:52 pm »

FWIW, grep is a pretty universal program that can do just about any source manipulation that one could reasonably imagine.

http://gnuwin32.sourceforge.net/packages/grep.htm
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7530



View Profile
« Reply #10 on: August 30, 2017, 13:04:48 pm »

Yep, and grep can be 'command-tail' invoked with search/replace criteria, OR it can be invoked with a pointer to a file containing a richer set of criteria than would be reasonable to put in a command-tail.

It's been a long time, but I used to be a heavy-duty grep user... under AIX, SCO Unix, and Linux.   There are also versions which run under Windows.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
coolant slinger
Wookie
****
Offline Offline

Posts: 306



View Profile
« Reply #11 on: August 30, 2017, 22:14:55 pm »

David,
The Lathe Radial/Diameter is a good idea, but I am using the mill function of Cambam to get the current code.

Lloyd & Kvom,
I have been using Cimco Edit to Multiply the X values by 2. It does a good job with manipulation of values with mathematical functions, rotate code, mirror code, etc. But I was hoping to do it via the post processor. Thanks for the ideas.
Logged

kvom
CNC Jedi
*****
Offline Offline

Posts: 1467


View Profile
« Reply #12 on: August 30, 2017, 23:44:19 pm »


Any ideas on how to double or multiply X values?


Double the X values in CAD
Logged
dave benson
CNC Jedi
*****
Offline Offline

Posts: 894


View Profile
« Reply #13 on: August 30, 2017, 23:52:07 pm »

Hi coolant slinger

If you don't have it sorted by next weekend, I'll write you one along the lines of the LaserPP I wrote earlier.

Dave

Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7530



View Profile
« Reply #14 on: August 31, 2017, 00:17:11 am »

By the middle of next week, I should be able to give some help with a post-build processor; if someone doesn't beat me to it!

The code is pretty simple to do that sort of thing.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
Pages: [1] 2
  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.371 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap