Turn G18, XZ Plane set at startup

While UCCNC does not currently have a TURN Modual Here is the place to discuss your wants and wishes for TURN

Turn G18, XZ Plane set at startup

Postby Robertspark » Wed Dec 23, 2020 1:32 pm

This may be useful to someone doing an attempt at Turn.

Edit your Constructor Macro (M99998.txt) and add in the following code {change your spindle speed + feedrate + default jog setting to your preferred number}

Code: Select all
//This is the Constructor macro which executes once when the application gets loaded

exec.Callbutton(141);  // set tool path veiw LEFT (i.e. XZ)

new Thread(delegate () {
    SetGcode ();
   }).Start();

#Events

private void SetGcode ()
{
   while (AS3.GetLED (25));
   Thread.Sleep (50);
   
      exec.Code ("G18"); // set XZ plane
      exec.Code ("F1200"); // set Feedrate
           exec.Code ("S500"); // Set SpindleSpeed
      
      AS3jog.Setfield(50, 913); //Set 50% jog feedrate 
      AS3jog.Validatefield(913);
}


it is also possible to save the feedrate and spindle speed at shudown by editing the desrtuctor macro to save the settings to the profile, and change the constructor macro so that it reloads it from the profile and the settings would therefore be persistent from shutdown to restart.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Return to UCCNC TURN (CNC Lathe)

Who is online

Users browsing this forum: No registered users and 1 guest