Work with probe

More
4 years 11 months ago #226234 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
The standard AXIS screen
Code:
[DISPLAY] DISPLAY = axis

And used git to pull probe-screen-ng-master (Probe Screen for LinuxCNC 2.8)  on both the Pi4 which I use to have LinuxCNC on my lab bench for playing with stuff and on the PC based one connected to the Mill.

Once I figured out how to hide the panel the entire screen fit and other than annoying to flip it on and off.  Would be nice if when the probe screen gets the focus that it automatically hides any panels.

I've also been reading through the Python code.  Although like most Python code it's poorly documented where for the most part the the 'what' is fairly clear the 'why' is often obscure.    It does read the .INI file to determine the units for the jog buttons.  I'm sure there's probably a way to read the G20 or G21 state but I don't know how to do that. 
 

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago - 4 years 11 months ago #226337 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Mokuleia,
I managed to get the TS working on that screen.

    You said I get a

    #<_ini[axis_2]max_limit> not define" error. I attach my .ini and .hal.

    In my tool setter G-Code file to move to the tool change position a number of things happen.
    
Code:
    ; Ensure we're in G90 / absolute mode     G90     ; First go up & then move to tool sensor position     G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>+#<_ini[PROBE_SCREEN]Z_SAFE_TRAVEL_OFFSET>]     G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]     G53 G0 Z[#<_ini[TOOLSENSOR]Z>]    

    Notice the syntax of say the last line.
    The G53 says use absolute machine coordinates.
    The G0 says go at full speed.
    The Z argument to the G0 is the axis to move.
    the #<_ini part says use the INI file for your machine
    the [TOOLSENSOR] is the group (in a programming language would be called the record or object)
    the Z is the value held in that field
    and the >] finish off the statement.

    In your ini file you have
    
Code:
    [TOOLSENSOR]     # Absolute coordinates of the toolsetter pad     X = 10     Y = 10     # Absolute Z start search coordinates     Z = 60     # Maximum search distance and direction (sign)     
    So your Z value is 60.
    That means then that the last line of that positioning command is really
    G53 G0 Z60
    In my case if was
    G53 G0 Z2
    Remember these are absolute machine coordinates and my machine goes from 0.0 to -10.5 so when my TS command tried to go to +2.0 if failed with an out of range error.  Therefore one thing you have to check is if the G53 G0 Z60 is even a valid move.

    The other issue which causes your error message is that there is no [AXIS_2] group in your ini file.
    you have [AXIS_Z] and [JOINT_2] record groups but no AXIS_2.
    So check the macro file that is run when you click on TS and if it's using AXIS_2 for the Z axis change that to AXIS_Z.
   
Last edit: 4 years 11 months ago by jcdammeyer. Reason: Spelling mistake

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #226624 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
I have a problem.  Trying to use the Probe ICON for Outside Length X.  Starting in the middle between the two X edges it moves properly in the -X direction and finds the LH edge.  Then it moves away, moves up, moves over to be above the LH edge.  Then heads over in the +X direction to the RH edge.

Running that fragment of code interactively, setting the halcomp variables to the same ones in the probe screen and then displaying the line,  creates the G-Code line below.
Code:
                # move X + 2 * edge_length +  xy_clearance         tmpx = 2 * self.halcomp["ps_edge_length"] + self.halcomp["ps_xy_clearance"]         s = """G91         G1 X%f         G90""" % (             tmpx         )         if self.gcode(s) == -1:             return >>> ps_edge_length = 2.1 >>> ps_xy_clearance = 0.2 >>> tmpx = 2 * ps_edge_length + ps_xy_clearance >>> tmpx 4.7 >>> s = """G91 G1 X%f G90""" % (     tmpx ) >>> s 'G91\nG1 X4.400000\nG90' >>>

The same string is shown if I start LinuxCNC from terminal and embed a print statement to show the string 's'

I execute in the MDI screen those three lines from the X=0 LH edge position:
Code:
G91 G1 X4.4 G90

With the probe starting over the left end of the edge of the vise jaw and I zero the Shumatech DRO X axis  when I run the above code one line at a time in the MDI the DRO shows 4.4000 at the end of the movement as expected (as does the LCNC DRO).

But if I move the probe to X=2.0 and then click the probe button to find the exact midpoint it moves to the LHS as expected, finds the left edge.  Moves away, moves up, moves over to the X=0 position it determined was the edge, pauses for a fraction of a second and then heads over to the RHS to find the RH edge.  

However it stops at 3.523, sends the Z down to prep for moving back to the left to find the RH edge.  But instead touches the vise at that spot and faults.  And leaves the system in G91 so it doesn’t clean house well.

No idea why.  It's repeatable.

Any ideas how to even debug this since the string 's' argument to self.gcodes(s) works in MDI mode.

John
 

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #226634 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Update on this. I tried the center of a circle with a large 4" OD ring. ID was 3.6" or so and center was found without issues. OD with Edge Length set to 2.1 failed just like the single center on X axis.

So I clamped a 2" disk into the vise. No problem finding the center on the disk with the Edge Length set to 0.95. The inner hole was 0.375" and also no problem finding the center.

It appears that if the Edge Length is larger than 'n' then the system stops. The fact that motion of the same sort of is possible with
G91
G1 Xn.nnn
G90
where n.nnn can be 2.1" suggests that something inside the probe library has a physical hard coded limit. But so far I haven't found it.

John

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #226638 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Solution to the 2.1" issue.
The problem is that the distance to move has to be 2x 2.1"+0.2". There doesn't seem to be any definition that disallows a 4.4" motion.

But, inside the INI file is
# Maximum search distance and direction (sign)
MAXPROBE = -2.0

Change that to be larger than the ps_edge_length and now both circular and linear X length works.

The fault really lies here:
Code:
def on_spbtn1_edge_length_value_changed(self, gtkspinbutton, data=None): self.on_common_spbtn_value_changed("ps_edge_length", gtkspinbutton, data)

Range checking should be done when the data is entered, not when it's used unless it can be modified indirectly somewhere else.

Also the ps_edge length is the max distance to move so why doe sit work for the first distance which is larger than MAXPROBE but not for the other side which is more than 2x MAXPROBE.

This is very screwy.

John

 

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #227272 by tuzki
Replied by tuzki on topic Work with probe
Hi
Some problems occurred during my use.
I want "probe_screen_v2" to work in "gmoccapy GUI", I followed the guide, but did not succeed. I used the same operation in "Axis GUI" but succeeded, I don't know why.

I use a parallel port board to control my machine. I use the P11 pin to receive the probe signal, but I don't know how to set up my ".hal" file.
I am a newbie, can anyone help me, thank you very much.

Please Log in or Create an account to join the conversation.

Time to create page: 0.104 seconds
Powered by Kunena Forum