-
Notifications
You must be signed in to change notification settings - Fork 103
Conversational programming for basic tasks #64
Comments
I have been looking at incorporating some of this code: https://pico-systems.com/gcode.html but need to do some rewiring of GrblPanel internals first. Planning for this for later this year. In meantime I recommend using those small utilities. |
Hi Gerrit, Which code do you use for GRBL-panel, or is simpler for you as a coder, VB.net or C#. i know just enough of both to be dangerous. If my monstrous examples are of any use i'm happy to update you on my progress. I have not tried it in anger yet but having viewed it in camotics it looks safe to run. `Dim PlungeRate As Double Private Sub Command1_Click() Dim i As Integer DepthToCut = TotalDepth / DepthPass AmountToCut = Val(Text1) For i = 1 To DepthToCut Text9.Text = Text9.Text & "G0 Z" & Format((Val(Text1) + Retract), "0.00") & vbCrLf Text9.Text = Text9.Text & "G1 Z" & Format(AmountToCut, "0.00") & " F" & Val(Text2) & vbCrLf Next End Sub Private Sub Command2_Click() ' Create Test.txt ' Write the contents of TextBox1 to Test.txt ' Close the file Private Sub Command3_Click() Private Sub Command4_Click() Private Sub Form_Load() The output looks like this |
That looks pretty decent! I used vb.net because I wrote a lot of VBA for a few years. Prior to that it was C, Fortran, PL/I, Cobol etc sprinkled with assembler for Univac 9000 and 1100 series mainframes. Two years ago started with C# and loved it so will be re-doing GrblPanel at some time in that. And cleaning up some of the architectural mess I created with quick fixes and changes over time. There are 2 quick soluions to what you are trying to do:
I use Visual Studio 2017 Community Edition for all my work, including for Arduino's and ESP8266's. It is free and very visual. Code completion, hints of parameters for functions, lots and lots of documentation (when stumped I do an internet search for what I am trying to do and examples pop up). Easy to set breakpoints and see variable values at time of stop etc. For a better Save dialog, use Forms.OpenFileDialog, it is easy to set up with default directory and even file type. The problem I created in GrblPanel is that I don't have a queue for MDI (and as a result also Macros) so there is no wait for Ok response after sending a command. This is why Macros are somewhat limited in this program. I have twice tried adding a second queue (along the one with actual gcode program) and ran into various troubles. The Feeds/Speeds thing got very complex very quickly. I think for me as a rank amateur machinist (who does lathe and mill work 'by feel and sound') those are only broad guidelines. I often don't know the actual steel type etc. Were I doing any CNC work it would be different but I haven't had a working machine since 2014! :-( Maybe this winter...... |
Hi Gerrit, Thanks for the reply. Im stuck wondering how you manage to keep Grbl-panel up to date with no machine to test on. |
I hadn't thought of populating the gcode list directly as if it were a physical file. That would be quite easy to do. The first 5 years or so of my work at Univac was mostly mechanical as well, card punches, tape drives, printers etc. Then shifted mostly to troubleshooting to tube/transistor/chip level. I did a stint designing pcb's for a BMC IF800 Z80 machine. Also worked on networking code on a 68k Heurikon board (still have 3, do you need one :-) AES Data (one of the first word processor companies) tried switching to QNX in the late 80's but they were past saving so folded. Doing the gui work without a machine is fine except for things such as door open and limits. But those are Grbl functions, I just need to produce the correct commands, send them and deal with the responses. But it would be more rewarding for me personally to have a working machine. In the meantime I do it for the love of it. |
Hi Gerrit |
Great work, love the GUI does exactly whats asked of it. Thank you so much for spending your time and sharing your code.
I would love to see Conversational Programming tasks offered - perhaps from a drop down menu.
GRBL is just a command interpreter so its best concentrating on driving the machine. jobs like pecking for holes and drilled hole matrices etc are easily produced with a string of Gcode commands. i'm astonished that no one has worked on this area of machining for grbl yet. I know its easy to produce it as part of your drawing from CAD and post processing using Cambam and the like but that means going to the drawing board every time for simple machining operations. Grbl also does not yet support drilling and pecking commands.
The text was updated successfully, but these errors were encountered: