Hello Guest it is April 18, 2024, 02:42:30 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.


Messages - rhtuttle

371
General Mach Discussion / Re: Edit X Position (newb, be gentle)
« on: January 13, 2018, 05:04:28 PM »
This bug has been known for over a year and should have been corrected in the last release but wasn't.

You will have to edit the screen (my as well dive in head first in the deep end).  Make sure that you have Mach4 in maximized view, go to Operator->Edit Screen.    the screen will change to a screen editor with manager and properties windows on the left and your screen on the right.  Click on the xDro.  The properties window is in the lower left portion of the screen.  Change the 'Editor' property to 'In Place' by clicking on the right side of 'Editor' and a drop down list will appear.  Again select 'Operator->Edit Screen' and mach will ask you if you want to save the screen, select yes.  You should now be able to edit the dro

HTH

RT

372
General Mach Discussion / Re: Edit X Position (newb, be gentle)
« on: January 13, 2018, 03:46:07 PM »
Are you running Mach4 perchance?

373
Mach4 General Discussion / Lua Fails Me
« on: January 13, 2018, 03:30:45 PM »
Just when I think i am starting to understand lua I run into this.  The code below is a macro that I have used many times and today I wanted to alter it a bit.  When the changes didn't do what I thought it should i started putting in wxMessagBox calls in to see where it was failing.  When the first message box didn't pop up I was surprised, but even more surprised that the macro continued to execute including the second popup telling me to switch gearing.  What am I missing?  I deleted the .mcc and .mcs.bak several times and completely restarted windows with the same results.  I am at a total loss on this one.

Code: [Select]
function m6691(hVars)
  local xNow,zNow,maxVal,rc
  local ts,tr,te,sCode
  local currPos
  local plungeFeed=1
  local roughDOC=0.018
  local roughFeed=18
  local roughSpeed=1200
  local finishDOC=0.004
  local finishFeed=8
  local finishSpeed=1800
  local endX=.850 --param1()
 
  local inst=mc.mcGetInstance()

  wx.wxMessageBox('nil')  --HOW  IS THIS SKIPPED?
 
  if mc.mcSpindleGetCurrentRange(inst)~=1 then
    --rt.rtAudio("notify")
    --wx.wxSound('C:\\mach4Hobby\\Sounds\\Notify.wav',0):Play()
    wx.wxMessageBox('Set Spindle Gearing to High Speed')    --THIS ONE DOES GET EXECUTED!!!
    mc.mcSpindleSetRange(inst,1)
  end
  if (hVars ~= nil) then
    local DFlag = mc.mcCntlGetLocalVarFlag(inst, hVars, mc.SV_D)
    if(DFlag == 1) then
      endX = mc.mcCntlGetLocalVar(inst, hVars, mc.SV_D)
      mc.mcCntlSetLastError(inst,"Turning Diameter to "..endX)
    end
  end
  xNow,rc = mc.mcAxisGetPos(inst,0)
  zNow,rc = mc.mcAxisGetPos(inst,2)
  if xNow<=endX then
    rt.rtAudio("chord")
    wx.wxMessageBox("start X diameter "..xNow.." is <= to end diameter of "..tostring(endX))
    return
  end
  if zNow<=0 then
    rt.rtAudio("chord")
    wx.wxMessageBox("start Z is less than or = to 0")
    return
  end
  ts=os.time()

