Hello Guest it is May 12, 2024, 12:09:03 PM

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 - walkman

Pages: 1
1
Mach4 Toolbox / MDI Execute
« on: July 28, 2023, 07:33:48 PM »
Greetings,

In the MDI window, I can put these 2 lines together: "G53 X12.4129 Y433.9433 and next line G92 X0 Y0", and they both work doing exactly what they are supposed to. I want those two commands to run after the machine is homed using the "Home X Y Z Axis" button. As I mentioned, both work manually in the MDI window.

I added the following 2 lines to the screenscript.lua file at the end of the "function RefAllHome()" section.

mc.mcCntlMdiExecute(inst, "G53 X12.4129 Y433.9433")  -- This line works
mc.mcCntlMdiExecute(inst, "G92 X0 Y0")        --This line doesn't work

I can't figure out why the G53 line works but the G92 line does not work inside the script as it does when manually entered into the MDI window?

I'd appreciate any help in getting this to work. Thanks!

2
Brains Development / MDI G92
« on: July 22, 2023, 08:12:15 PM »
Greetings,

I'm trying to figure out how to automatically set work coordinates to zero after sending the spindle to a specific set of coords after the machine homes by inserting 2 lines in the home all section of ScreenScript.lua.

Ex: Press "Home X Y Z Axis" button --> Machine homes --> moves to some pre-set coordinates --> Zero's X Y Z WORK coordinates.

As you can see I added the following lines:

mc.mcCntlMdiExecute(inst, "G53 X12.4129 Y433.9433")  -- This line works
mc.mcCntlMdiExecute(inst, "G92 X0 Y0")        --This line doesn't work

G53 works as expected but G92 does not and the XYZ work coordinates do not change to zero.

If I run the G53 and G92 commands directly in the MDI window they both work as expected.

Any ideas why and how I can get this to work?

Thanks!

---------------------------------------------------------------
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
   local inst = mc.mcGetInstance("Screen load script, RefAllHome()")
   local valEnable = mc.mcProfileGetInt(inst, "AvidCNC_Profile", "iConfigEnableSoftLimitsAfterHomed", 1)
   local valSimHome = mc.mcProfileGetInt(inst, "AvidCNC_Profile", "iConfigHomeXYSimultaneously", 0)
  local valCustomHoming = mc.mcProfileGetInt(inst, "AvidCNC_Profile", "iConfigCustHomingEnabled", 0)
  local msg = ""

   mc.mcAxisDerefAll(inst)  --Just to turn off all ref leds
   mc.mcAxisHomeAll(inst)
  coroutine.yield() --yield coroutine so we can do the following after motion stops
 
  if (valEnable == 1) then
    pf.EnableSoftLimits()
    msg = "Homing of machine is complete. Soft limits will now be enabled."
  else
    msg = "Homing of machine is complete."
  end
   wx.wxMessageBox(msg, "Homing")
   mc.mcCntlMdiExecute(inst, "G53 X12.4129 Y433.9433")
   mc.mcCntlMdiExecute(inst, "G92 X0 Y0")
end

3
Mach4 General Discussion / ATC Y-axis won't go to negative value
« on: July 12, 2023, 10:38:07 PM »
Greetings!

I have an AvidCNC with auto tool changer. My tool rack is attached to the very front of the machine. To make room for the tool rack I moved the spoilboard forward to Y=434. I wanted the machine coordinates for the X and Y axis to be 0,0 at the spoilboard instead of at the front of the machine frame where the rack is attached so I offset Y-axis homing value to -434 such that when I home the machine Y=-434 instead of zero.

After doing so, when a tool change starts the Y-axis moves to +108.00 instead of moving to the assigned negative Y value to the rack that I assigned. No matter what negative Y value I assign to the tool it still goes to Y: +108.00 every time but the X and Z axis move to their intended positions.

I'd appreciate any assistance to make this work. Thanks!

Pages: 1