Hello Guest it is April 16, 2024, 03:02:16 PM

Author Topic: plugin/wizard/external editor to automatically organise and edit tp-files  (Read 8154 times)

0 Members and 1 Guest are viewing this topic.

Re: plugin/wizard/external editor to automatically organise and edit tp-files
« Reply #10 on: September 10, 2015, 05:47:02 AM »
guys, thanks a lot for telling me about boardcad, i do appreciate it... i do know that program, but it does not work for me.. it can't do some advanced geometries i need, snowboards are similar, yes, and i do surf myself, but still a bit different than snowboards really..
also, no, I DO NOT WANT TO STRETCH GCODE!!! really, trust me!! ;););)

i have already done the stretchin, scaleng etc in CAD/CAM and have already created all tp files i need and am not looking for another cad/cam program. i know solid works is great and all but i am not spending 10thousand€ or more on a software... i am just looking for a way to automatically organize and edit the existing txt files with some small changes like automatic global offsets written into the codes' header, etc

so it's actually more some sort of customized editing program or an editing plugin in mach that i need.
again, if noone has a specific idea about how to implement a program or plugin like that, my programmer mate said he can do an external programm, said he would need some time but that its not at all hard to do..just that he needs the correct info on the gcode syntax changes..(it's only header and foot that will be changed the rest obviously remains the same!!!!):

I do know that there's loads of info in books, and i have read through the mach handbook ;)..still not sure about how to exactly do it..thanks for the tip regarding smid book, RICH, have just orderd it. it's just that i had hoped to avoid reading through too many books but find a faster way..
so could maybe someone at least please help me with the correct syntax of where and how to add the codes into the existing headers & foots (it's only header and foot that will be changed the rest obviously remains the same!!!!):
-for global offsets (x/y/z)
-how to summarize correctly with (with pause between parts at a toolchange position or with autostart?
-how to mirror and change direction if possible?

thanks again..
andi

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: plugin/wizard/external editor to automatically organise and edit tp-files
« Reply #11 on: September 10, 2015, 09:13:53 AM »
Here something you may want to consider since all you want to do is piece various existing code together.
So to speak.......... ;D
Your programing friend can manipulate / use some generic programing to accomplish it.

Would work like this:
1. Select  from a list, directory, whatever the existing gcode files
2. Backplot selected  files from created  list into CAD such that they would be on different layers / levels / color etc.
3. Now you can see what needs to be modified or moved, or adjusted
4. Generate the gcode for the new file which would take care of the things you want to do, or optionally generate a new file type
to be used by CAD/CAM or whatever.

This above has already been done by some, so with a LOT of work your friend can create something for you, BUT, he will need to understand
what he is doing beyond just knowing how to program. There is no short cut to learning gcode.

Quote
help me with the correct syntax


The correct coding format for Mach3 can be found in the Mach Manual. Read that section of the manual.

Quote
how to add the codes into the existing headers

You  may  just code the first line or add additional lines so that part of the code could be run based
on current modal conditions and use an offset if code is based on a different setup.
Now be realistic in what you are asking ....... How in the heck are we to tell you exactly  what to do when we have no idea of your code
and the basis of it.  ;)

Quote
-for global offsets (x/y/z)

The correct code format is in the manual. I gave you basic info for understanding but you probably didn't even read it. :(

Quote
-how to summarize correctly

Don't know what you are asking. Summarize what?

Quote
pause between parts at a to lchange position or with autostart

You could code (G4 P) a dwell and have a LED blink warning you that a tool change is manually being done and
a counter is showing you how much time you have left to do it. OR After the defined pause time just hit the start button the code will
continue to run.    Be carefull! Safety is important. See how others address tool changing / do macros. Lots of stuff posted.


Enjoy the learning curve,

RICH
Re: plugin/wizard/external editor to automatically organise and edit tp-files
« Reply #12 on: September 10, 2015, 12:17:24 PM »
rich, thanks, i do really appreciate your help. i am sorry, i seem to not explain it properly.


backplotting into cad/cam doesn't seem to make any sense to me as it makes things more complicated instead of faster and easier. i need some automatism,  manual changing of each new fille wil not make any difference.
maybe this makes it more clear, what i am doing now manually in mach 3 is the following: click open and start/run each needed toolpath (ca 14 files total to be chosen each time, out of a number of a couple hundred existing ones) one after the other, some after manually changing/chosing an x/y offset (G59 P...) in mach3, some after manually changing an Z offset (G59 P...) after manually changing to a different tool.
that's it. simple but error prone and slow. the only thing that is changed are the offsets.
so  if you still think i should backplot, then for what? only headers and footers in some text files need to be changed. what i wrote about mirroring is just a nioce to have but not essential, see also below.

what i need some probably external little software to do is make me work faster and avoid errors entering offsets manually by adding them automatically into the code after i have choosen some offsets and names of text files to use in a scrolldown menu. it should not touch the underlying base files just use them to write new ones that can be discarded after use. obviously i also still want to have to click start manually;)



please see my code example in my first post. guess you haven't read it ;)   :)
here again for your convenience:

G00 G49 G40.1 G17 G80 G50 G90 G64
G21
(6mm)
M6 T1
M03 S15000
G01Z30.000
G00X-1284.500Y-420.000
Z16.350
Z15.000
G01Z0.000 F100
X-1284.953Y-420.003F1500
X-1285.407Y-420.011
........ center bit remains unchchainged..
......
X-1391.500Y-645.000
Y-648.000
X-1406.500
G00Z8.175
G00Z16.350
M5 M9
M30



i have read the manual. it's not so helpful as to exact syntax and poition in code.
i have also read the pdf you sent me, thank you very much, it explains offsets but not the syntax or where it needs to be written in headers and footers? also may i kindly say it's not very clear explanations, sorry;) ;)




regarding offsets:
i should think there are two possiblities, either i do define the needed 50 x-offsets times the 2 z-offsets for 2 different tools = total 100 offsets (semi manual change system, z always the same for each tool) in mach 3 or 4 as the G59 P6 - 106 and let the programm enter into the headers each G59 P.. as chosen and also G54 in the footers (where?) into each code or i let the program enter a G52 X.. Y.. Z..into each header and G52 X0 Y0 Z0 into footer...but where?
like this?

G00 G49 G40.1 G17 G80 G50 G90 G64
G21
G59 P..   or G52 X.. Y.. Z.. ????????????????
(6mm)
M6 T1
M03 S15000
....
.....
X-1391.500Y-645.000
Y-648.000
X-1406.500
G00Z8.175
G00Z16.350
G54    or    G52 X0 Y0 Z0   ??????????
M5 M9
M30




regarding 'summarizing?:
what i mean by this is take the code and enter it again one behind the other assuming they where two different ones.
in between these two could be the command to go to a safe tool change position, and then some manually start the next one, something like:

......
X-1391.500Y-645.000
Y-648.000
X-1406.500
G00Z8.175
G00Z16.350
M5 M9
M30

F1500
G01 Z 20
G01 X-500 Y-2000

how do i make the software restart from here? just press start?  do not need a pause for a certain time or autostart after ta certain time as this might be dangerous.
another version would be no tool change just a break and restart the next one manually, so just empty between the two?


G00 G49 G40.1 G17 G80 G50 G90 G64
G21
(6mm)
M6 T1
M03 S15000
G01Z30.000
G00X-1284.500Y-420.000
Z16.350
Z15.000
G01Z0.000 F100
X-1284.953Y-420.003F1500
X-1285.407Y-420.011
....



hope this all makes more sense now.
the offsets and summarizing as above is the minimum i need.

a bonus would be:

if the software could enter a command that lets the cnc run mirrored coordinates (mirrored about a defined axis, something eg along coordinates X-500 Y-2000 and X-500 Y0 )
i read this could maybe be done by entering into the code
G51 X-1
...
G50 X1

but this would mirror it only around the y axis lile eg X0 Y-200 and  X0 Y0 ?????
is there also a way to make the cnc run the code backwards, i.e. start from the end and run the other way round?

mirroring and running backwards would allow me to reduce the number of code files i have to generate in cad/cam significantly..




i do like steep learning curves and i'd love to have the time to read through all books and i hope i will eventually learn a lot more about codes and programming, it's just a matter of having the time to do so;)

