Beware the Aging Brain: Or The Perils of "Numbered Parameters"
- clunc
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
21 Nov 2022 15:41 - 21 Nov 2022 15:45 #257231
by clunc
Beware the Aging Brain: Or The Perils of "Numbered Parameters" was created by clunc
I'm trying to write a short G-code to cut a straight edge along the west side of a block. The plan is to set G55 X=0 at the desired finished edge, back away, X<0, and then make multiple passes, increasing X by steps while "current_X" <=0.
As a first attempt I wanted to make sure I understood that I had the correct value for "current_X" in G55.
"I thought" this link means G55's X value is stored in #5241--but (DEBUG,#5241) returns instead, apparently, the OFFSET of G55 X from G53 X0.
After "about an hour", and after concluding "surely" I've done something like before, I grepped for "#5241" in all the files in my G-code archive. There was one hit--again, surprising me. LUCKILY for me, the line containing "#5241" was just above one referring to "#5421". Dyslexia? Anyone else? Indeed, "#5241" contains G55's X-OFFSET, but "#5421" G55's RELATIVE X position.
This is how we've been going, slipping down. I'm really regretting all those early beers. (I don't mean today: I mean in my youth.)
The documentation for #5241, which is what I read and where I stopped reads:
"5241-5250 - Coordinate System 2, G55 for X, Y, Z, A, B, C, U, V, W & R. Persistent. "
#5421's is a little clearer although it doesn't mention the UCSs individually:
"5420-5428 - Current relative position in the active coordinate system including all offsets and in the current program units for X, Y, Z, A, B, C, U, V & W, volatile. "
However, I would have missed that anyway because it doesn't contain the word "G55."
As a first attempt I wanted to make sure I understood that I had the correct value for "current_X" in G55.
"I thought" this link means G55's X value is stored in #5241--but (DEBUG,#5241) returns instead, apparently, the OFFSET of G55 X from G53 X0.
After "about an hour", and after concluding "surely" I've done something like before, I grepped for "#5241" in all the files in my G-code archive. There was one hit--again, surprising me. LUCKILY for me, the line containing "#5241" was just above one referring to "#5421". Dyslexia? Anyone else? Indeed, "#5241" contains G55's X-OFFSET, but "#5421" G55's RELATIVE X position.
This is how we've been going, slipping down. I'm really regretting all those early beers. (I don't mean today: I mean in my youth.)
The documentation for #5241, which is what I read and where I stopped reads:
"5241-5250 - Coordinate System 2, G55 for X, Y, Z, A, B, C, U, V, W & R. Persistent. "
#5421's is a little clearer although it doesn't mention the UCSs individually:
"5420-5428 - Current relative position in the active coordinate system including all offsets and in the current program units for X, Y, Z, A, B, C, U, V & W, volatile. "
However, I would have missed that anyway because it doesn't contain the word "G55."
Last edit: 21 Nov 2022 15:45 by clunc. Reason: add missing word
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- clunc
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
21 Nov 2022 15:50 #257232
by clunc
Replied by clunc on topic Beware the Aging Brain: Or The Perils of "Numbered Parameters"
Incidentally, there was another brief struggle on the carpet with the misperception that I'd dyslexed the 2 and the 4 in #5241/#5421, when in fact the Careful Reader will have realized that the variable which was wanted for G55's relative X value is:
#5420,
#5421 being of course reserved for G55's relative Y value.
We're sorted now, but already fearing waking up to a different reality tomorrow.
(You ought to see me try to remember my cell number. My wife says it's a hoot.)
#5420,
#5421 being of course reserved for G55's relative Y value.
We're sorted now, but already fearing waking up to a different reality tomorrow.
(You ought to see me try to remember my cell number. My wife says it's a hoot.)
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
22 Nov 2022 23:22 #257397
by andypugh
Replied by andypugh on topic Beware the Aging Brain: Or The Perils of "Numbered Parameters"
You might be able to use #<_x>
Please Log in or Create an account to join the conversation.
Time to create page: 0.121 seconds