Hello Guest it is March 29, 2024, 02:12:46 AM

Author Topic: Probing - what would i need?  (Read 12272 times)

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Probing - what would i need?
« Reply #30 on: April 05, 2018, 10:49:00 AM »
Yep.

I have a probe now, hope to test it this weekend.

I'm also writing some probing macros to play with, no idea what i need until i try it out really, I'm using the CS-Labs M31 code - seems better to keep as much as possible within the motion controller I think.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Probing - what would i need?
« Reply #31 on: April 05, 2018, 10:56:37 AM »
here is my X/Y probing libary, sorry it's in german

to use it copy the file to c:\mach3\macros\your Profile Name


to do a left lower Corner probe the code in the button would be:

Code: [Select]
Sub Main()
'probe left lower corner
Call TouchLU
End Sub

#Expand <\..\..\macros\your Profile name\ProbeFunktionen>  ##

i love this #Expand functionality, because you edit your button only one time,
and you can do all the changes on code easily in the libary file without changing Screen and so on.

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Probing - what would i need?
« Reply #32 on: April 05, 2018, 01:41:51 PM »
ok had some time, made a english Version (well bad bavarian english).


if you come to teh TouchInner() TouchOuter() and
specially to the TouchTwisted() give me a shout,
i think they Need explantion, because they are complex.

Thomas
« Last Edit: April 05, 2018, 01:45:58 PM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Probing - what would i need?
« Reply #33 on: April 10, 2018, 04:39:20 PM »
Well, things have not progressed well.

I did get a probe routine to run, twice, then a scripter compile error.

The next macro i tried just did nothing, now if i try G31 probing, it thinks the machine is not referenced home and goes into reset.

G31 causes no motion at all - the message line thinks the probe finished without contact.

Not sure how to fix this really, something has broken the probing calls within the CS labs controller plugin i guess.

Seems there are a few horror stories on the 'net re CS labs & Mach3 & probing but nothing definite as usual, I can't downgrade to 028 as they say because IIRC rigid tapping does not work in the version.

Is there a way to fix probing or is the start of the end for me and Mach3???

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Probing - what would i need?
« Reply #34 on: April 11, 2018, 01:34:52 AM »
HI,
have you tryed to run M31 probing macro.

due my probing test's i fiured out, if there something faults during probing (G31/M31 started),
you have to restart Mach and the CSLab Controller to get it working again.

all my posted functions for probing, witch use all M31, are running without any Problem here.

About tapping, i also got the M84 running on my machine (V022), or do you mean other
tapping routines. if yes just let me know, and i will test on my machine.

Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Probing - what would i need?
« Reply #35 on: April 11, 2018, 02:02:19 AM »
hi

Yes, but no - I used the exact M31 code but put it inline with my own macro so i didn't need to risk calling a macro from within a macro:)

It worked a couple of times, then i tried another macro which had the compile error despite being ok, it then just started ignoring the motion and as soon as you issued a M31 it just said move finished with probe being hit and then faulted out on the retract G91 move after.

Now it won't run at all even after a full reboot a day later.

I did ask CS labs but their support is terrible.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Probing - what would i need?
« Reply #36 on: April 11, 2018, 03:08:52 AM »
Yes, but no - I used the exact M31 code but put it inline with my own macro so i didn't need to risk calling a macro from within a macro:)

that was the reason, why i included the original M31code into my functionlibary as a function (function Probe, in the file i posted).

if you post your code, then i will run it during the afternoon on my machine.
  
I did ask CS labs but their support is terrible.

i have allways written to a CSLab guy called Wojtek, and got allways a answer within 48h,
ok that's not even fast.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Probing - what would i need?
« Reply #37 on: April 11, 2018, 03:16:55 AM »
HI

Code below, simple Y+ edge detect.

Yes its usually Wojtek that eventually replies but the delay is terrible - this kit is not cheap stuff after all, probably the most expensive DIY controllers out there. I have been looking at their new SimCNC software but with this level of support it could take years to get a solution running :)

I cant install v022 that CSL recommend as theres an internal Mach bug that breaks my 2010 screen set, plus a few other issues i think.

Dave

Code: [Select]
Sub Main()
'***Y+ Probing Macro
'***Written by and for DD Metal Products Ltd 2018
'***Metric units only in use
'***Using CSLABS Controller M31 macro code
'***Axis scaling not expected or handled
'***Probe offset must be calibrated at "Slow Feedrate" value and set in "Probe Tip Dia" DRO first
'***Probe Z axis position is set by user first to correct height
'***Probe Y position must be within the value set in "Max Distance" DRO

