1031
Galil / Re: DMC-4080 Mill Retrofit
« on: May 27, 2014, 04:10:43 PM »
Yes, wire them to the Galil.
Steve
Steve
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
function m101()
local inst = mc.mcGetInstance();
mc.mcCntlSetLastError(inst, "m101");
local SNv = mc.mcCntlGetPoundVar(inst , 590);
local str = string.sub(SNv, 1, 6);
local idx = 0;
mc.mcCntlSetLastError(inst, "#590 = " .. str);
--local SN = {}
local SN;
for idx = 1, #str do
SN = str:sub(idx, idx);
if SN == "1" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X1.0");
elseif SN == "2" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X2.0");
elseif SN == "3" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X3.0");
elseif SN == "4" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X4.0");
elseif SN == "5" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X5.0");
elseif SN == "6" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X6.0");
elseif SN == "7" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X7.0");
elseif SN == "8" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X8.0");
elseif SN == "9" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X9.0");
elseif SN == "0" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X0.0");
end
end
mc.mcCntlSetLastError(inst, "Setting #590 = " .. tostring(SNv + 1));
mc.mcCntlSetPoundVar(inst , 590, SNv + 1);
end
if (mc.mcInEditor() == 1) then
m101()
end
function m100()
local inst = mc.mcGetInstance();
local SNv = mc.mcCntlGetPoundVar(inst , 590);
local str = string.sub(SNv, 1, 6);
local idx = 0;
--wx.wxMessageBox(tostring(str));
--local SN = {}
local SN;
for idx = 1, #str do
SN = str:sub(idx, idx);
if SN == "1" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X1.0");
elseif SN == "2" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X2.0");
elseif SN == "3" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X3.0");
elseif SN == "4" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X4.0");
elseif SN == "5" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X5.0");
elseif SN == "6" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X6.0");
elseif SN == "7" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X7.0");
elseif SN == "8" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X8.0");
elseif SN == "9" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X9.0");
elseif SN == "0" then
mc.mcCntlGcodeExecuteWait(inst, "G0 X0.0");
end
end
mc.mcCntlSetPoundVar(inst , 590, tonumber(str) + 1);
end
if (mc.mcInEditor() == 1) then
m100()
end
function m100()
inst=mc.mcGetInstance();
mc.mcCntlSetLastError(inst, 'Serial Number Engrave')
mc.mcCntlGcodeExecute(inst, "G0X10 ");
mc.mcCntlGcodeExecute(inst, "G0X0 ");
end
if (mc.mcInEditor() == 1) then
m100()
end