Hello Guest it is May 29, 2024, 04:25:22 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JohnHaine

451
Mach4 General Discussion / Re: Excel to Mach4
« on: December 03, 2021, 09:48:34 AM »
Hi Ryan, I'm not sure how you got on with this but you might be interested in this post I made yesterday.
https://www.machsupport.com/forum/index.php?topic=45560.msg289783#msg289783

452
General Mach Discussion / Re: HELP with Excel to Mach3
« on: December 02, 2021, 11:15:50 AM »
Just a note to the powers that run this site - it doesn't allow xlsx file extensions!!  Since Excel started using these in 2003 I think the site needs to catch up!! 

453
General Mach Discussion / Re: HELP with Excel to Mach3
« on: December 02, 2021, 11:13:16 AM »
Here you go.  One row from a simple spreadsheet that does the conversion - see attached file. 
WIDTH   HEIGHT   g-code
12.25   54          G01 X12.25 Y54

The secret sauce is this Excel formula:
="G01 X"&A3&" Y"&B3
Where A3 and B3 contain the width and height values starting at row 3 for the first set of values.  So you just put your list of dimensions in columns A and B, put the formula in cell C3, and copy it down for as many rows as you need.

To get the table of dimensions into Excel get it exported as a csv file and open it in Excel - you probably know that.  Then paste the values into the above spreadsheet to do the g-code conversion.  To output a file to drive Mach3, copy the column with the g-code in it and paste into a new blank .txt document and save (or if on the same computer just open the "edit g-code" Mach3 window and paste it in).

I've used this method a lot to generate g-code for lots of odd shapes that need to be generated from mathematical formulae and it works just fine.

454
General Mach Discussion / Re: Mach Turn Problem I have.
« on: November 08, 2021, 12:08:45 PM »
Post the code please!

455
Share Your GCode / Re: Wizard for milling a knurl using A-axis
« on: September 14, 2021, 08:15:30 AM »
Another update, this one corrects the formula for the cut depth which was a bit too deep.

456
Share Your GCode / Re: Wizard for milling a knurl using A-axis
« on: September 13, 2021, 02:52:52 PM »
Thanks Tweaky!

Um...not sure what you mean by "online" - I run it from Thonny on my PC (or could be Mac / R-Pi or any Linux machine), which is a Python IDE.  You give it a filename (when it asks) and it writes the code into a file with that name.  I think it might be possible, if you are running it on the same machine as Mach 3/4, to insert the full file path to the folder where Mach3/4 keeps its G-code, otherwise it just writes the file into the folder where the code is.  I run Mach 3 on an old XP machine and getting Python on XP (especially without an Internet connection) seems to be hard!  So I tend to generate the code on my office PC and save it on to a USB stick and sneakernet down to the workshop.

If only Mach 4 had used Python for macros and wizards instead of Lua...

John.

457
Share Your GCode / Wizard for milling a knurl using A-axis
« on: September 13, 2021, 10:58:53 AM »
In case it could be useful I attach a little "wizard" I wrote in Python to generate the g code for cylindrical diamond knurling.  It uses a 90 degree engraving cutter, zig-zagging round the material to form the knurl.  The main point to note is that the number of "diamonds" round the work should be prime, and the length is defined in terms of the number of diamonds longitudinally.  Also attach photos of the results and example g code.

I know it isn't an embedded wizard but I thought writing in VB for Mach3 is wasted effort these days and something more portable in a modern language would be better. 

458
General Mach Discussion / Re: where are the tool offset tables stored
« on: August 02, 2021, 03:37:22 AM »
I've used both the import and export macros in that link successfully.

459
Mach3 under Vista / Re: Mach3 backlash compensation
« on: June 20, 2021, 12:38:49 AM »
It seems to work well on a mill with small bl but when I tried it on a lathe with much larger z bl I found similar to you.

460
General Mach Discussion / Re: Mach 3: Programmatic change to config
« on: May 09, 2021, 05:13:25 AM »
Thanks for trying anyway!  Back to the drawing board I guess...