Dim FeedFast, FeedSlow
Dim ProbeOffset
Dim MaxDistance
Dim X_SENSE
Dim Y_SENSE
Dim Z_SENSE
Dim CurrentAbsInc

'***Load Variables From Screen DRO's
FeedFast = GetUserDRO(1821)
FeedSlow = GetUserDRO(1822)
MaxDistance = GetUserDRO(1823)
ProbeOffset = GetUserDRO(1829)

'***Error checks
If GetOemLed(16)<>0 Then '***Check for machine coordinates setting
  Message "Please Change To Working Coordinates"
  Exit Sub
End If

If GetOemLed(825)<>0 Then '***Probe is not connected or cable broken
  Message "Probe Connection Error"
  Exit Sub
End If

'***Get the current G90/G91 state
CurrentAbsInc = GetOemLED(48)   

'***Start Probing
Message "Probing In Y+ Direction"
Sleep (1000)

Code "F" & Feedfast

SetUserDRO(1511, 0) '***X Axis
SetUserDRO(1512, MaxDistance) '***Y Axis
SetUserDRO(1513, 0) '***Z Axis

Call ProbeSurface()

X_SENSE = GetVar(2000)
Y_SENSE = GetVar(2001)
Z_SENSE = GetVar(2002)

Code "G91 G0 Y-3" '***Step back
While IsMoving()
  Sleep(50)
Wend

Code "F" & FeedSlow

SetUserDRO(1511, 0) '***X Axis
SetUserDRO(1512, 5) '***Y Axis - Must be within 5mm of travel
SetUserDRO(1513, 0) '***Z Axis

Call ProbeSurface()

X_SENSE = GetVar(2000)
Y_SENSE = GetVar(2001)
Z_SENSE = GetVar(2002)

'***Step back to release the probe
Code "G91 G0 Y-5"
While IsMoving()
  Sleep(50)
Wend

'***Raise the spindle to clear part
Code "G91 G0 Z10"
While IsMoving()
  Sleep(50)
Wend

'***Move Y axis to edge and zero the DRO
Code "G90 G0 Y" & Y_SENSE + ProbeOffset
While IsMoving()
  Sleep(50)
Wend
SetOemDRO(801,0)

'***Retract the spindle fully
Code "G53 G0 Z0"
While IsMoving()
  Sleep(50)
Wend

'***If G91 was in effect before then return to it
If CurrentAbsInc = 0 Then
  Code "G91"
Else
  Code "G90"
End If

Message "Y+ Probing Complete"

End Sub




Sub ProbeSurface()

Sleep(250)’***Needed or UserDRO's fail to update

NotifyPlugins(10103)

SetUserDRO(1510, 0)
While(GetUserDRO(1510) = 0)
  Sleep(50)
  NotifyPlugins(10104)
Wend

If(GetUserDRO(1510) = 2) Then '***Probing error - no detection in distance = abort
  Message "Probing Error - No Surface Found"
  End
End If

End Sub       

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Probing - what would i need?
« Reply #38 on: April 11, 2018, 07:54:01 AM »
It is connected with soft limits - turn them OFF and you can do a simple, single axis G31 routine.

Try and do a two-axis and on the second axis G31 you get a “probe ignored” error and it fails.

Absolutely broken I think, not only is it linked to soft limits for an unknown reason, it crashes if you try more than one axis.

So, clearly its not going to play, I have been reading a lot today and theres historic ‘net content stating G31 and M31 are broken on all but a few setups - needs version 022 of Mach which i cant use as my screen set fails on it - too old, there is a lot of non-probing people out there :(

A few have ditched CSLABS kit and gone UC300eth etc

A few have ditched due to poor/rude customer support

I just don’t know now, what to do, I have a probe i cant use, an unreliable setup and so on - any suggestions??

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Probing - what would i need?
« Reply #39 on: April 11, 2018, 08:44:11 AM »
Hmmm...............
KISS and basic custom probing screen page or set?
I use a separate xml and screen set for one of my probing needs since it requires the axes to jog different than conventional
and a few other reasons.
I don't know the in and outs of your system and level of automation  you desire for setup of a job, but, maybe you can un-automate it some.

I can be frustrating at times, but, in the end you will be stronger for it all.........so they say.


FWIW,
RICH