so thanks again..andi


Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: plugin/wizard/external editor to automatically organise and edit tp-files
« Reply #13 on: September 10, 2015, 01:41:33 PM »
AHHHHH  I see , You already HAVE the Code Segments You just need a way to assemble a list of them and maybe apply a fixture offset to each segment. THEN it would be 1 long program for the router to run.

Is that correct ?  Is so I already have something close to that. I use it for plasma work to assemble a JOB which may be 10-12 different elements with offsets(G54-G*********) to place each segment where it belongs. That way I can cut an entire sheet full of parts un attended. Then just toss the file when done as it only applies to that particular group of elements ( one time job with NO cad cam ).

HOW many different Files do you use PER JOB ??  What needs to be applied to a file to place it correctly ??

IF you can, email me a couple of your simple files so I can take a look at them for structure.

This can be done on a PAGE inside of MAch3 that way as you add each segment you can SEE it added into the toolpath on screen. That way you can make SURE it is correct. IF not undo and adjust it until it works .




(;-) TP
« Last Edit: September 10, 2015, 01:51:16 PM by BR549 »
Re: plugin/wizard/external editor to automatically organise and edit tp-files
« Reply #14 on: September 10, 2015, 02:59:50 PM »
BR549 yes! sorry i thought i had said so the whole time;) maybe i made it sound more complicated..

out of a number of a couple hundred code files( which are just variations of 14 types of files) there are ca 14 files per job to be assembled into ca 4-5 total files per job. (different parts of jobs will be made at different times so needs to be more than one)
What needs to be applied to a file to place it correctly ??
place it? not sure what you mean by that?

hmm thanks for teh offer i do appreciate it..please do understand that i cannot pass on whole files as i need to protect my designs..but they are all pretty simple 2D as the one posted before and just a couple 2.5D files. just outline contour milling mostly, plus some simple pocket milling/drilling for insert holes and a handful of 2.5D profiling files for the core..pretty simple stuff..headers & ends of files all just look like the one posted, see before..

sounds great if i could do that inside of mach. how would you create that page?
to be futureproof wouldn't it make more sense to do it in mach 4 or is it not quite there yet developmentwise?..i had a look at the demoversion but am not so sure about all functionalities compared to mach3..would be sad to make the effort to program something if sooner or later mach3 becomes redundant?

cheers, andi