Work with probe

More
08 Jul 2023 22:09 #275051 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
I'm creating a document that describes the exact process to reach the point where the probe goes down to set the current workspace Z==0.000 location.
From the .ini file where the tab is linked in.

# begin Touch Probe
EMBED_TAB_NAME=PSNG
EMBED_TAB_COMMAND=gladevcp -c probe -x {XID} -u psng/python -H psng/psng.hal psng/psng.glade
# end Touch Probe

Into the psng.glade control panel where we see the icon for send probe down
<property name="pixbuf">icons/down.png</property>

And how that links into the various Python and then G-Code files to set 0.

From what I can see, but I could be wrong, his tool sensor is meant to be placed on what ever has been set to zero. So I think if you want to measure tools and have the values put into the tool table you need to first touch the milling machine table that the tool setter is sitting on. Then the table_to_spindle - tool_setter_height can be correctly used to determine the length of the tool.
If the G54.Z is at some arbitrary value the calculated value is incorrect.
But I might be wrong there too. Just can't get repeatable results with a simple step by step sequence so I think I'm still missing one step.

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

More
08 Jul 2023 22:12 #275052 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Hi John,
It does. At the moment it's setting the tool lengths that has me perplexed as I said in the other posting.

I'll get there.

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

More
08 Jul 2023 23:50 #275054 by JohnnyCNC
Replied by JohnnyCNC on topic Work with probe

Hi John,
It does. At the moment it's setting the tool lengths that has me perplexed as I said in the other posting.

I'll get there.
 

For that I first measure the tool-setter trip point by placing the nose of the spindle just above the toolsetter.  Then run measure_toolsetter_inch.ngc.  This will switch to G59.3, probe the tool-setter and set that position in G59.3 to zero.  The when the M6 Remap code is called, if the tool length in the tool table is zero the tool will be measured by probing the tool-setter with the tool.  The current Z coordinate is then set with the length just measured and the value stored in #4001 (if using G54).
Ig using G54 then coordinate_system = 1, G55 = 2, etc.  With this system you can use 1-8 because I stole G59.3 (9) to hold the tool-setter trip point.
G10 L2 P#<coordinate_system> Z[#[4000+#<coordinate_system>]+#5063]
I had to read the documentation a bunch of times to get through this.
Something that helped me a lot.  Start LinuxCNC from the command line and you will see output of those print statements.  BUT, keep in mind that those PRINT statements will output twice.  Once when the file is first read and again when the code is executed.  During the first pass when the file is just being read that output value will be useless.  That behavior really threw me off track when I first started this.
 

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

More
09 Jul 2023 00:02 - 09 Jul 2023 00:44 #275055 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Thanks. I'll try it like that. Hadn't thought of using the G59.3 as the tool setter trip point.

Edit: And I have to figure out where to call the probe_z_minus_wco.ngc. 
Last edit: 09 Jul 2023 00:44 by jcdammeyer.

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

More
09 Jul 2023 13:25 #275073 by JohnnyCNC
Replied by JohnnyCNC on topic Work with probe
Which UI are you using? I think you just need to find what code is being executed when the probe Z button is pressed and that add code to save the value to #4001. That is where I'm running into the problem with QTDragon_HD. In QTDragon is calling probe_z_minus_wco but in QTDragon_HD it is calling Python code. I haven't figured out how to save the value to #4001 from within Python code yet.

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

More
09 Jul 2023 16:17 - 10 Jul 2023 16:35 #275081 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
I'm running AXIS.  Of interest is the Down Button   
The flow is as follows:
Iniide my_mill.ini is the gladevcp program runing psng.glade which is the tab with the buttons and information display.
# begin Touch Probe
EMBED_TAB_NAME=PSNG
EMBED_TAB_COMMAND=gladevcp -c probe -x {XID} -u psng/python -H psng/psng.hal psng/psng.glade
# end Touch Probe
When the down button is clicked the object
 <object class="GtkButton" id="btn_probe_table">
has a signal
<signal name="released" handler="on_btn_probe_table_released" swapped="no"/>
The program called  when the down button is activated is tool_measurement.py which has this object and the signal. 

    # Down probe to table for measuring it and use for calculate tool setter height and can set G10 L20 Z0 if you tick auto zero
    @ProbeScreenBase.ensure_errors_dismissed
    def on_btn_probe_table_released(self, gtkbutton, data=None):
        # Start psng_probe_table.ngc
        if self.ocode("o<psng_probe_table> call") == -1:
            return
        a = self.probed_position_with_offsets()
        self.add_history(gtkbutton.get_tooltip_text(), "Z", z=a[2])
        self.set_zerro("Z", 0, 0, a[2])

From there the first of a few g-code programs are called the first being
        psng_probe_table.ngc

This calls
      _psng_probe_z.ngc with max distance to probe.  When it returns without error I suspect here the line could be inserted after setting up the other parameters.
  
  #[4000 + [#5220]] = [#<z_minus_probed> + #<workspace_z> - #<_ini[PROBE]LENGTH>]   (Added by JHK)

In turn  _psng_probe_z.ngc calls _psng_probe.ngc with the Z axis [3]  specified and _psng_probe.ngc is then the generic touch and retouch code doing the final

O22 else if [#<search_axis> EQ 3]
    ; Z Axis
    G38.3 Z[#<_hal[probe.ps_probe_latch]>*2*#<search_direction>]
O22 endif

So the write to 4000+ could be done there instead.

John
    



 
Attachments:
Last edit: 10 Jul 2023 16:35 by jcdammeyer. Reason: Add bold,italics to key file or object names, Fix which file name is called.

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

More
10 Jul 2023 01:17 #275110 by JohnnyCNC
Replied by JohnnyCNC on topic Work with probe
Well, I've made some progress. I am able to update #400x from within Python but I also noticed a latency excursion. I think I'll need to commit to my new hardware before I can finish this upgrade to LCNC 2.9 running on Bookworm.

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

More
10 Jul 2023 01:26 #275113 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
What was the code to update #400x from within python and where did you do that?

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

More
10 Jul 2023 03:16 #275121 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
I'm afraid I'm going to have to suspend work on this project for a few months.I ran the probe_z_minus_wco.ngc and although I don't know why, this is what happened.   


Not repairable.  Ordered a new one.
 
Attachments:

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

More
10 Jul 2023 19:10 #275151 by spumco
Replied by spumco on topic Work with probe
ouch...I feel your pain.

I programmed a tool touch-off at 500ipm recently with similar results.

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

Time to create page: 0.515 seconds
Powered by Kunena Forum