. .
Page 1 of 2 12 LastLast
  1. #1
    After hand coding some gcode operations recently I wondered if it was possible to create a GUI and create them interactively. Since I have Excel on my machine and have written various bits of code in the past, including VBA, I decided to start there. The initial result / proof of concept is shown in the video.

    It seems to work very well and I plan to develop it further as I see what it can do. It is much quicker for those small jobs than going back to CAD/CAM to create full gcode files, and offers the opportunity to work interactively such as creeping up on a final dimension.

    I've posted this thread here as the others did not seem appropriate, plus it works well with UCCNC (so far). I say this because there are small details such as the coordinates are generated without the decimal point for whole numbers e.g. G1 X4.0 posts as G1 X4 and although UCCNC controller has no problem with this I have read that some controllers shoot off to another location with 4 in it. I have tried to get the VBA code to format these numbers but not been successful. It works for me so have left it for now.

    Now as mentioned in the video there are commercial offerings (I since discovered!) which do all this and it is often called conversational programming. However, they started at $70 upwards so I will probably develop this to a point for my own use, but obviously it does not make sense to go too far.

    Anyway, that is the introduction, here is the proof of concept:
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  2. The Following 3 Users Say Thank You to routercnc For This Useful Post:


  3. #2

  4. #3
    Quote Originally Posted by A_Camera View Post
    Cool. Will you make it available for others to use?
    I was originally thinking to get it all finished with a bit more functionality and fully debugged then upload the excel .frm file (plus another supporting file?) to GitHub and people could download it for free so long as they had Excel on their CNC machine. There is a Thanks button on YouTube if they found it useful and wanted to donate anything.

    But I’ve had replies on the channel about doing it all in C# under visual studio which is better suited to create a standalone app. I’ve been reading up on it and it looks good but I would need to get up to speed with C# and committing things to GitHub so now am thinking about where to go.

    Maybe I’ll just put out the Excel version initially and take it from there. . . .
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  5. #4
    I moved from Mach3 to UCCNC and one of the "missing" things is any conversational programming capability. At the moment it's Fusion 360 or carving gcode by hand for simple jobs. This looks like it would fill the gap - be very interested to take a look.

    Thanks,

  6. #5
    I've used Excel quite a lot for generating g-code for odd shapes like cams of various types, though not VBA. The problem with VBA is you need Excel so of course it's not compatible with Linux for those using LinuxCNC. I recently wrote a wizard to generate code for knurling using the rotary axis on my CNC mill - initially I did this in Excel but then moved to Python which I found very easy to use (though it doesn't have any graphics). You could consider Python as for example the Thonny IDE for Python is cross platform - I run it on both the PC and a Raspberry Pi - and it's free. I believe that there are extensive graphics libraries available for Python too.

  7. #6
    Quote Originally Posted by Neale View Post
    I moved from Mach3 to UCCNC and one of the "missing" things is any conversational programming capability. At the moment it's Fusion 360 or carving gcode by hand for simple jobs. This looks like it would fill the gap - be very interested to take a look.

    Thanks,
    Hi Neale,
    I have been playing around with it tonight trying to get it to crash/create odd toolpaths (on my desktop, not on the real machine) and have caught some errors and now it seems to work OK. Next step will be cutting out some sample parts, simple circle, simple circle with radial stock to leave, full pocket, full pocket with stock to leave, and throwing in some offset XY start points for the hole (in case the hole is not at 0,0). I should get a chance this weekend to have a play in the workshop, then maybe I can upload the Excel file to the open source section here as a Beta (for those with Windows & Excel on their CNC machine PC at least).
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  8. #7
    Hi John,
    OK that is good to know. I had a look at Python today, as well as C++ and C#, and as with all things they seem to be best suited for certain applications. MS Visual Studio Code supports most of them, but the GUI looked well supported for C#. I think Python is easier to get started with but I think a GUI is important for this tool so if I go that way I am leaning towards C# as it seems to be the right starting point for this sort of thing (I think), apologies Linux users if I get that far :(

    I did get a request on the YouTube channel for yet another standalone system / approach. And there was I thinking I would just finish this in Excel VBA and let others use it !

    Plan for now is get it running safely in Excel VBA, share it out and see where to go from there . . .

    Thanks for all the comments and suggestions on coding approaches, I'm not an expert on coding but seem to get things to work in the end.
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  9. #8
    Given that you are aiming this to provide extra functionality in a UCCNC setting, assuming Windows doesn't seem silly. I guess that a portable version across platforms would be a nice-to-have but something that works on one platform seems better that something that doesn't quite on several. I remember way back tallking to a colleague who had left to join a big database company. He said that they had one version for VMS, one for IBM, and about 50 more for different flavours of Unix! Maintenance nightmare...

  10. #9
    Quote Originally Posted by Neale View Post
    Given that you are aiming this to provide extra functionality in a UCCNC setting, assuming Windows doesn't seem silly. I guess that a portable version across platforms would be a nice-to-have but something that works on one platform seems better that something that doesn't quite on several. I remember way back tallking to a colleague who had left to join a big database company. He said that they had one version for VMS, one for IBM, and about 50 more for different flavours of Unix! Maintenance nightmare...
    Exactly. I can’t get into all that !

    I do use UCCNC but the gcode generated is basically G0, G1, and G2, with some M commands for the spindle start stop and code rewind. I’m hoping that is fairly universal for most controllers. I didn’t see the commercial conversational software requesting which controller was to be used so they would tailor the post to suit, but I might have missed it. The idea was to keep it simple to be more universal in terms of generated code.
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  11. #10
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 2 Days Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 2,908. Received thanks 360 times, giving thanks to others 8 times.
    I may still have the barebones of a conversational programming C# project on my computer somewhere.

    I started one a few years ago, mostly to force myself to learn how to code desktop apps, so there is lots I'd do differently now.
    Although IIRC I wrote it using the older WinForms (Windows Forms) GUI. If I was to do something now, I'd use WPF (Windows Presentation Foundation) which uses XAML for the GUI.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  12. The Following User Says Thank You to m_c For This Useful Post:


Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 11-12-2012, 12:58 PM
  2. FEA Software
    By routercnc in forum Computer Software
    Replies: 19
    Last Post: 02-10-2012, 01:10 AM
  3. Which Software
    By manofgresley in forum CAD & CAM Software
    Replies: 1
    Last Post: 26-12-2011, 04:08 PM
  4. New Software
    By luke11cnc in forum CAD & CAM Software
    Replies: 5
    Last Post: 14-09-2011, 06:00 PM
  5. What software ??
    By Kammo1 in forum Computer Software
    Replies: 11
    Last Post: 07-09-2007, 01:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •