Hello Guest it is June 26, 2019, 11:33:35 PM

Author Topic: Adding G-code move on the fly  (Read 4599 times)

0 Members and 1 Guest are viewing this topic.

Adding G-code move on the fly
« on: May 28, 2013, 09:48:20 PM »
This is probably an odd question, but can you add g-code on the fly from your HMI screen. Example:
G00 Z.1
G01 F20 -.5
G00 Z.1
G91
( This line would read from a text box on the main screen. Say it is normally set to 0, but the next go around you want to add another .1 to the Z)
G90

Offline BR549

*
  •  6,873 6,873
    • View Profile
Re: Adding G-code move on the fly
« Reply #1 on: May 29, 2013, 05:22:57 PM »
Sorry but NO you cannot add Gcode ON THE FLY. BUT you can program with parametrics and #vars in the Gcode and change the # vars on the fly.

(;-) TP
Re: Adding G-code move on the fly
« Reply #2 on: May 29, 2013, 08:46:09 PM »
Could you point me in a direction that would give an explanation how to do this.

Offline BR549

*
  •  6,873 6,873
    • View Profile
Re: Adding G-code move on the fly
« Reply #3 on: May 29, 2013, 11:59:50 PM »
How about the Mach3 manual ?

Just a thought, (;-) TP
Re: Adding G-code move on the fly
« Reply #4 on: May 30, 2013, 08:00:03 AM »
Hi Terry,
Really? Read the manual? What are you thinking??????????????

(just having some fun)

Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Adding G-code move on the fly
« Reply #5 on: May 31, 2013, 10:38:59 AM »
Thanks guys. I always enjoy people talking to me like I am an idiot.

I have read the manual. I have been using Mach for 8yrs or so. Unfortunately I do not have any experience with Brains, Macros or VB scripting. I have determinded the Brains might be the choice. The one problem I have with Brains is the documentation is minimal and I have not found anywhere it gives a better description on the different elements. Would kind of like a Mach Brains programming for Dummies.

Brg,
  Richard

Offline BR549

*
  •  6,873 6,873
    • View Profile
Re: Adding G-code move on the fly
« Reply #6 on: May 31, 2013, 11:30:04 AM »
Sorry but brains are not going to help you IF I understand what you are wanting to do. Your only option wil be to use parametric Gcode and #variables.

AND that usage is described in the manual.

(;-) TP
Re: Adding G-code move on the fly
« Reply #7 on: May 31, 2013, 11:39:47 AM »
I was not talking to you like you were an idiot. I was just making a funny.
I do however think that Terry has a point. Read the manual. Maybe he should have said REREAD the manual. I have been using Mach3 for at least 5 years and I still have to go back to the manual from time to time to pick up those things that I forgot or never really understood.

One of those things that I don't understand is that people come here looking for free advice and then get all huffy when the advice is not what they want to here.

Learning how to program variables is one of those things that I have never learned because I use CAD/CAM and with Mach3 the file limitation is so large that I have never even come close to the limits. People that grew up with older controls soon learned how to write programs as small as possible using vars and parametrics. Vars and parametrics are on the todo list as it can be very helpful when doing "weird" stuff.



http://www.machsupport.com/docs/Mach2_6.11_Custom.pdf   Page 35 has an example that might be helpful.

Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Adding G-code move on the fly
« Reply #8 on: May 31, 2013, 11:47:55 AM »
As always Google is your friend.

http://www.cnczone.com/forums/parametric_programing/95395-milling_macros.html

Has a few examples of parametric programing.

HTH

Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Adding G-code move on the fly
« Reply #9 on: May 31, 2013, 12:07:00 PM »
Thank you for the Macro link. After re-reading, it looks like Scripting might be the fit.

Also I was not getting huffy or looking for free advise, but after watching video, searching google  and reading blogs, your head starts to swim and you don't know what direction to head.

Instead of an answer Like " program with parametrics and #vars", A better answer might have been : VB scripting might be the choice or Macros, Brains probable won't do it. Give section 4.4 in the manual a look .

Like you I do not do programming directly, I use a cad/cam program becuase I profile mill alot, so I no nothing on Varable and parametrics.