Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Martinalonso on November 29, 2021, 06:12:05 PM

Title: HELP with Excel to Mach3
Post by: Martinalonso on November 29, 2021, 06:12:05 PM
I need help with exporting excel data to Mach 3.
We manufacture windows and Doors and we use Mach 3 and an Aculite EconoCut Cutting table to cut glass sheets. we currently input manually all cutting sizes for each glass panel.

We use excel to create the work orders and to create a "cut list" so the operator can input manually all sizes.
But I'm trying to see if I can import the width and Height already in our excel data into Mach3, I'm able to export in .csv and .txt.

But can I use those formats to import the width and height into Mach3? I see that when the operator manually imports the measurements it creates a file .acu that the cutter machine uses to cut the glass sheets.

Can anyone give me some guidance?

Thank in advance
Martin
Title: Re: HELP with Excel to Mach3
Post by: joeaverage on November 29, 2021, 06:41:11 PM
Hi,
I have occasion to export data as a CSV file to Mach4, I've been using Mach4 for seven years.
I have written a script in Lua, Mach4's scripting language, that converts the input data stream to x,y,z triplets which then are incorporated
into the job.

I imagine you can do the same with CE, Mach3's scripting language, but I doubt NEARLY as easily as Lua.

Craig
Title: Re: HELP with Excel to Mach3
Post by: Graham Waterworth on November 29, 2021, 07:57:57 PM
You could write an excel macro to create the G-Code.

All you need is a basic script to insert the values that change.

This video may help
https://www.youtube.com/watch?v=bY7w4YJNyhw (https://www.youtube.com/watch?v=bY7w4YJNyhw)
Title: Re: HELP with Excel to Mach3
Post by: Martinalonso on November 29, 2021, 08:58:01 PM
You could write an excel macro to create the G-Code.

All you need is a basic script to insert the values that change.

This video may help
https://www.youtube.com/watch?v=bY7w4YJNyhw (https://www.youtube.com/watch?v=bY7w4YJNyhw)


Thank you guys for your help, I'm completely lost but that video helped a lot figuring out the structure of the content in the file, as far as the file format that would be readable by Mach3. What file format should I use for output?
I have a macro that outputs a .csv file, but I can also make it output it to .txt file

This is what file looks like this when I open it in notepad. Im still working on making the decimals show as xx.xx


WIDTH,HEIGHT
12.25,54
6,32
22,34.25
28.5,21.8125
38,86.8125
21.1875,75.8125
9.125,83.8125


I hope Mach3 can take those two measurements an is able to make the cuts on the table cutter.
Title: Re: HELP with Excel to Mach3
Post by: joeaverage on November 29, 2021, 10:09:14 PM
Hi,
Mach3, in fact just about ALL CNC software requires Gcode, it is by far and away the most common mode of translating coordinates to machine
motion.

Search Google for Gcode.....enjoy.

Craig
Title: Re: HELP with Excel to Mach3
Post by: JohnHaine 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.
Title: Re: HELP with Excel to Mach3
Post by: JohnHaine 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!! 
Title: Re: HELP with Excel to Mach3
Post by: JohnHaine on December 12, 2021, 04:01:41 AM
Why do we bother to try to help people when they can't even say thanks?
Title: Re: HELP with Excel to Mach3
Post by: Graham Waterworth on December 12, 2021, 02:48:35 PM
I have been doing this over 16 years and in that time I have learned some people are very greatful for the help but in general most want a quick fix with the minimum of effort.  That is why I limit what I do for people now.
Title: Re: HELP with Excel to Mach3
Post by: Martinalonso on January 01, 2022, 07:02:08 PM
Ok got it to work after may tries, thank you so much for your help.
I'm a newbie and it took me a while to understand G-code, and having no support form the machine manufacturer it took me a while linking the data and understand how it works from Gcode to the glass cutter. The hardest part was understanding the machine uses XY coordinates to make the cut and not actual numbers.

But your code worked perfectly once I understood how it works.

Please DM your PayPal SO I can buy you some coffee or beer.
Thx
Title: Re: HELP with Excel to Mach3
Post by: Martinalonso on January 01, 2022, 07:07:08 PM
@ JohnHaine, Graham Waterworth sometimes it take a little bit of time to get back to test or try solution when there's covid outbreak and the company shuts down and you have no access to the machinery.
But I hope you can continue to help others, I appreciate your comments because it guided me to find a solution. Sorry if it took me a hile to get back with positive results. Either way thx,
Title: Re: HELP with Excel to Mach3
Post by: JohnHaine on January 02, 2022, 03:04:05 AM
Understand about the limitations, and very happy to help.  I've had lots of help learning CNC from people here and it's good to pay back the community.  If you wanted to make a small donation to charity, especially Medecin Sans Frontieres, that would be very good.

Cheers, and happy 2022, John.
Title: Re: HELP with Excel to Mach3
Post by: Martinalonso on March 07, 2022, 02:13:28 PM
Thank you so much @JohnHaine I'll be making a donation to Medecin Sans Frontieres and I'll ask the owner to give a larger donation since you helped us save in techsuport. I see on their website they are even helping in Ukraine.
Again Thx

I know its not the correct forum, but if any one needs help with graphic design I'm more than happy to help out.