Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: haroutkhaloian on October 04, 2015, 03:46:19 AM

Title: Mach3 Probe HELP
Post by: haroutkhaloian on October 04, 2015, 03:46:19 AM
Hello
i need your help a little please .. i have a problem with my Mach3 Probe ... to start with i made my own probe and everything it worked fine the LED light was green when the torch touched the plate and the VBscript worked fine as well when i clicked on "ref all home" .. but heres the problem when i try to work on a file on Mach3 the probe doesnt work at all .. its like i didnt even activated it :( i tried to change the vbscript and many other things but nothing worked .... i need help if you could .. as soon as possible
thanks in advance.
Title: Re: Mach3 Probe HELP
Post by: TPS on October 05, 2015, 02:50:44 AM
Hi,

post your vbscript an we will see, but remember
the probing is only measuring the length of the
tool, nothing else.

Thomas
Title: Re: Mach3 Probe HELP
Post by: haroutkhaloian on October 05, 2015, 03:54:10 AM
sorry i might have done something wrong ... but what i want is what in the following video:-
https://www.youtube.com/watch?v=ZwK58aWHsHQ

i want my plasma machine to work just like in the video shows ... if you have a map of how i should do that or a setting or wiring or a way of connecting or a VBscript anything that helps my plasma to work the same as the man's in the video ... please send it to me .. thanks.
(p.s. i did connect the limit switch with the Z axis)
Title: Re: Mach3 Probe HELP
Post by: TPS on October 05, 2015, 04:58:52 AM
Hi,

a simple example for metric would be:

Sub Main

cutheight = 20
cutpos = 0
ZProbePos = 0

    Code "G31 Z-200 F150" 'do the probing
    While IsMoving() 'wait for finish
    Wend           
   
    'get the position where we hit the probe
    ZProbePos = GetVar(2002)   
    cutpos = ZProbePos - cutheight

    'go to cutting heigt
    code "G1 Z" + cutpos + "F100"

    'set new z-Pos
    SetDRO(2,cutheight)

End Sub

not tested, just written down.

Thomas
Title: Re: Mach3 Probe HELP
Post by: haroutkhaloian on October 05, 2015, 05:24:51 AM
im sorry but the vbscript you sent didnt work ...
Title: Re: Mach3 Probe HELP
Post by: TPS on October 05, 2015, 05:28:28 AM
what exactly did not work ?

did you do a ref all after the probe ?
Title: Re: Mach3 Probe HELP
Post by: haroutkhaloian on October 05, 2015, 05:36:43 AM
only half of it worked and then it says "Error Line:17_mismatch" and yes i did click on ref all after the probe the same error appeared .... does this script that you sent me works with every time i start a program on mach3? like does it move every time or just once only when i click on ref all?? 
Title: Re: Mach3 Probe HELP
Post by: TPS on October 05, 2015, 05:53:56 AM
ok, here the corrected version:

Sub Main

cutheight = 20
cutpos = 0
ZProbePos = 0

    Code "G31 Z-200 F150" 'do the probing
    While IsMoving() 'wait for finish
    Wend           
   
    'get the position where we hit the probe
    ZProbePos = GetVar(2002)   
    cutpos = ZProbePos - cutheight

    'go to cutting heigt
    code "G1 Z" + CStr(cutpos) + "F100"

    'set new z-Pos
    SetDRO(2,cutheight)

End Sub


but the logic  sequence would be to do a ref all first,
and the run the script, because the ref Z will "destroy"
your probe height.

Thomas