Greeting all,
I am sure this is simple, I just can't find the system variable or parameter to write the data to.
Within a macro, I want to write a value to the Z register of G54. I am using a G10 H--- R---- to write to tool length offset registers, but can't figure out how to write to the work offsets.
Thanks!
Chris D
Looking for way to set G54 values with macro
Moderator: cnckeith
-
- Posts: 667
- Joined: Fri Nov 30, 2018 1:04 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Thorp WI
Re: Looking for way to set G54 values with macro
For whatever work offset you're in, G92 X(value) Y(value) Z(value).
In a macro for locating WCS with a cross hair laser, I've done it like this (abbreviated version)...
In a macro for locating WCS with a cross hair laser, I've done it like this (abbreviated version)...
Code: Select all
#101 = 1 ; Default WCS G54
#102 = 5 ; Length of time to wait for M225 message
N200
M224 #101 "What WCS would you like to set? (Enter 1-6)"
IF [#101 < 1] || [#101 > 6] THEN GOTO 200
E#101 ; Set the chosen WCS
G92 X0 Y0
M225 #102 "XY LOCATION SET FOR WCS #%.0f" #101
Scott
-
- Posts: 63
- Joined: Mon Mar 15, 2021 7:31 am
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: ACORN 4447
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Looking for way to set G54 values with macro
Awesome! Thank you Scott!
Re: Looking for way to set G54 values with macro
Another method:
If you know what value you want to put in the G54 Z coordinate, but you have not necessarily moved the axis to that place, you can just assign the desired location in system variable #2701. See system variables #2400-#3218 in Chapter 11 of the Operator's Manual.
If you know what value you want to put in the G54 Z coordinate, but you have not necessarily moved the axis to that place, you can just assign the desired location in system variable #2701. See system variables #2400-#3218 in Chapter 11 of the Operator's Manual.
-
- Posts: 63
- Joined: Mon Mar 15, 2021 7:31 am
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: ACORN 4447
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Looking for way to set G54 values with macro
Thanks CNCSNW, I used that technique. The wording "ACTIVE" threw me off in the System Variable description, however, it does do what I wanted!
Thanks!
Chris D
Thanks!
Chris D