--rough cuts 
  mc.mcCntlGcodeExecuteWait(inst,"M3 S"..tostring(roughSpeed).."\ng04 p3.0")
  currPos,rc=mc.mcAxisGetPos(inst,0)
  while ((currPos-2*roughDOC)>(endX+finishDOC*2)) do
    maxVal=math.max(endX+2*finishDOC,currPos-roughDOC)
    sCode="G01 F"..tostring(plungeFeed).." X"..tostring(maxVal-roughDOC)
    mc.mcCntlGcodeExecuteWait(inst,sCode)
    currPos,rc=mc.mcAxisGetPos(inst,0)
    mc.mcCntlGcodeExecuteWait(inst,"G01 F"..tostring(roughFeed).." Z0")
    if mc.mcSpindleGetSensorRPM(inst)==0 then
      rt.rtAudio("chord")
      wx.wxMessageBox("Spindle Stopped")
      return
    end
    currPos,rc=mc.mcAxisGetPos(inst,0)
    maxVal=math.max(endX+2*finishDOC,currPos-roughDOC)
    if currPos==endX+2*finishDOC then
      break
    end
    mc.mcCntlGcodeExecuteWait(inst,"G01 F"..tostring(plungeFeed).." X"..tostring(math.max(endX+2*finishDOC,currPos-roughDOC)))
    if mc.mcSpindleGetSensorRPM(inst)==0 then
      rt.rtAudio("chord")
      wx.wxMessageBox("Spindle Stopped")
      return
    end
    mc.mcCntlGcodeExecuteWait(inst,"G01 F"..tostring(roughFeed).." Z"..tostring(zNow))
    if (currPos)==endX+2*finishDOC then
      break
    end 
  end
  tr=os.difftime(os.time(),ts)/60
  mc.mcCntlSetLastError(inst,"Roughing Time: "..string.format("%.1f min",tr))

  --finish cuts
  mc.mcCntlGcodeExecuteWait(inst,"M3 S"..tostring(finishSpeed))
  while (mc.mcAxisGetPos(inst,0)>=(endX+finishDOC)) do
    currPos,rc=mc.mcAxisGetPos(inst,0)
    maxVal=math.max(endX,currPos-finishDOC)
    mc.mcCntlGcodeExecuteWait(inst,"G01 F"..tostring(plungeFeed).." X"..tostring(maxVal))
    if mc.mcSpindleGetSensorRPM(inst)==0 then
      rt.rtAudio("chord")
      wx.wxMessageBox("Spindle Stopped")
      return
    end
    mc.mcCntlGcodeExecuteWait(inst,"G01 F"..tostring(finishFeed).." Z0")
    currPos,rc=mc.mcAxisGetPos(inst,0)
    if currPos==endX then
      break
    end 
    mc.mcCntlGcodeExecuteWait(inst,"G01 F"..tostring(plungeFeed).." X"..tostring(endX))
    if mc.mcSpindleGetSensorRPM(inst)==0 then
      rt.rtAudio("chord")
      wx.wxMessageBox("Spindle Stopped")
      return
    end
    mc.mcCntlGcodeExecuteWait(inst,"G01 F"..tostring(finishFeed).." Z"..tostring(zNow))
    currPos,rc=mc.mcAxisGetPos(inst,0)
    if currPos==endX then
      break
    end 
  end
  mc.mcCntlGcodeExecuteWait(inst,"M5\nM9")
  te=(os.time()-ts)/60
  mc.mcCntlSetLastError(inst,"Roughing Time: "..string.format("%.1f min",tr).." - Total Time: "..string.format("%.1f min",te))
end

if mc.mcInEditor()==1 then
  m6691()
end


TIA

RT

374
Mach4 General Discussion / Re: sms to phone
« on: January 12, 2018, 02:43:10 PM »
thanks dbt3000files,

I use t-mobile so instead of the @msg.fi.google.com I use @tmomail.net, each carrier has a gateway.  

I put the following in a button left up script to test whether a batch file is needed, you don't, and it works.  I think making a function in the load script that takes a string and appends that as the message (-m) would make it more useful.  You could call it with a more specific message.
 
os.execute('c:\\Mach4Hobby\\sendEmail.exe -f myemail@mail.com -t 1111111111@tmomail.net -s smtp.mail.com:587 -xu myemail@mail.com -xp mypassword -u "test" -m "hello world"')

Thanks for providing the links.

RT

375
Mach4 General Discussion / Re: sms to phone
« on: January 05, 2018, 06:26:54 PM »
Has anyone successfully got the C:\Mach4Hobby\Modules\ smtp-Example.lua to work?

376
General Mach Discussion / Re: Flat bottom Hole
« on: December 29, 2017, 07:51:23 PM »
that was my first thought but I had the end mill and it seems as they both have two flutes but of different geometry.  Is there really that much difference?

377
General Mach Discussion / Re: Flat bottom Hole
« on: December 29, 2017, 07:05:08 PM »
Seems like a sound plan if I was using a mill and not a lathe ;^)

378
General Mach Discussion / Flat bottom Hole
« on: December 29, 2017, 03:07:54 PM »
Need some recommendations how to drill a flat bottom hole on a lathe.  I have a .375" x 1.75" hole.  I peck with a 118 degree twist drill to 1.75.  So far have tried using a .375 2 flute end mill pecked from 1.6" depth to get the flat bottom.  The end mill fills too quickly and the spindle over torques and shuts down.  The end mill is not creating chips but rather dust.  Last effort was  s700 f.25 peck of .05

What approach should I take instead?

TIA

RT

379
Mach4 General Discussion / Home Signal
« on: December 29, 2017, 11:28:46 AM »
When you set up a motor you define a home signal pin and whether that motor homes.  Is there an api that will allow you to turn on/off, mapping enabled or input name?

On my lathe I have my spindle configured to be either run by a motor for the spindle function or alternately driven by a stepper (belt change, motor 3, drive C) to act as a rotary/indexer.  I use input 12 as the spindle index pulse and as the homing signal for the C drive.  When used as a spindle the C drive homing signal is sent on each revolution.  It doesn't affect performance but the log has a message sent for each revolution.  I know I could just use two profiles but that creates other issues (re-referencing all axes).

TIA

RT

380
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: December 23, 2017, 07:33:01 PM »
Would be nice when using the manual tool change ( mcCntlToolchangeManual) to have the tool number requested and Tool Description of the tool displayed in the dialog box. 

MTCW

RT