Hello Guest it is March 29, 2024, 06:35:45 AM

Author Topic: Simulate Probe Strike  (Read 2350 times)

0 Members and 1 Guest are viewing this topic.

Simulate Probe Strike
« on: February 20, 2017, 03:48:47 PM »
I am converting my Mach3 lathe probe script to Mach4.  I want to simulate a probe strike as I rewrite this.

I have tried adding a button to the screen and writing scripts for the down and up key presses to change the state to on and off.  My code is:

local inst=mc.mcGetInstance()
local hSig=mc.mcSignalGetHandle(inst,ISIG_PROBE)
       mc.mcSignalSetState(hSig,1)


and

local inst=mc.mcGetInstance()
local hSig=mc.mcSignalGetHandle(inst,ISIG_PROBE)
       mc.mcSignalSetState(hSig,0)

What should I be doing since this doesn't work? 

TIA

RT

RT


Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Simulate Probe Strike
« Reply #1 on: February 20, 2017, 04:58:29 PM »
You are missing the mc in front of ISIG_PROBE


Code: [Select]
local inst=mc.mcGetInstance()
local hSig=mc.mcSignalGetHandle(inst,mc.ISIG_PROBE)
       mc.mcSignalSetState(hSig,1)

DazTheGas
« Last Edit: February 20, 2017, 05:00:00 PM by DazTheGas »
New For 2022 - Instagram: dazthegas
Re: Simulate Probe Strike
« Reply #2 on: February 21, 2017, 10:50:23 AM »
Thanks Daz, I would have looked at that for 2 days before seeing that. 

Offline SSPW

*
  •  26 26
    • View Profile
Re: Simulate Probe Strike
« Reply #3 on: April 19, 2017, 03:21:12 PM »
I wanted to same thing! i have button configured. In diagnostics and logging the probe led and signal 161 are changing. But it has no effect on MACH probing in a clean mach4 install in demo mode.
Re: Simulate Probe Strike
« Reply #4 on: April 19, 2017, 04:15:55 PM »
My appologies if I misunderstand what you are aiming to do, but the hardware probe input would normally be recognised and the axis position latched by  the controller. You should not expect the controller to do this in response to your changing the probe signal within Mach4. This is certainly the case with my CS Labs controller, where a hardware edge is needed to halt a G31 sycle: a Mach4 signal change has no effect on G31.

Allan

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Simulate Probe Strike
« Reply #5 on: April 19, 2017, 04:41:36 PM »
Simulating a probe strike was very helpfull in designing some routines I done in lua without actually having to use my machine as a gineapig.

DazTheGas
New For 2022 - Instagram: dazthegas