Using variable with G@ or G3
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
12 May 2014 00:09 #46820
by TarHeelTom
Using variable with G@ or G3 was created 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
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.
12 May 2014 01:49 #46821
by BigJohnT
Replied by BigJohnT on topic Using variable with G@ or G3
Quite difficult to help without the error message and at least a snippet of the code. The shorter the code the better.
JT
JT
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
12 May 2014 08:08 #46833
by TarHeelTom
Replied by TarHeelTom on topic Using variable with G2 or G3
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
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.
12 May 2014 13:43 - 12 May 2014 13:44 #46834
by Rick G
linuxcnc.org/docs/html/gcode/overview.html#sec:debug-messages
Upgrade
wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.5
Rick G
Replied by Rick G on topic Using variable with G2 or G3
Take a look at DEBUGBut I'd still like to know if there is a way to display the value of a variable from within the Gcode.
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