Machsupport Forum
Mach Discussion => Mach4 General Discussion => Mach4 Videos => Topic started by: DazTheGas on May 11, 2015, 06:43:13 PM
-
Well got fed up waiting for the slow boat bringing parts I require so sat and and worked out this.
http://youtu.be/lYQHRWbwqS4 (http://youtu.be/lYQHRWbwqS4)
<<PLC Script>>
if (x_enable_offset == "true" and y_enable_offset == "true" and z_enable_offset == "true") then
if (offset_applied == "false") then
xoffset = mc.mcAxisGetHomeOffset(inst, 0);
yoffset = mc.mcAxisGetHomeOffset(inst, 1);
zoffset = mc.mcAxisGetHomeOffset(inst, 2);
mc.mcAxisSetPos(inst, 0, 0.00);
mc.mcAxisSetPos(inst, 1, 0.00);
mc.mcAxisSetPos(inst, 2, 0.00);
mc.mcCntlGcodeExecuteWait(inst, "G00 X"..xoffset.." Y"..yoffset.." Z"..zoffset);
offset_applied = "true";
end
end
<<Signal Script>>
if (sig == mc.OSIG_HOMED_X) then
if (state == 1) then
x_enable_offset = "true";
else
x_enable_offset = "false";
end
end
if (sig == mc.OSIG_HOMED_Y) then
if (state == 1) then
y_enable_offset = "true";
else
y_enable_offset = "false";
end
end
if (sig == mc.OSIG_HOMED_Z) then
if (state == 1) then
z_enable_offset = "true";
else
z_enable_offset = "false";
end
end
<<Screen Load and Ref Home Btn >>
offset_applied ="false";
Enjoy
DazTheGas
-
nice work daz you might be the next M4 go to man
-
Absolutely wonderful. Thank you , Thank you !!!! for your effort and great videos !!!! I haven't switched to M4 ...yet. But, your post and videos are really going to help in my decision to do so :)
-
hows this for a push I ran my big router on M4 today once I got it tuned in 0.01 mm next run 0.01 final run 0.01 the best I could get with M3 0.03 mm per 1000 moves in Z axis with a code that has a lot of speed changes 300 mm/min to 1250 mm/min same goes for X and y