Hello Guest it is June 08, 2024, 07:32:56 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

301
Mach4 General Discussion / Re: Probe1, Probe2,Probe3, PMDX411
« on: February 20, 2018, 06:52:01 PM »
Thanks Steve, not the answer I was hoping for but it sure was answered quickly!

302
Mach4 General Discussion / Probe1, Probe2,Probe3, PMDX411
« on: February 20, 2018, 06:27:53 PM »
1. When configuring Mach4 input pins I have digitize set to 10 and it is working.  But the only other Probe showing in the input signal configuration dialog is Probe3.  Where are Probe1 and Probe2? 

2. When I assign any of the pins to Probe3 I get a message from the pmdx411 smartBob that the Mach4 Probe3 is not supported and will be ignored.  Does that mean you may only have one digitize/probe with the pmdx411?  No support for g31.1, g31.2 or g31.3?

TIA

RT

303
Mach4 General Discussion / Re: Home Signal
« on: February 20, 2018, 10:58:04 AM »
Daz, as Strother Martin says in 'Cool Hand Luke',  "What we've got here is failure to communicate!"  ;D

Not trying to have two homing operations.  Trying to stop the PMDX411 from throwing an 'C axis homing tripped' error message every revolution when using the spindle as a spindle.  It seems to me that that message should only be thrown when that axis is being homed, but that's just me.  If on a mill you have a your x axis home switch not at the end of travel but somewhere in the middle you really don't want an error message thrown every time you travel over it during an operation.

Here's a real world example.  Let's say on my lathe I want to make a knob with 10 equally spaced markings.  First I turn the knob to my desired shape.  Now I need to change belts on the spindle and control it as a rotary with a stepper(motor 3/C axis).  I need to home the C axis, then use a diamond drag to etch the markings every 36 degrees.  Now when I go back to turn another one, change belts, I will get the tripped error every revolution. 

What I want is to enable the 'Motor 3 home' mapping before homing and disable it after homing.  I don't think that is doable.  I think I am just going to have to manually change it when I manually change the belts. :-\

RT

304
Mach4 General Discussion / Re: Home Signal
« on: February 19, 2018, 02:18:42 PM »
Daz, thanks for the suggestion , but no joy. 

Adding the mcCntlConfigStart and stop lock the GUI.  Wrapping it in the disable and enable umlocks the GUI but none of the subsequent code gets executed.  As it stands now.

local function myHomeC()
  local inst=mc.mcGetInstance()
  local rc,sState
  local pos=-1
mc.mcCntlEnable(inst,0)
mc.mcCntlConfigStart(inst)
  local hSigH=mc.mcSignalGetHandle(inst,mc.ISIG_MOTOR3_HOME)
  rc=mc.mcSignalEnable(hSigH,1)
  mc.mcProfileWriteInt(inst,'Signal68','Enabled',1)
  mc.mcProfileSave(inst)
  mc.mcProfileFlush(inst)
mc.mcCntlConfigStop(inst)
mc.mcCntlEnable(inst,1)

-- now none of this code is executed, makes sense since a disable cancels all running code

  local hSig,rc=mc.mcSignalGetHandle(inst,mc.ISIG_INDEX)
  if rc==mc.MERROR_SIGNAL_NOT_FOUND  then
    wx.wxMessageBox('wrong Signal')
  end
  sState=mc.mcSignalGetState(hSig)
  if sState==1 then  -- sitting on the slot so move off it
    mc.mcCntlGcodeExecuteWait(inst,'g0 f20000 h15\n')--g1 h366 f5000')
  end
  mc.mcAxisHome(inst,mc.C_AXIS)
 
-- None of the folowing code ever got executed

 mc.mcCntlSetLastError('Homing')
 
  repeat
    wx.wxMilliSleep(1000)
    rc= mc.mcAxisIsHoming(inst,mc.C_AXIS)
    mc.mcCntlSetLastError('Homing: '..tostring(rc))
  until rc==0 
  rc=mc.mcSignalEnable(hSigH,0)
  mc.mcProfileFlush(inst)
