Hello Guest it is March 28, 2024, 12:56:38 PM

Author Topic: G31 again: Logged data is ... wrong!  (Read 3778 times)

0 Members and 1 Guest are viewing this topic.

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
G31 again: Logged data is ... wrong!
« on: September 17, 2013, 04:48:37 AM »
Hi all

Yep, g31 again. I am trying to use a Z axis touch probe to level up some machining jigs.
Dedicated WXP, R3.043.022, ESS
The touch probe has a resolution of about 10 microns. It gets sensed quite happily by the ESS diagnostics and the Mach diagnostics. In fact, I can run the following program quite happily and create a data file as expected.

m1   (Go when ready)
f10
m40                    % open log file
g0 z0
m98 p10 L5         % probe 5 times
m41                    % close log file
g0 z20
m30
%------------
o10
g4 p0.2               % redundant delay
g31 z-2                % probe downwards
g4 p0.2
g0 z0
m99

The program runs, the touch probe creeps down and touches/stops at about -1.2 mm, the Z axis retreats to 0, and the whole thing repeats. A log file is created. So far, so good.

The PROBLEM: the data recorded is the position at Z=0 in machine coordinates! All 5 entries too.
Well, most of the time. A few times the file has contained actual program coordinates for the trigger point.
I have checked #2000-2 and they usually do contain the machine coords as listed in the data file.

Has anyone met this one???

This is all with Probe on 2/15, Active Low, which fits with the diagnostic screens. Interestingly, if I flip the active state to Hi, the subroutine does not even execute. It would seem that m40 or opendigfile() may do a sanity check on the state of the probe input, and abort if it is asserted.

Cheers
Roger

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G31 again: Logged data is ... wrong!
« Reply #1 on: September 17, 2013, 12:03:13 PM »
Mach3 using the LPT driver.

The G31 does NOT record in machine coords it uses the Current Work coord base to write values to the file.  NOW if the works coords are the same as the machine coords you would see what appears to be machine coords.

NOW HOW the ESS does things is another matter but you would need to check with Greg about that part. But if it is NOT writing either the trip point value OR the endpoint value it is a problem with the ESS plugin or hardware firmware.  Maybe you can talk Greg into NOT writing the ENDPOINT but an error code instead. At least then you can see and remove errors in the points file.

I personally have probed many many thousands of probe points writing them to file with the M40 and have not seen a problem OTHER than it writing the end point values to the file IF it does not trip. THAT totally corrupts the points file but only in the sense that  SOME values are incorrect and there is NO way to detect that as it does NOT create an error code as it goes .


(;-) TP
« Last Edit: September 17, 2013, 12:06:39 PM by BR549 »

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: G31 again: Logged data is ... wrong!
« Reply #2 on: September 17, 2013, 05:07:45 PM »
Hi Terry

Quote
The G31 does NOT record in machine coords it uses the Current Work coord base to write values to the file.  NOW if the works coords are the same as the machine coords you would see what appears to be machine coords.
Assuming the Current Work Coords are the program coords displayed on the DROs, then there is a big numerical difference between the two in my case. But sometimes, just sometimes, the displayed program coords are what is saved!
So I think the ESS is working fine. I think.

Cheers
Roger

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G31 again: Logged data is ... wrong!
« Reply #3 on: September 17, 2013, 05:34:58 PM »
ALL I can say is the LPT version does not do that. It is ROCK solid and does what I mentioned ONLY. I have never seen it deviate from that.

SO all that leaves is the ESS (;-) AS a plugin hardware device it HAS to control all the functions that the LPT driver DID. Now is it doing it correctly ????

Good Question, May want to give Greg a buzz and ask.

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G31 again: Logged data is ... wrong!
« Reply #4 on: September 17, 2013, 05:42:43 PM »
OK JUST TO BE SURE, I retested  AND

It records the Work Coords for sure with the LPT driver running.

(;-) TP

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: G31 again: Logged data is ... wrong!
« Reply #5 on: September 17, 2013, 06:54:48 PM »
Hi Terry

Not sure myself. Sometimes it did record the Work Coords (ie from the DRO). That seems like a config problem inside Mach to me, or maybe I had stuffed up some Mach work coord setting somehow.
I will spend some time on this today.
Odd
Cheers
Roger