Hello Guest it is March 29, 2024, 08:39:06 AM

Author Topic: G code program inside a g-code program?  (Read 5572 times)

0 Members and 1 Guest are viewing this topic.

G code program inside a g-code program?
« on: December 04, 2013, 02:29:54 PM »
Is there a way to load a g-code program inside a base program without mach loosing its place inside of the base program?
Kind of like calling up a sub-program but I would like it to be a separate file.

Offline Bodini

*
  •  216 216
    • View Profile
(No subject)
« Reply #1 on: December 04, 2013, 03:15:54 PM »
I dont think so. Like u said, sub routine is about as close as u can get.
Re: G code program inside a g-code program?
« Reply #2 on: December 04, 2013, 03:38:33 PM »
I guess I'll need to string them together?

Offline Bodini

*
  •  216 216
    • View Profile
(No subject)
« Reply #3 on: December 04, 2013, 03:43:31 PM »
How much gcode are you talking about? You could call gcode from a macro, but id only use that for a couple of lines.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: G code program inside a g-code program?
« Reply #4 on: December 04, 2013, 04:30:04 PM »
You could also load and run a g code file from VB. You could have a m code that loads a g code file runs it, closes when finished, loades anohter Gcode file, etc. I'm pretty sure. Never done it myself but everything is there to do it with.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G code program inside a g-code program?
« Reply #5 on: December 04, 2013, 07:17:31 PM »
Gocde Programs with outside subs work just fine in mach 3 as long as you are not running tool comp or nested too deep with the subs.

Macros running gcode work also as long as you maintan proper sync between the Macro and Gcode.

Each way has its own quirks about it.

(;-) TP
Re: G code program inside a g-code program?
« Reply #6 on: December 04, 2013, 09:28:30 PM »
Can I read a userDRO into a filename as a variable?

Offline Bodini

*
  •  216 216
    • View Profile
Re: G code program inside a g-code program?
« Reply #7 on: December 05, 2013, 09:27:40 AM »
Gocde Programs with outside subs work just fine in mach 3

Interesting! How do you call an outside sub?

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G code program inside a g-code program?
« Reply #8 on: December 05, 2013, 11:28:26 AM »
M98 (SubName.tap)   to call an outside sub.

Yes you can read a UserDro into a filename as a variable.

(;-) TP

Re: G code program inside a g-code program?
« Reply #9 on: December 05, 2013, 11:38:49 AM »
Thank you  BR549! I did figure out how to read values into names... I think.
Code: [Select]
code "M98 ("&value1".NCF")"?