Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: equack on January 29, 2010, 05:10:22 PM

Title: G-Code debugging printf? how can I see my parameters?
Post by: equack on January 29, 2010, 05:10:22 PM
I want debugging printf() or something like it for G-Code.

I have a G-code program which is not doing what I expect it to. I would like to examine some parameters/variables after the program runs in order to see what's happening.
I don't care how: output to a text file, a MSG to the screen, whatever. I just want to see the value of "#130" after the program stops.

I tried using "MSG," but could not get it to evaluate expression- it just dumps the literal string "#130"

I am using the Tormach flavor of Mach3 (2.42)

Thanks!
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: Graham Waterworth on January 30, 2010, 09:16:12 AM
Go to operator menu and select Gcode Var monitor.

enter the #numbers you want to monitor, DO NOT press enter.

Graham
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: equack on January 30, 2010, 05:48:52 PM
I do not have that option on my operator menu. The only choices I have are "Control Offline", "Maintenance Hours", and "Set Normal Condition".


 Is this something that Tormach has disabled in their default configuration? Does it require a version newer than 2.42?

Thanks,

-Erik
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: Graham Waterworth on January 30, 2010, 08:31:54 PM
I have never seen a Tormach machine so all I can tell you is this what a standard mach3 menu looks like.

Graham
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: equack on February 01, 2010, 07:27:17 PM
Tormach has disabled many of the menu items including "G-Code Var Monitor". They will "unlock" the missing features If I sign an agreement releasing them from liability and warranty claims.

My machine is already out of warranty and I need to debug my G-Code so I don't really have any choice. One of the reasons I chose the machine (it is an AWESOME machine) was because it came with a Mach3 license. I didn't realize there was "fine print".
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: kf2qd on June 01, 2010, 11:32:22 AM
You might want to double check this, but you could probably download a current copy of Mach3 and install it and set up the parameters and it would work just fine.

Do you have a spare computer you put a new copy of Mach3 on and see how it works?

Or - if they don't charge you - get it unlocked so you can do what you want to do with the machine. Sounds more like they want to tie you to them for financioal purposes...
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: equack on June 01, 2010, 01:17:49 PM
No, it's not really financial. It's a tech support issue. If you tweak the settings you can screw up the machine making it inaccurate or unreliable. They got tired of diagnosing and fixing problems created by customers tampering with the factory settings. If you want to tamper with your machine they'll tell you how... if you sign a waiver. They still answer support questions after you sign the waiver. I'm happy with the machine and the support.

I wish Apple would do the same thing with the iPhone- you shouldn't have to jailbreak your phone just to use it in a manner they don't sanction.
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: BR549 on June 01, 2010, 07:19:35 PM
Ok if you cannot use the Var monitor or have access to the VB editor????

The only other way I know of is IF the version that Tormach uses supports a teh correct XML version then

From the MDI type     #501=#130 and press enter. That will transfer the value of #130 OVER TO #501.

#501 is stored in the xml as a persistant value so when you shut down mach you can open the xml and go down to var 501 and see the value.

NOW this only will work IF the tormach version has the newer feature of persistant Vars 500-600.

Other than that I do not know of a way.

Hope that helps
Title: Re: G-Code debugging printf? how can I see my parameters?
Post by: Cuhlik on November 10, 2019, 05:05:30 PM
On my Tormach running PathPilot I do the following:

G10 L1 P20 Z#3

This sets the Z length of tool 20 to the value of variable #3. You can then go to the tool offsets page and see the value.