end

myHomeC() 

RT

305
Mach4 General Discussion / M1 optional stop
« on: February 19, 2018, 01:07:08 PM »
It appears that m1 'optional stop' only works when running a gcode file.  It has no affect in the MDI, mcCntlGcodeExecute, mcCntlMDIExecute or mcCntlGcodeExecuteWait.

I assumed (silly me) that execution of gcode would be the same across all execute requests.  How would you recommend accomplishing the same effect in a macro or button script?

Executewait,messagebox,executewait,messagebox,execute?

TIA

RT

306
Mach4 General Discussion / Re: Home Signal
« on: February 19, 2018, 12:42:44 PM »
Craig,  thanks for that but unfortunately even after writing to the profile, saving and flushing the PMDX still complains of an invalid configuration. I have confirmed that the correct profile string is written to with the correct settings before calling homing.

  local hSigH=mc.mcSignalGetHandle(inst,mc.ISIG_MOTOR3_HOME)
  rc=mc.mcSignalEnable(hSigH,1)
  mc.mcProfileWriteInt(inst,'Signal68','Enabled',1)
  mc.mcProfileSave(inst)
  mc.mcProfileFlush(inst)

Evidently PMDX does not read the current profie setting before doing homing.

I think I need to have Steve Stallings address whether this is a 'feature' or bug  ;)

RT

307
edit:

this line needs to be removed from the PLC script:

--  if flag==0 then return end      --no request



308
Mach4 General Discussion / Re: Home Signal
« on: February 18, 2018, 02:26:46 PM »
Everything as stated above but have added the signal enable/disable code.  Below is the code in my Ref C button left up script.  I have un-ticked the motor3 mapping home input signal through Mach4 config.  When the button is clicked I get

 PMDX: C-axis homing error, missing or invalid home switch configuration

Mach4 is disabled.  Not what I was hoping for. :-\  When I check the mach4 config the motor3 home mapping is ticked so the code is executing correctly but it appears PMDX is not checking the status of the mapping signal before homing.  Is it supposed to or am I misunderstanding what is happening?

Code: [Select]
local function myHomeC()
  local inst=mc.mcGetInstance()
  local rc,sState
  local pos=-1
  local hSigH=mc.mcSignalGetHandle(inst,mc.ISIG_MOTOR3_HOME)
  rc=mc.mcSignalEnable(hSigH,1)
  local hSig,rc=mc.mcSignalGetHandle(inst,mc.ISIG_INDEX)
  if rc==mc.MERROR_SIGNAL_NOT_FOUND  then
    wx.wxMessageBox('wrong Signal')
  end
  sState=mc.mcSignalGetState(hSig)
  if sState==1 then  -- sitting on the slot so move off it
    mc.mcCntlGcodeExecuteWait(inst,'g0 f20000 h15\n')--g1 h366 f5000')
  end
  mc.mcAxisHome(inst,mc.C_AXIS)
  repeat
    wx.wxMilliSleep(1000)
    rc= mc.mcAxisIsHoming(inst,mc.C_AXIS)
    mc.mcCntlSetLastError('Homing: '..tostring(rc))
  until rc==0 
  rc=mc.mcSignalEnable(hSigH,0)
end

myHomeC() 

TIA

RT

309
Mach4 Toolbox / Radio and Checkbox examples
« on: February 15, 2018, 02:56:02 PM »
Attached is a group box that can be imported into your screen set.  I keep it hidden and when I need a checkbox or group of radio buttons I just copy what I need from it to wherever I need it.  The buttons show how you would access the state.

download the txt and remove the txt extension and then it can be imported into your screen set.

HTH

RT


310
Mach4 General Discussion / Re: PMDX411 Spindle & MaCH4 Speed control
« on: February 15, 2018, 10:25:40 AM »
What happens when you issue a m3 s1500?  Do you still get 2900 rpm or does it slow?

Do you have Mach spindle configured with a tic in the 'Wait on spindle to stabilize'?