Hello Guest it is April 19, 2024, 06:00:39 AM

Show Posts

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.


Messages - JimAndi

Pages: 1
1
Mach4 Toolbox / Table Vacuum Lua Script
« on: November 26, 2023, 08:41:21 PM »
Hello All,

Here is a copy of my script to vacuum my mill top.  My table is x=110 and y=63 inches. You will need to adjust the X and Y numbers for you mill size.

Code: [Select]
    -- ======================================
    -- |   Vacuum the table surface
    -- |   By Jim Anderson
    -- |   July 10 2016
    -- |   ---------------------------------------------
    -- |   This program will vacuum the top of the table
    -- |
    -- ==========================================
    -- -------------------------------------------------
    function GCodeExecute(GCodeString)
      local inst = mc.mcGetInstance()
    local rc = mc.mcCntlGcodeExecuteWait(inst, GCodeString)
    if rc ~= mc.MERROR_NOERROR then
    return "GCode failed", false
      end -- if end
    end -- function end
    -- -------------------------------------------------
    function TableVac()
      local inst = mc.mcGetInstance()
      mc.mcCntlSetLastError(inst, "Starting Table Vacuum") -- Log Message
      local MyChoice1 = wx.wxMessageBox("Did you remove the tool from the spindle?\nClick OK to continue", "Are You Sure?",  16) 
      if (MyChoice1 == 16) then -- 16 is a cancel
        return  -- exit out
      elseif (MyChoice1 == 4) then    
        local MyChoice2 = wx.wxMessageBox("Did you zero Z for the Brush?\nClick OK to continue", "Are You Sure?",  16) 
        if (MyChoice2 == 16) then -- 16 is a cancel
          return  -- exit out
        elseif (MyChoice2 == 4) then
          GCodeExecute("M08")   -- Dust Collector On
          GCodeExecute("G00 G53 X11.5 Y2.0")
          GCodeExecute("G01 Z0.0 F50.0")
          GCodeExecute("G00 G53 X11.5 Y61.0")
          GCodeExecute("G00 G53 X18.0 Y61.0")
          GCodeExecute("G00 G53 X18.0 Y2.0")
          GCodeExecute("G00 G53 X27.0 Y2.0")
          GCodeExecute("G00 G53 X27.0 Y61.0")
          GCodeExecute("G00 G53 X36.0 Y61.0")
          GCodeExecute("G00 G53 X36.0 Y2.0")
          GCodeExecute("G00 G53 X45.0 Y2.0")
          GCodeExecute("G00 G53 X45.0 Y61.0")
          GCodeExecute("G00 G53 X54.0 Y61.0")
          GCodeExecute("G00 G53 X54.0 Y2.0")
          GCodeExecute("G00 G53 X63.0 Y2.0")
          GCodeExecute("G00 G53 X63.0 Y61.0")
          GCodeExecute("G00 G53 X72.0 Y61.0")
          GCodeExecute("G00 G53 X72.0 Y2.0")
          GCodeExecute("G00 G53 X81.0 Y2.0")
          GCodeExecute("G00 G53 X81.0 Y61.0")
          GCodeExecute("G00 G53 X90.0 Y61.0")
          GCodeExecute("G00 G53 X90.0 Y2.0")
          GCodeExecute("G00 G53 X99.0 Y2.0")
          GCodeExecute("G00 G53 X99.0 Y61.0")
          GCodeExecute("G00 G53 X104.5 Y61.0")
          GCodeExecute("G00 G53 X104.5 Y2.0")
          GCodeExecute("G00 G53 Z0.0")
          GCodeExecute("M09")  -- Dust Collector Off
          GCodeExecute("G00 G53 X104.5 Y28.0") -- My park location
          mc.mcCntlSetLastError(inst, "TableVac Done") -- Log Message
        end -- if end MyChoice2
      end -- if end MyChoice1
    end -- function end
    -- ========== End ===========
    TableVac()

2
Mach4 General Discussion / Motor Setting
« on: November 23, 2023, 07:13:37 PM »
Hello All,

I have an issue that you may have the answer.

I am working to setup the A axis on my wood mill. I have the A axis motor steps to correctly turn 360 deg's. My A axis needs to run a 1000 inch per min and the X & Y run at 75 inch per min.

