Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: tony978 on April 07, 2019, 04:32:44 PM

Title: probe error : no contact with probe
Post by: tony978 on April 07, 2019, 04:32:44 PM
I'm setting up a machine using a parallel  port for the time being and I can't get the probe to function correctly. I've flipped hi/low  settings , the z never moves and either it reads that its tripped or no contact with probe   . Debounce is set to 100. so I'm out of Ideas.
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 07, 2019, 04:43:25 PM
Hi,
does the Probe LED operate on the Machine Diagnostics tab operate when manually flicking the probe?

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 07, 2019, 05:42:42 PM
yes the probe led works and g31 . I think it might be limits of the machine , not sure if that is set correctly . mach is very new to me . I was using flachcut
Edit : soft limits and home in place not enabled   
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 07, 2019, 05:51:20 PM
Hi,
why do you think that the limits may have something to do with it?

I thin you might be trying to run before you can walk. Get the rest of the machine running and then look at probing.

Can you jog around the table?
Can you issue MDI commands and have the machine move accurately?
Do you have home switches? If you don't then you will have to 'home in place'.

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 07, 2019, 06:02:09 PM
hi Craig ,
no home switches , mdi moves / calibrated all axis's and spindle relay tested . last thing was setting up the probe .
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 07, 2019, 06:05:17 PM
Hi,
OK, without home switches how are you referencing your machine? My understanding is that if you have
no home switches assigned then effectively if you hit <Ref All Home> then all axes must 'home in place'.
Is this what actually happens?

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 07, 2019, 06:10:57 PM
yes that is what happens and just retested it . so its not  a case of mach not being homed or in disable mode .

so if it was debounce being set to low ,the led would flicker in the diag screen ?
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 07, 2019, 08:51:20 PM
Hi,

Quote
so if it was debounce being set to low ,the led would flicker in the diag screen ?

No, I don't think so. The LED on the diagnostic screen is not that fast, that is to say if the input signal
did flicker is a manner to cause Mach to record a probe strike it may be that the LED does not respond at all.
The LED is a useful diagnostic tool to see whether the probe circuit is working but not good enough to diagnose
noise problems.

Can you post the g31 code you are using to test the probe?

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 07, 2019, 09:01:43 PM
Hi
I was using g31 z-3. F5.
Along with surface zero set .
No z movement with both .
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 07, 2019, 09:10:46 PM
Hi,
have a look in API.chm in your mach4 Docs folder in the section headed 'Plugin Development'.

I copied this out of it all associated with probing.

Quote
Probing
Motion plugin probing procedure.
The probe moves are really just G01 moves in exeact stop mode with the addition of being marked as EX_PROBE in the execution_t struct from mcMotionCyclePlannerEx().

When executing a G31, the core considers the move as an exact stop move and therefore will request a motor stop report. It waits on one of two conditions:

A probe strike condition where the motion plugin calls mcMotionSetProbeComplete().
An end of move condition where the motion plugin reports the motors as being still.
Until either of these conditions are satisfied, the core will generate no more moves after the EX_PROBE marked moves. In other words, all you will get out of mcMotionCyclePlannerEx() will be EX_NONE type data. In the event of a probe strike, this makes it safe to clear the planner and be sure that future moves are not removed by accident.

A motion plugin should implement probing in the following way:

Upon seeing the first move marked as EX_PROBE, the plugin should arm position latches on the hardware.
Then consume the EX_PROBE marked moves as normal.
If the probe stikes, the plugin should:
Cancel any MSG_REPORT_MOTOR_STOP requests. (see g. VERY important!)
Report the latched positions via mcMotionSetProbePos() for each motor.
Clear the hardware of any additional moves.
Call mcMotionClearPlanner() to clear the Mach planner of any unretrieved EX_PROBE moves.
Update Mach with the hardware's current position via mcMotionSetPos().
Call mcMotionSetProbeComplete().
If a MSG_REPORT_MOTOR_STOP has been received, do not acknowledge it. mcMotionSetProbeComplete() does this for you and a position sync as well.
If no probe strike, then the move continues to it's end point as if it is a regular move.
The plugin should ack the MSG_REPORT_MOTOR_STOP messages with mcMotionSetStill().
The positions latches should be disarmed (if needed) when a MSG_PROBE_DONE is seen.
In the event that the probe move is aborted, the plugin should:
Call mcMotionClearPlanner() to clear the Mach planner of any unretrieved EX_PROBE moves.
Call mcMotorSetPos() for each controlled motor.
Call mcMotionSync.
Call mcMotionSetStill() for each controlled motor.
Probe Operation Overview.
Upon executing G31, the core will mark those moves as EX_PROBE in the data stream.
If the probe strikes before the end of the G31 move, the plugin aborts the rest of the probe moves as described above. If a probe data file has been opened via mcCntlProbeFileOpen(), then the positions recorded by the motion plugin are inserted into the probe data file in the specified format.
If the probe doesn't strike and the G31 move reaches its end point and a probe data file has been opened via mcCntlProbeFileOpen(), then the end point positions are inserted into the probe data file in the specified format.
Using the probe data file routines.
int mcCntlProbeFileOpen(MINSTANCE inst, const char *filename, const char *format);
The format argument is a printf style format with expanding macros for the axis values. AXIS_X, AXIS_Y, AXIS_Z, AXIS_A, AXIS_B, AXIS_C. It is used in the following manner:


