Hello Guest it is April 18, 2024, 03:00:35 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.


Topics - Gerral

Pages: 1
1
Mach4 General Discussion / Not saving input config change
« on: September 30, 2022, 10:48:54 AM »
I've changed the probe we're using.  The former probe was normally closed, whereas this one is normally open.
In the Mach Configuration when I change the Input Signal to "Active Low", click apply and then OK the change is not implemented or changed.

Is there a setting somewhere that prevents configuration changes?  This is just a generic install of Mach 4 to a custom-made machine.

Thanks for your help!

2
Mach4 General Discussion / Cutter Compensation not reading tool diameter
« on: October 20, 2020, 10:17:57 AM »
I have the following G-Code that I want to run repeatedly to cut out inlay groves for wood drums.  I want to change the tool diameter with G41 & G42 to slowly widen the grove to fit the inlays.  Inlays aren't necessarily consistent in width.

The code work, except it doesn't seem to be picking up the diameter for tool 1 and 2 (D1 & D2), but it works perfectly on tool 3 (D3).

I'm not seeing anything wrong with the code and am wondering if there's a setting in Mach4 that not set right for this to work on D1 & D2.

Thank you in advance for your help.


g0 g49 g40 g17 g80 g50 g90

g04 p2.
g53 g00 z0

M03
M08


G54 x0 y0.01 a0
z1.
g01 z-.25 f10.
G42 D2
y-.016 f10.
g90
g40
a720. f2000.
g90x0y0
G41 D2
y.016 f10.
g90
g40
a0. f2000.

z1.
G54 x0 y.295 a0
z1.

g01 z-.25f10.
G41 D1

x0 y.279
g90
G40
a720. f2000.

g90x0y0.295
G42 D1

x0 y.311 f10.
g90
G40
a0. f2000.

z1.
G54 x0 y-.295 a0
z1.

g01 z-.25 f10.
G41 D3

x0 y-.311
g90
g40
a720. f2000.
g90x0y-.295
G42 D3

x0 y-.279 f10.
g90
g40
a0. f2000.

g00 z1.
g53 z0.

M09
M05

g53 x1. y-8.

m30


3
Mach4 General Discussion / Lua script that causes Mach4 not to terminate
« on: October 26, 2015, 07:16:04 PM »
I've a script with some dialog boxes that show up to remind the operator when certain maintenance should be performed.  I used to have this in the startup, but I've relegated it to a button.  For whatever reason when this is run Mach4 will NOT terminate properly when closed, you have to use the task manager.  I upgraded to the newest Mach4 today 10/26/15 with hopes it would correct the issue but it doesn't.

Are there any script monkeys out there that might spot what I'm doing wrong here, I've gone through it and tried different permutations of this code.  It's really quite simple, it's reading values from the profile that are written by other jobs that have run and prompting the operator to take care of whatever needs taken care of.

Thanks!

