Move machine to coordinate
Posted:
Tue Aug 17, 2021 12:31 pm
by zapbrannigan
I have a laser crosshair which I use to find the corner of my workpiece. How do I get the x and y axis to move back a predefined amount?
So as an example, when I have visually found the edge, press a button and x moves back 10mm and y moves -7mm.
Thanks.
Re: Move machine to coordinate
Posted:
Tue Aug 17, 2021 1:18 pm
by dezsoe
Switch to relative distance mode, move, switch to absolute distance mode.
- Code: Select all
List<string> codelist = new List<string>(); //Create a new List of strings.
codelist.Add("G91"); //Add g-code lines to the List.
codelist.Add("G0 X10 Y-7");
codelist.Add("G90");
exec.Codelist(codelist); //Execute the List of g-codes.
while (exec.IsMoving());
Re: Move machine to coordinate
Posted:
Tue Aug 17, 2021 7:33 pm
by zapbrannigan
Cool. Thanks.
So I need to place a new button on the screen and assign that code to it?
dezsoe wrote:Switch to relative distance mode, move, switch to absolute distance mode.
- Code: Select all
List<string> codelist = new List<string>(); //Create a new List of strings.
codelist.Add("G91"); //Add g-code lines to the List.
codelist.Add("G0 X10 Y-7");
codelist.Add("G90");
exec.Codelist(codelist); //Execute the List of g-codes.
while (exec.IsMoving());
Re: Move machine to coordinate
Posted:
Wed Aug 18, 2021 7:58 am
by zapbrannigan
What does the hashtag mean? codelist.Add("#5 = 12.23");
Taken from the help file in UCCNC folder:
List<string> codelist = new List<string>(); //Create a new List of strings.
codelist.Add("G0 Z-25"); //Add g-code lines to the List.
codelist.Add("M3");
codelist.Add("G1 X0 Y0 F500");
codelist.Add("#5 = 12.23");
codelist.Add("G1 X#5 Y2");
exec.Codelist(codelist); //Execute the List of g-codes.
EDIT: nevermind. It looks like a constant declaration. Thats what Im going with anyway.