Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: fxMach3 on June 11, 2018, 11:26:23 AM

Title: CSMIO / IP Probing fails
Post by: fxMach3 on June 11, 2018, 11:26:23 AM
Hi all,
I just converted a shopbot CNC to MACH3. I am on the latest MACH3 version and running a CSMIO /IP as IO/Module.
So far everything works pretty well, except one issue, I am not able to solve.

I have a probe setup. It is active High (Just a simple touch plate which shortcuts via the tool). I have set up the Input for the probe in Input Pins. If I short the probe, I can see the diagnostic LED in the diag screen correctly. So far so good.
Now I added a button with a script to start touching off.

After some calculations of current Z, touch plate thickness and so on I get to move the Z-Axis:
Here is the simplified code:

Code "G1Z-20" (In reality this is a bit more sophisticated but to keep things simple...)
While IsMoving()
Wend

The issue I am having, is that Z is ALWAYS moving to -20, no matter if the probe becomes active or not. I can see in the diag screen that the probe becomes active while Z IsMoving, but the While/Wend loop is never interrupted.

Am I missing something ?

I read somewhere that this might be an issue when using the CSMIO.
There is a setting in the CSMIO plugin saying probe protection....no clue what this does

Appreciate any help :-)
Thanks guys !!!
Title: Re: CSMIO / IP Probing fails
Post by: Davek0974 on June 11, 2018, 01:22:21 PM
You must use something like

G31 Z-20 F100 instead

G31 is a probing move - this turns on the probe input.

Z-20 tells it to move Z negatively 20 units before stopping, if no probe contact then an error is returned.

F100 is the travel speed
Title: Re: CSMIO / IP Probing fails
Post by: fxMach3 on June 11, 2018, 01:30:19 PM
Just an idea: Does the interrupting of the probe work in a button script at all ? Or does it only work in a macro ? Unfortunately I am not at the machine at the moment....but maybe someone knows ?
Title: Re: CSMIO / IP Probing fails
Post by: fxMach3 on June 11, 2018, 01:32:14 PM
OK, thanks a lot...will try G31 (sounds like it makes sense) next time I am at the machine and also try macro. Will post results ;)
Title: Re: CSMIO / IP Probing fails
Post by: Davek0974 on June 11, 2018, 02:45:13 PM
It works anywhere you can call a G31, there is also G28.1 IIRC - do a google on these two commands
Title: Re: CSMIO / IP Probing fails
Post by: fxMach3 on June 12, 2018, 05:44:16 AM
Hi,
that's not gonna work either.

If let say my Z-axis is at Z = 2
The touch plate is supposed to be around Z=0

From Z=2 I do a "G1 G31 Z-4"
Z goes down. Once probe is activated (simulated via keyboard but also with probe, for god sake not on the router)
Z does not stop at touch
But Z also does not stop at Z-4 .... it goes on and goes and goes until I hit Reset
If I leave away G31 it goes to Z-4, but does not interupt the while Ismoving loop

Tried the same without the G1, so just "G31 Z-4" same thing....

Any more thoughts ?

Title: Re: CSMIO / IP Probing fails
Post by: Davek0974 on June 12, 2018, 05:59:24 AM
Ok so Z is at 2 and the surface of the material is somewhere lower i.e more negative so -3, -4 etc.

To test this out, do not use a tool etc, just verify first that when you ground the touch plate the PROBE led lights up, before that though make sure you have the PROBE input set correctly in ports and pins, probably is though.

Now, presuming you are in inches....

Enter in MDI

G28.1 Z-4 F100 and press enter

The Z axis should start moving slowly downwards -does it??

If yes then it should stop as soon as you ground the touch plate i.e. make it think it has found the tool.

No tools are needed, its safe and easy this way :)

report back ;)
Title: Re: CSMIO / IP Probing fails
Post by: fxMach3 on June 12, 2018, 06:57:30 AM
https://en.cs-lab.eu/technical-support/download/addons-macros/m31-as-an-alternative-to-g31/

found this one a minute ago. It passes all the probing work to the Motion Controller. Will give it a try tomorrow.
Title: Re: CSMIO / IP Probing fails
Post by: fxMach3 on June 12, 2018, 07:06:02 AM
Tried quite the same as what you said before :-)

Z is at 2. The surface top is between Z 0 and Z-2. As I can only estimate before probing, I do a G31 Z -4 to make sure the probe goes down far enough, but stops latest at Z-4.

Once I start the G31 Z -4 the Z axis will not stop in any case....activating the probe pin (I can see it turning on in diag) does not stop it AND even beyond Z-4 it moves on and on. I am on metric btw. I let it go until z-50 and then stopped by RESET.
Title: Re: CSMIO / IP Probing fails
Post by: TPS on June 12, 2018, 07:34:17 AM
you have to have a real Hardware Input on the Controller, Simulation via keyboard will and can not work,
because the probing is running on the Controller.
Title: Re: CSMIO / IP Probing fails
Post by: Davek0974 on June 12, 2018, 07:35:13 AM
Ah, i only guessed you were inches by the small numbers Z-2 etc, you will need those made up to something like Z-100 or so.

Anyway, if the motion does NOT stop regardless of probe then there is a configuration issue somewhere.

I have had NO luck in reproducing a probe input using the keyboard etc, never could get that to work.

I would NOT bother with the CS_LABS M31 code yet - its more complex and harder to debug, it will NOT work unless you can get the motion to stop when the plate is grounded - that is rule No1 to fix. The code DOES work though as i use it all the time.

Title: Re: CSMIO / IP Probing fails
Post by: ger21 on June 12, 2018, 08:23:07 AM
you have to have a real Hardware Input on the Controller, Simulation via keyboard will and can not work,
because the probing is running on the Controller.

Emulation does work with the parallel port, but most, if not all, motion controllers do not support keyboard emulation of inputs.
Title: Re: CSMIO / IP Probing fails
Post by: fxMach3 on June 12, 2018, 10:34:28 AM
Thanks guys, will give it a try tomorrow. But anyway....why is G31 Z-4 moving way further than -4 ?
Title: Re: CSMIO / IP Probing fails
Post by: Davek0974 on June 12, 2018, 10:36:48 AM
If you are metric then -4 might not even be enough to make it work?

try -100

but use the actual touch-plate not a key or mouse :)
Title: Re: CSMIO / IP Probing fails
Post by: Davek0974 on June 12, 2018, 01:01:35 PM
Just a correction, i gave some misinformation earlier.

Do NOT use G28.1 - it will NOT work in your case, G28.1 is a homing/ref move and uses a normal input NOT the probe input.

Stick with G31 as that is the proper one and uses the probe/digitise input.

Title: Re: CSMIO / IP Probing fails
Post by: fxMach3 on June 13, 2018, 12:28:12 PM
I was at the machine and gave G31 a try.
Z axis stops either on touch or latest after the given Z value with: G1 G31 Z-4.
With G31 Z-4 it stops at touch, but overrides Z-4 in this case.
It does not stop at all with G1 Z-4.

Just want to mention the last case, as in many examples from the net it is described such.(Maybe works with parallel port I/O, but I guess most will use Win7 or 10)

Thanks a lot for you help guys !!!! :)