Again.. this currently run within a button:

    local MyInstance = mc.mcGetInstance()
    local DailyMaintenance={}
    DailyMaintenance = wx.wxDialog (wx.NULL, wx.wxID_ANY, "DailyMaintenance", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxCAPTION )
    DailyMaintenance:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

    local bSizer2 = wx.wxBoxSizer( wx.wxVERTICAL )

    bSizer2:SetMinSize( wx.wxSize( 500,-1 ) )
    CheckHoses = wx.wxCheckBox( DailyMaintenance, wx.wxID_ANY, "Check Hoses, fittings and valves for wear or damage.", wx.wxPoint( -1,-1 ), wx.wxDefaultSize, 0 )
    bSizer2:Add( CheckHoses, 0, wx.wxALL, 5 )

    CheckwaterTrap = wx.wxCheckBox( DailyMaintenance, wx.wxID_ANY, "Ensure water trap is clear, and drain if necessary.", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
    bSizer2:Add( CheckwaterTrap, 0, wx.wxALL, 5 )

    Checkdebris = wx.wxCheckBox( DailyMaintenance, wx.wxID_ANY, "Wipe any excessive debris from ballscrews and guideways", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
    bSizer2:Add( Checkdebris, 0, wx.wxALL, 5 )

    local m_sdbSizer2 = wx.wxStdDialogButtonSizer()
    local m_sdbSizer2OK = wx.wxButton( DailyMaintenance, wx.wxID_OK, "" )
    m_sdbSizer2:AddButton( m_sdbSizer2OK )
    local m_sdbSizer2Cancel = wx.wxButton( DailyMaintenance, wx.wxID_CANCEL, "" )
    m_sdbSizer2:AddButton( m_sdbSizer2Cancel )
    m_sdbSizer2:Realize();

    bSizer2:Add( m_sdbSizer2, 1, wx.wxEXPAND, 5 )


    DailyMaintenance:SetSizer( bSizer2 )
    DailyMaintenance:Layout()
    bSizer2:Fit( DailyMaintenance )

    DailyMaintenance:Centre( wx.wxBOTH )

    -- Connect Events

    m_sdbSizer2Cancel:Connect( wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event)
    DailyMaintenance:Destroy()
    end )

    m_sdbSizer2OK:Connect( wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event)
    local a= CheckwaterTrap:GetValue()
    local b = CheckHoses:GetValue()
    local c = Checkdebris:GetValue()
    if ( a and b and c ) == true then                 
      mc.mcProfileWriteString(MyInstance , "DrumMaker", "DailyMaint", tostring(os.time()))
      DailyMaintenance:Destroy()
    else
      wx.wxMessageBox("You must mark all tasks as being completed to proceed")
    end
    end )


    -- create WeeklyMaintance
   local WeeklyMaintance={}
    WeeklyMaintance = wx.wxDialog (wx.NULL, wx.wxID_ANY, "Weekly Maintance", wx.wxDefaultPosition, wx.wxSize( 500,110 ), wx.wxCAPTION )
    WeeklyMaintance:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

    local bSizer4 = wx.wxBoxSizer( wx.wxVERTICAL )

    bSizer4:SetMinSize( wx.wxSize( 500,-1 ) )
   local CheckWeeklyGrease = wx.wxCheckBox( WeeklyMaintance, wx.wxID_ANY, "Apply single shot of grease to each guideway grease fitting", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
    bSizer4:Add( CheckWeeklyGrease, 0, wx.wxALL, 5 )

    local CheckWeeklyGreaseBall = wx.wxCheckBox( WeeklyMaintance, wx.wxID_ANY, "Apply single shot of grease to each ball nut", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
    bSizer4:Add( CheckWeeklyGreaseBall, 0, wx.wxALL, 5 )

    local m_sdbSizer3 = wx.wxStdDialogButtonSizer()
    local m_sdbSizer3OK = wx.wxButton( WeeklyMaintance, wx.wxID_OK, "" )
    m_sdbSizer3:AddButton( m_sdbSizer3OK )
    local m_sdbSizer3Cancel = wx.wxButton( WeeklyMaintance, wx.wxID_CANCEL, "" )
    m_sdbSizer3:AddButton( m_sdbSizer3Cancel )
    m_sdbSizer3:Realize();

    bSizer4:Add( m_sdbSizer3, 1, wx.wxEXPAND, 5 )


    WeeklyMaintance:SetSizer( bSizer4 )
    WeeklyMaintance:Layout()

    WeeklyMaintance:Centre( wx.wxBOTH )

    -- Connect Events

    m_sdbSizer3Cancel:Connect( wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event)
    WeeklyMaintance:Destroy()
    end )

    m_sdbSizer3OK:Connect( wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event)
    local a= CheckWeeklyGrease:GetValue()
    local b = CheckWeeklyGreaseBall:GetValue()
    if ( a and b ) == true then     
      mc.mcProfileWriteString(MyInstance , "DrumMaker", "WeeklyMaint", tostring(os.time())) 
      WeeklyMaintance:Destroy()
    else
      wx.wxMessageBox("You must mark all tasks as being completed to proceed")
    end
    end )

    -- create MonthlyMaintenance
   local MonthlyMaintenance={}
    MonthlyMaintenance = wx.wxDialog (wx.NULL, wx.wxID_ANY, "Monthly Maintenance", wx.wxDefaultPosition, wx.wxSize( 500,-1 ), wx.wxCAPTION )
    MonthlyMaintenance:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

    local bSizer3 = wx.wxBoxSizer( wx.wxVERTICAL )

    bSizer3:SetMinSize( wx.wxSize( 500,-1 ) )
    local CheckInspect = wx.wxCheckBox( MonthlyMaintenance, wx.wxID_ANY, "Closely inspect guideways and rails for excessive buildup of grease and debris", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
    bSizer3:Add( CheckInspect, 0, wx.wxALL, 5 )

    local m_sdbSizer3 = wx.wxStdDialogButtonSizer()
    local m_sdbSizer3OK = wx.wxButton( MonthlyMaintenance, wx.wxID_OK, "" )
    m_sdbSizer3:AddButton( m_sdbSizer3OK )
    local m_sdbSizer3Cancel = wx.wxButton( MonthlyMaintenance, wx.wxID_CANCEL, "" )
    m_sdbSizer3:AddButton( m_sdbSizer3Cancel )
    m_sdbSizer3:Realize();

    bSizer3:Add( m_sdbSizer3, 1, wx.wxEXPAND, 5 )


    MonthlyMaintenance:SetSizer( bSizer3 )
    MonthlyMaintenance:Layout()

    MonthlyMaintenance:Centre( wx.wxBOTH )

    -- Connect Events

    m_sdbSizer3Cancel:Connect( wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event)
    MonthlyMaintenance:Destroy()
    end )

    m_sdbSizer3OK:Connect( wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event)
    local a= CheckInspect:GetValue()
    if (a) then     
      mc.mcProfileWriteString(MyInstance , "DrumMaker", "MonthlyMaint", tostring(os.time())) 
      MonthlyMaintenance:Destroy()
    else
      wx.wxMessageBox("You must mark all tasks as being completed to proceed")
    end
    end )


   

    -- create StartUpVerify
   local StartUpVerify={}
    StartUpVerify = wx.wxDialog (wx.NULL, wx.wxID_ANY, "Starting up CNC machine", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxCAPTION + wx.wxSTAY_ON_TOP )
    StartUpVerify:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

    local bSizer8 = wx.wxBoxSizer( wx.wxVERTICAL )

    local gSizer2 = wx.wxGridSizer( 1, 2, 0, 0 )

    local m_staticText13 = wx.wxStaticText( StartUpVerify, wx.wxID_ANY, "What tool number is presently in the spindle?", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
    m_staticText13:Wrap( -1 )
    gSizer2:Add( m_staticText13, 0, wx.wxALL, 5 )

    local MyToolNumber = wx.wxTextCtrl( StartUpVerify, wx.wxID_ANY, "", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
    gSizer2:Add( MyToolNumber, 0, wx.wxALL, 5 )


    bSizer8:Add( gSizer2, 1, wx.wxEXPAND, 5 )

    local StartupOK = wx.wxStdDialogButtonSizer()
    local StartupOKOK = wx.wxButton( StartUpVerify, wx.wxID_OK, "" )
    StartupOK:AddButton( StartupOKOK )
    StartupOK:Realize();

    bSizer8:Add( StartupOK, 1, wx.wxEXPAND, 5 )


    StartUpVerify:SetSizer( bSizer8 )
    StartUpVerify:Layout()
    bSizer8:Fit( StartUpVerify )

    StartUpVerify:Centre( wx.wxBOTH )

    -- Connect Events

    StartupOKOK:Connect( wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event)
    local CurrentTool = mc.mcToolGetCurrent(MyInstance)
   local EnteredTool = tonumber(MyToolNumber:GetValue())   
    if CurrentTool == EnteredTool then
      StartUpVerify:Destroy()
   else
      wx.wxMessageBox("This is not the expected tool!\n\nThe system is expecting tool "..tostring(CurrentTool).."!\nMake sure tool number "..tostring(CurrentTool).." is in the spindle before enabling!","ERROR")
      StartUpVerify:Destroy()
   end
    end )
   
  local MyInstance = mc.mcGetInstance()

  local CurrentTime=os.time()
  local FirstUsed = tonumber((mc.mcProfileGetString(MyInstance,"DrumMaker","FirstUsed","0")))

  local LastUsed = tonumber((mc.mcProfileGetString(MyInstance,"DrumMaker","LastUsed","0")))
  local DrumCount = tonumber((mc.mcProfileGetString(MyInstance,"DrumMaker","DrumCount","0")))
  local TimeUsed = tonumber((mc.mcProfileGetString(MyInstance,"DrumMaker","TimeUsed","0")))
  local DailyMaint = tonumber((mc.mcProfileGetString(MyInstance,"DrumMaker","DailyMaint","0")))
  local WeeklyMaint = tonumber((mc.mcProfileGetString(MyInstance,"DrumMaker","WeeklyMaint","0")))
  local MonthlyMaint = tonumber((mc.mcProfileGetString(MyInstance,"DrumMaker","MonthlyMaint","0")))
  local LastUsedDate=os.date("*t",LastUsed)
  local TodayDate = os.date("*t")

  local RunDayCheck = not (os.date("%x",TodayDay)== os.date("%x",DailyMaint))
  local RunWeeklyCheck = ((TimeUsed - WeeklyMaint) > 144000 )
  local RunMonthlyCheck = ((CurrentTime - MonthlyMaint) > 3456000)
  local RunIdleCheck = ((CurrentTime - LastUsed) > 3456000)
     mc.mcProfileWriteString(MyInstance , "DrumMaker", "RunWarmUp", "N")   
  mc.mcProfileWriteString(MyInstance , "DrumMaker", "RunBreakIn", "N")   
  if RunDayCheck then
    DailyMaintenance:ShowModal()
  end
  if RunWeeklyCheck then
    WeeklyMaintance:ShowModal()
    mc.mcProfileWriteString(MyInstance , "DrumMaker", "WeeklyMaint", tostring(TimeUsed))   
  end
  if RunMonthlyCheck then
    MonthlyMaintenance:ShowModal()
  end
  StartUpVerify:ShowModal()
   



4
Mach4 General Discussion / Inverse Screen LED
« on: July 22, 2015, 04:02:38 PM »
Is there an easy way to use an LED and have it light up inversely.  That is, instead of lighting up when an output is high, to light up when it's low?

Thanks in advance.

5
Mach4 General Discussion / Calling specific wizards
« on: June 27, 2015, 12:57:11 PM »
I have three wizards that I would like to be able to call up by pressing one of three buttons I'm placing on a screen.
That is, button one would invoke wizard one, button two, would invoke wizard two, etc.

I can't seem to find documentation on how to accomplish this.

Thanks in advance for your help!

Pages: 1