mcCntlProbeFileOpen(inst, "myProbeFile.csv", "%.4AXIS_X, %.4AXIS_Y, %.4AXIS_Z");
This will produce a probe file in CSV format like so:



1.0000, 2.0000, -1.4356
1.0100, 2.0000, -1.4343
1.0200, 2.0000, -1.4324
...

A format of "X%.4AXIS_X, Y%.4AXIS_Y, Z%.4AXIS_Z" would yield:



X1.0000, Y2.0000, Z-1.4356
X1.0100, Y2.0000, Z-1.4343
X1.0200, Y2.0000, Z-1.4324
...

A format of "X%.4AXIS_X\tY%.4AXIS_Y\tZ%.4AXIS_Z" would yield a tab delimited file:



X1.0000 Y2.0000 Z-1.4356
X1.0100 Y2.0000 Z-1.4343
X1.0200 Y2.0000 Z-1.4324
...

int mcCntlProbeFileClose(MINSTANCE inst); Closes the probe data file.

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 12, 2019, 05:27:21 PM
Hi Craig, I'm thinking I need to go with a controller and not parallel port .
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 12, 2019, 05:31:41 PM
Hi,
Mach4 was always intended to be paired with an external controller. Having said that I am surprised that you can't get
the Darwin parallel port to probe correctly. I may miss on some of the realtime functions like THC but it does do probing.

Craig
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 12, 2019, 09:03:42 PM
Hi,
before you commit to the expense of a controller.....

A g31 move is a special example of an ordinary g1 move. For example:
g31 z-5 f100
means 'move from the current z location to z=-5mm at a rate of 100 mm/min. It moves as if it were a g1 move.
Where it differs is that if the motion device detects a probe event while the move is in progress the machine stops,
aborts (clears) the remainder of the motion buffer and reports its X,Y,Z coordinates to Mach.

Firstly note that the Z axis coordinate is in 'work coordinates' not 'machine coordinates'. Lets say for example that the
current work coordinate is -10mm. When Mach encounters the g31 command above it will move upwards form its current
z=-10mm to z=-5mm and it wont encounter a probe event while doing so.

The point being that if the work coordinate system is out of kilter with the work surface (or touch off surface) unexpected
results can occur. Given that you don't have home switches it would be easy to have the work coordinates out of kiliter
along the lines I have suggested or some other combination that produces unexpected and failing results.

May I suggest homing your machine as normal. Jog to the touch off plate and lower until your probe is just or nearly
touching the plate. Then zero the work coordinates using the DRO buttons. Jog the machine upwards a mm or two.
Now try an MDI of:
g31 z-10 f100 (metric)
g31 z-.5 f4    (inch....bloody queer Yankees)
and see what happens.