I can edit the gcode from:
Code: [Select]
( Rounding Toolpath2 )
( File created: Thursday November 23 2023 - 05:43 PM)
( for Mach4 from Vectric )
( Material Size)
( X= 2.000, Z= 0.600)
( Diameter = 1.2000 Inches)
( Y Values are wrapped around the X axis )
( Y Values are output as A )
()
(Toolpaths used in this file:)
(Rounding Toolpath)
(Tools used in this file: )
(108 = End Mill {0.2500 inch} Up)
N130 G00G20G17G90G40G49G80
N140 G70G91.1
N150 T108M06
M07
M08
N180 G00G43Z1.8939H108
N190 S21000M03
N200(Toolpath:- Rounding Toolpath)
N210()
N220 G94
N230 A0.0000 X0.0000 Z1.8939 F75.0000
N240 G00 X0.0000 A-360.0000 Z1.8839
N250 G1 X0.0000 A-360.0000 Z0.7419 F35.0000
N260 G1 X2.0000 A-360.0000 Z0.7419 F75.0000
N270 G1 X2.0000 A-351.6279 Z0.7419
N280 G1 X0.0000 A-351.6279 Z0.7419
N290 G1 X0.0000 A-343.2558 Z0.7419
N300 G1 X2.0000 A-343.2558 Z0.7419
to:
Code: [Select]
( Rounding Toolpath )
( File created: Thursday November 23 2023 - 05:04 PM)
( for Mach4 from Vectric )
( Material Size)
( X= 2.000, Z= 0.600)
( Diameter = 1.2000 Inches)
( Y Values are wrapped around the X axis )
( Y Values are output as A )
()
(Toolpaths used in this file:)
(Rounding Toolpath)
(Tools used in this file: )
(108 = End Mill {0.2500 inch} Up)
N130 G00G20G17G90G40G49G80
N140 G70G91.1
N150 T108M06
M07
M08
N180 G00G43Z1.8939H108
N190 S21000M03
N200(Toolpath:- Rounding Toolpath)
N210()
N220 G94
N230 A0.0000 X0.0000 Z1.8939 F50.0
N240 G00 X0.0000 A-360.0000 Z1.8839
N250 G1 X0.0000 A-360.0000 Z0.7419 F35.0
N260 G1 X2.0000 A-360.0000 Z0.7419 F50.0
N270 G1 X2.0000 A-351.6279 Z0.7419 F1000.0
N280 G1 X0.0000 A-351.6279 Z0.7419 F50.0
N290 G1 X0.0000 A-343.2558 Z0.7419 F1000.0
N300 G1 X2.0000 A-343.2558 Z0.7419 F50.0
N310 G1 X2.0000 A-334.8837 Z0.7419 F1000.0
N320 G1 X0.0000 A-334.8837 Z0.7419 F50.0
N330 G1 X0.0000 A-326.5116 Z0.7419 F1000.0
N340 G1 X2.0000 A-326.5116 Z0.7419 F50.0


How and where do I adjust the A axis to match the 75 IPM?

Thanks Jim

3
Hello all,

How do we get an ETA on the repairing the scr.GetProperty() function from the support team?

trying to get a value from aa user, I use a Lua call:

Code: [Select]
local OffSet = scr.GetProperty("txtOffSet","Value");
No mater what, it returns empty string ("") in lua.

I understand this once worked but now it doesn't due to an update.

JimAndI

4
Mach4 General Discussion / Re: Can you update the Global Registers?
« on: November 11, 2023, 05:18:11 PM »
Thanks, I will give it a try and let you.

5
Mach4 General Discussion / Can you update the Global Registers?
« on: November 09, 2023, 11:00:43 AM »
help please.

I am trying to update the Global Registers with the following code

Code: [Select]
-- -----------------------------------------------------------------
function SetMillPark()
  local inst = mc.mcGetInstance()
  scr.SetProperty("droMillParkX", "Value", tostring(mc.mcAxisGetMachinePos(inst, mc.X_AXIS)))
  scr.SetProperty("droMillParkY", "Value", tostring(mc.mcAxisGetMachinePos(inst, mc.Y_AXIS)))
  local MillParkXReg = mc.mcRegGetHandle(inst, 'gRegs0/MillParkX')
  mcRegSetUserData(MillParkXReg, tostring(mc.mcAxisGetMachinePos(inst, mc.X_AXIS)))
  local MillParkYReg = mc.mcRegGetHandle(inst, 'gRegs0/MillParkY')
  mcRegSetUserData(MillParkYReg, tostring(mc.mcAxisGetMachinePos(inst, mc.Y_AXIS)))
end -- function end
-- -----------------------------------------------------------------
SetMillPark()

and it is not updating the Global Register for mill park X and Y values.

Thanks
Jim

6
SmoothStepper USB / Adding a second BOB
« on: January 03, 2021, 03:51:46 PM »
Hello All,

My Mill has a ESS connected a 5 Axis Breakout board (BOB) driving 4 motors and spindle. The ESS has 3 parallel ports and the first one is utilized by the current BOB. How do I configure MACH 3 to utilize the second BOB?

Any help would be greatly appreciated.

Jim

7
VB and the development of wizards / Re: How to Rest the Spindle Speed
« on: December 20, 2017, 10:23:06 AM »
 :) that worked.

Thanks!!!

8
VB and the development of wizards / How to Rest the Spindle Speed
« on: December 17, 2017, 11:33:41 AM »
Hello All,

I am looking how to reset the Spindle Speed back to 100%. If the user reduces the Spindle Speed (70%) I want the tool change to reset the Spindle Speed to 100% before it start running the new tool.

Thanks,

Jim

Pages: 1