G10 L2
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1440
G10 L2 P1X1
be functionally equivalent to
#5221=[1]
Please Log in or Create an account to join the conversation.
I think the answer to that is not of itself
See attached test where origin of X was set to 3 and then #5221 set to 0 and a print of #5221 confirmed that value to the terminal, but the offset remained when the program was started
If you messed about with G92, that might have been different
regards
Please Log in or Create an account to join the conversation.
Would the line:
G10 L2 P1X1
be functionally equivalent to
#5221=[1]
No, for many reasons that I can't fully explain.
Why would you want to do that?
JT
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1440
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1440
Please Log in or Create an account to join the conversation.
my reason is that I would like to set up a Halui command to change the offsets of more than one work coordinate system in one fell swoop. As far as I can tell I can only effect one set of work coordinates in a single line with G10 but using #xxxxx=y, I was hoping I could string together as many as I need on one line. (To for example change the X offset of G54 and G55 in a single command.)
How about writing a sub which contains all the G10 L2 lines that you need and call that sub from halui?
Please Log in or Create an account to join the conversation.
a quick bit of experimentation showed me that if I issued #5221=[1] then changed from g54 to another (g55) then changed back to g54 it seems to work. But only commanding G54 when already using the g54 coordinates doesn't effect the change. I also found that #5221=[1] G10L2P1 does seem to work, but might not help me. since I can not guarantee or predict exactly what coordinate system might be in effect when my Halui command is used.
The developer I asked warned me that if read only had been available when the numbered parameters for coordinate system were created they would have been read only. He also warned about a few other things that I forget. You could read the #linuxcnc-devel logs it you're interested in the exact conversation.
I highly suggest you use G code to change the offsets and as ArcEye suggests use a sub.
JT
Please Log in or Create an account to join the conversation.