Craig
Title: Re: probe error : no contact with probe
Post by: reuelt on April 12, 2019, 09:34:12 PM
I'm thinking I need to go with a controller and not parallel port .
An external motion controller still need to talk to parallel port type Break Out Board(S). So if the problem is the B.O.B. settings, buying an external motion controller will still have the same problem.
Do check the B.O.B. settings and power supply. Some B.O.B. have OPTO-ISOLATION for their input pins and so will need a separate 12-24V POWER supply and you may need 2 wires for the probe since the optically isolated input sometimes is often not be connected to the machine body earth.
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 12, 2019, 09:55:00 PM
Hi,
OP has previously established (reply #2) that the probe LED operates as expected ie the BoB is correctly signaling
Mach.

Craig
Title: Re: probe error : no contact with probe
Post by: reuelt on April 12, 2019, 11:37:02 PM
Hi,
OP has previously established (reply #2) that the probe LED operates as expected ie the BoB is correctly signaling
Mach.

Craig
Sorry, my bad.
Thanks.
But some BOBs have only one or 2 fast pins (with fast opto-isolation chips) for probes. The rest of the inputs have SLOWWW opto chips.

ALSO the pin could be inverted ie. already active (normally CLOSED) just like limit switches. May need to try inverting the pin for probes - to normally OPEN.
Title: Re: probe error : no contact with probe
Post by: tony978 on April 13, 2019, 07:54:39 AM
It has been tested  with the pins inverted , so I'm thinking ess rather than port with a Bob .
I had issues with linuxcnc , the probing that was programmed to the motion control worked but g31 was an issue . That is leading me to believe it maybe an issue with Bob.  Correct me if I'm wrong!
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 13, 2019, 07:58:39 AM
Hi,
did it work when you MDI'd a g31?

Craig
Title: Re: probe error : no contact with probe
Post by: reuelt on April 13, 2019, 08:21:47 AM
It has been tested  with the pins inverted , so I'm thinking ess rather than port with a Bob .
I had issues with linuxcnc , the probing that was programmed to the motion control worked but g31 was an issue . That is leading me to believe it maybe an issue with Bob.  Correct me if I'm wrong!
if you follow this thread
https://www.machsupport.com/forum/index.php?topic=34520.0
you will notice that ESS had probing problems too. Then someone wrote a custom LUA script to get his G31.1 going.
So the problem is MACH4's default G31 script may have a bug that requires a workaround.
Perhaps you could contact NFS technical support directly as they are supposed to be still supporting MACH4 customers via email.
Title: Re: probe error : no contact with probe
Post by: tony978 on April 13, 2019, 10:12:37 AM
It has been tested  with the pins inverted , so I'm thinking ess rather than port with a Bob .
I had issues with linuxcnc , the probing that was programmed to the motion control worked but g31 was an issue . That is leading me to believe it maybe an issue with Bob.  Correct me if I'm wrong!
if you follow this thread
https://www.machsupport.com/forum/index.php?topic=34520.0
you will notice that ESS had probing problems too. Then someone wrote a custom LUA script to get his G31.1 going.
So the problem is MACH4's default G31 script may have a bug that requires a workaround.
Perhaps you could contact NFS technical support directly as they are supposed to be still supporting MACH4 customers via email.

Thank you ! I figured that what ever issue was on the ess side and not mach4 . I will contact them .
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 13, 2019, 10:32:44 AM
Hi,
now I am confused, at the start of the thread you said you are using a parallel port and now you are talking ESS.

What motion controller are you using?
Have you tried the manual procedure I have suggested?

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 13, 2019, 10:44:39 AM
Hi,
now I am confused, at the start of the thread you said you are using a parallel port and now you are talking ESS.

What motion controller are you using?
Have you tried the manual procedure I have suggested?

Craig
I'm using a parallel port.  The talk was about switching to an ess and not running into this issue . Plus other benefits of running a ess
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 13, 2019, 11:41:18 AM
Hi,
OK, how about manually probing by MDI of a g31, have you tried that?

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 13, 2019, 12:26:40 PM
Yes same results!
Title: Re: probe error : no contact with probe
Post by: joeaverage on April 13, 2019, 05:21:35 PM
Hi,
OK, I'm at a loss as to why it does not work.

I have an ESS and I've had no problems with probing. I would not hesitate to recommend it.

I am still bemused as to why the Darwin parallel port wont work, it should, if it didn't there would be any amount
of posts about it. My concern is that if you buy an ESS and the problem persists.

As you know Mach4 has up to four independent probe channels, g31.1, g31.2, g31.3 and g31.4.
Normally I use only one probe channel and can successfully code it g31 without the trailing period and channel number.
Would you try coding your MDI g31.1 z.......

Clutching at straws I know....

Craig
Title: Re: probe error : no contact with probe
Post by: tony978 on April 13, 2019, 05:29:03 PM
I will give that a try when I get in tonight. I blame windows . One thing that drives me nuts . Is when mach is running spindle is off and as soon as I exit it the spindle kicks on .
Title: Re: probe error : no contact with probe
Post by: tony978 on April 14, 2019, 11:51:49 AM
So problem is the same using g31.x
I'm going to change the version of windows I'm using . Currently its vista  and will be pushed to 7 . I'm hoping that helps