Work with probe

More
3 years 3 months ago #275188 by phillc54
Replied by phillc54 on topic Work with probe
This line is referencing analog-in pin 7, there are only 4 analog pins by default (0~3).
Code:
  M68 E7 Q[#<z_minus_probed_position>]
That can be changed when loading the motion module as the error message indicates:
Code:
(increase num_aio/EMCMOT_MAX_AIO=64)
linuxcnc.org/docs/devel/html/man/man9/motion.9.html

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

More
3 years 3 months ago #275189 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
I don't use the analog-in pin. I'm not sure I even need that. I'll check the link you posted and see why it's there.

Thank you for your reply.
John

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

More
3 years 3 months ago #275239 by JohnnyCNC
Replied by JohnnyCNC on topic Work with probe

None of the folders for my AXIS linuxCNC has probe_routines.py.
Keep in mind I found that file on my LinuxCNC 2.9 with QTDragon_HD on Debian 12 (Bookworm) machine that I am in the process of migrating to.  I believe that the probe code is from basicprobe.  I never went looking for that file on my current LinuxCNC 2.8.4 QTDragon machine which is the one where the probe_z_minus_wco.ngc came from.

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

More
3 years 3 months ago #275240 by JohnnyCNC
Replied by JohnnyCNC on topic Work with probe

This line is referencing analog-in pin 7, there are only 4 analog pins by default (0~3).
Code:
  M68 E7 Q[#<z_minus_probed_position>] That can be changed when loading the motion module as the error message indicates: [code](increase num_aio/EMCMOT_MAX_AIO=64) http://linuxcnc.org/docs/devel/html/man/man9/motion.9.html
[/code]
Ooh, that error sounds familiar.  I think I faced that years ago and did what was described above.

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

More
3 years 3 months ago - 3 years 3 months ago #275243 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Alright!  Found one of the problems.  The one that destroyed my probe and also snapped apart one of the micro-switches in my intermediate probe after I thought I'd fixed the issue.

The issue lies in the psng_probe_table.ngc and surfaced when I started using the probe_z_minus_wco.ngc.  I added diagnostics in the form of (PRINT, ) statements.

Here's a piece of it.
Code:
o<psng_probe_table> sub ; BEGIN PSNG PREAMBLE M73 ; Save and autorestore model states. This will be used only in case of error, otherwise we will invalidate it. o<_psng_modal_save> call o<_psng_hook> call [3] ; END PSNG PREAMBLE ; Save current Z position #<z>=#<_z> ; Ensure we're in G90 / absolute mode G90 ; Probe Table o<_psng_probe_z> call [-#<_hal[probe.ps_probe_max]>]


Notice the save current Z position.  This is the sort of documentation that is so typical in a lot of software.   I can see they are saving the Z position.  Not why.  It's like a Pascal Statement like Pi := 3.14;  And the comment reads Assigning PI into the variable Pi.  Duh!

Now once the probing is complete which called _psng_probe_z.ngc  which in turn called probe_z_minus_wco.ngc where the #4000 new G54 (or whatever co-ordinate system was active) was updated since we now have a new zero position.

Come back to psng_probe_table.ngc and here's the fault.  I added a test and message to prevent future switch damage.
Code:
; Move off the Table (PRINT, Move off Table: <z> is #<z> O2 if [#<z> GT 0.000]   G0 Z#<z> O2 else   (PRINT, <z> is negative, would move into probe) O2 endif

So why is it happening?
Well when the <z> value is saved it may well be say -2.0
While probing the knee moves up slowly, switch opens and then knee moves down again until switch closes again.  Now the G38.2 is done and it's moved down just far enough for that clearance parameter.

The probe touched the top of the 1-2-3 block and that becomes our new 0.0000 since G54.Z has now been changed.  The probe is above the work by the #<z_clearance>]

And then for some undocumented reason the code, at full G0 speed heads to that saved <z> location in the psng_probe_table.ngc G-Code.
A negative move, by convention is towards the tool.  So our tool (the probe) is still 0.2" above the test point and then the knee is told to move to -2.0 at full 150 IPM.  

After crushing the tool and switch assembly pressing hard now against whatever was probed (1-2-3 block on table) the servo drive faults with a following error since it's telling the motor to go to -2.0 but the knee can't go any higher since the probe can't crush any thinner.

 
Last edit: 3 years 3 months ago by jcdammeyer.
The following user(s) said Thank You: Clive S

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

More
3 years 3 months ago #275296 by jcdammeyer
Replied by jcdammeyer on topic Work with probe
So I added num_aio=8 and un-commented M68 E7 Q[#<z_minus_probed_position>]
The error is gone but I don't see any difference in program operation. so I'm not sure where the psng probe software is using that.

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

Time to create page: 0.207 seconds
Powered by Kunena Forum