M31 macro

This is the place to talk about and share things related to CNC plasma machines using UCCNC

M31 macro

Postby alanmccabe » Wed Jul 21, 2021 11:59 am

Hi can anyone point me in the right direction to setup my UCCNC software with the M31 macro (I believe this is what I need). I have a floating Z axis and when I run the M31 macro I get an error the Machine was not et homed. I don't have a home switch on my Z though so not sure what I do. Many Thanks Alan

My switch offset is 5.47 where do I add this value would be another question



I have UC300 eth
Proma THC
Sheetcam software


Thanks in advance
alanmccabe
 
Posts: 12
Joined: Wed Jul 14, 2021 9:21 pm

Re: M31 macro

Postby Robertspark » Wed Jul 21, 2021 2:03 pm

I am out at present, can you paste the contents of the m31 macro please into a code block and I will comment out the homing section and add your switch offset and repost

won't be in front of a pc for several hours
Robertspark
 
Posts: 1887
Joined: Sat Sep 03, 2016 4:27 pm

Re: M31 macro

Postby Robertspark » Wed Jul 21, 2021 4:31 pm

for PLASMA, you should be using M203 and NOT M31 (different probing function).

Code: Select all
//Z touch with retract for plasma zero height measurement

double Zmin = -200;
double Feedrate = 200;
double retractheight = 5.47; //switch offset

int originaldistancemode = exec.actualdistmode; // remember the distance mode
int originalmodalmode = exec.actualmodal; // remember the modal mode
exec.Code("G90"); // Set system to absolute distance mode

while(exec.IsMoving()){}
exec.Code("G31 Z" + Zmin + " F" + Feedrate); // Move to the probe sensor position in XY
while(exec.IsMoving()){}
exec.Callbutton(102); // zero Z axis

if(!exec.Ismacrostopped()) // If probe action was not interrupted with a stop only then go on...
{
 exec.Code("G01 Z" + retractheight); // Move above probe plate
 while(exec.IsMoving()){}
 exec.Callbutton(102); // zero Z axis
}

exec.Code("G" + originaldistancemode); // Set system back to the original distance mode
exec.Code("G" + originalmodalmode); // Set system back to the original distance mode


Dont crosspost : viewtopic.php?f=2&t=3309
Robertspark
 
Posts: 1887
Joined: Sat Sep 03, 2016 4:27 pm

Re: M31 macro

Postby alanmccabe » Thu Jul 22, 2021 6:13 pm

I got it sorted thanks, I had refHome set to true in the Sheetcam post processor.

ps the cross post was not intentional, I posted it and I never realised it would have to be moderated so I tried again.
alanmccabe
 
Posts: 12
Joined: Wed Jul 14, 2021 9:21 pm


Return to CNC Plasma

Who is online

Users browsing this forum: No registered users and 2 guests