Using variable with G@ or G3

More
12 May 2014 00:09 #46820 by TarHeelTom
Been trying to a file which would do the same operation on parts of different widths. I simple edit the width of the part into the #<width> variable and use that to calculate other values.

The first G2 is used to set up the tool width compensation. Later I need another G2 or G3 to exit the tool width compensation.

On the first arc I know in advance where the arc will be located.

On the second arc I use a calculated position for "J". But I keep getting an error message. It appears that G2/G3 won't let me use a variable.

Is this true?

In my sleep I finally created a work-around, but I'm still curious.

Tom

Please Log in or Create an account to join the conversation.

More
12 May 2014 01:49 #46821 by BigJohnT
Quite difficult to help without the error message and at least a snippet of the code. The shorter the code the better.

JT

Please Log in or Create an account to join the conversation.

More
12 May 2014 08:08 #46833 by TarHeelTom
I lost too much hair on this one. Finally decided to do away with the variables, and I didn't save the version with all the variable problems.

But I'd still like to know if there is a way to display the value of a variable from within the Gcode. That's something that is so easy to do from almost every other programming language.

Turns out I'm still using 2.4. something. Think it's probably time to upgrade to 2.5, What's the easiest way to do that?

Thanks

Tom

Please Log in or Create an account to join the conversation.

More
12 May 2014 13:43 - 12 May 2014 13:44 #46834 by Rick G
Replied by Rick G on topic Using variable with G2 or G3

But I'd still like to know if there is a way to display the value of a variable from within the Gcode.

Take a look at DEBUG
linuxcnc.org/docs/html/gcode/overview.html#sec:debug-messages

Upgrade
wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.5

Rick G
Last edit: 12 May 2014 13:44 by Rick G.
The following user(s) said Thank You: TarHeelTom

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum