Hello Guest it is April 18, 2024, 07:57:33 AM

Author Topic: mc.mcAxisSetMachinePos  (Read 1743 times)

0 Members and 1 Guest are viewing this topic.

mc.mcAxisSetMachinePos
« on: December 10, 2017, 04:15:25 PM »
Isn't this supposed to set the axis machine position?  When I run this from a button script the z axis dro machine pos does not get set to zero.  Is it doing something else that I am misunderstanding? The return value is 0.

wx.wxMessageBox(tostring(mc.mcAxisSetMachinePos(mc.mcGetInstance(),mc.Z_AXIS,0.0)))

TIA

RT

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: mc.mcAxisSetMachinePos
« Reply #1 on: December 10, 2017, 05:12:44 PM »
Unfortunately mcAxisSetMachinePos has not been functional for a very long time on the mcLua side.

DazTheGas
New For 2022 - Instagram: dazthegas
Re: mc.mcAxisSetMachinePos
« Reply #2 on: December 10, 2017, 09:41:33 PM »
here is my workaround
Code: [Select]
mInst = mc.mcGetInstance()
mc.mcCntlMdiExecute(mInst, "G00 Z3.0 Y0.0 X0.0")


just insert a G53 in there to use machine coordinates
« Last Edit: December 10, 2017, 09:44:33 PM by mkullman »
Re: mc.mcAxisSetMachinePos
« Reply #3 on: December 10, 2017, 10:37:46 PM »
Hi,
yeah that works if you want motion...but what if you dont?

You've manually or otherwise jogged to a location that you wish to nominate as a machine co-ordinate reference
point for this session, a jig fixture or something.The:
mc.mcAxisSetMachinePos(inst,*********x) allowed you to nominate the machine co-ords of that point overriding the home
point without moving away from your carefully selected point. Quite handy I would have thought.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: mc.mcAxisSetMachinePos
« Reply #4 on: December 10, 2017, 10:53:25 PM »
Hmmmmm, One idea might be to set homing to "home in place", move to position then reference.

I'm torn on this one. Really the only thing that should ever adjust Machine position is referencing the machine. Can't imagine a scenario that anything else would be acceptable....... but trying to. Since machine position is just that, physical position of axis in relation to machine (at one end, in the middle, one end plus or minus some distance (home off distance)). I can't imagine why it would need to be dynamically altered, that is what fixture offsets, etc. are for.  Machine position is what all other offsets work off of. If it isn't consistent nothing else will be either.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: mc.mcAxisSetMachinePos
« Reply #5 on: December 11, 2017, 12:32:03 AM »
oh, my mistake, i thought you wanted to move to a set position. I see now that you want to SET current position to zero in machine coordinates.
Re: mc.mcAxisSetMachinePos
« Reply #6 on: December 11, 2017, 12:03:06 PM »
I can think of one scenario where you would want to set the machine pos manually since I am the one trying to do it.

I am using a small lathe. Since some of the time I use the tail stock and some of the time I don't. I don't have any spare inputs to add more separate homing switches at fixed positions so it would be easiest, for me, to use my probe attached to a fixed length rod inserted into the spindle and another rod inserted into the cross slide to home the Z axis.  I am using a pmdx 411 and when I home the Z using a signal (ISIG_INPUT10 same as the probe) the overrun pushes the rod back into the spindle, about .040.  If instead I use a g31 it stops with acceptable overrun (read, it doesn't affect the probe fixture).  At that point I would like to make that machine origin for Z.  Then I move the x axis to each side the rod and g31 each X+ and x- so that I can determine where the center line is on the x axis.  This negates having the exact rod sizes and can be used with any drill bit or other tool that needs to be on the center line. Making this the x axis machine 0 would allow for easier (in my  limited tool setting knowledge) to calibrate all tools to this point using the probe with each tool.

I am trying this morning to use the 'home in position' to do this but am running into the usual problems with mc.mcCntlMdiExecute, mc.mcCntlGcodeExecute, mc.mcCntlGcodeExecuteWait and mc.mcAxisIsStill problems.

Is there a list of other API's that no longer work so I don't waste hours trying things that are known to not work anymore?

TIA

RT