QtPlasmaC pierce height would exceed Z axis maximum limit

More
20 Aug 2022 20:36 - 22 Aug 2022 15:05 #250125 by somuchforfree
Hello everyone,

maybe some of you will remember my questions about using a THCAD-10 with a Stamos S-PLASMA 125. Got the THCAD up and running now thanks to your advice and a bit of head scratching at different forum posts till I figured out the correct position of the jumpers for the encoder and trial-n-error'd (only 2 iterations! yay) my way to a THC scale that looks alright.

Now I have QtPlasmaC set up but no amount of head scratching has helped in finding a solution to my current problem.
I probe down from my G53 home (0) to about -162 where my float switch triggers. The min limit of the Z axis is set at -180 (so I don't hit my slats); the joint min limit is at -180 too but could be set as low as -292 (full travel of the joint). Both axis and joint max limit is 0.01. Float travel 2.5, probe speed 100, probe height 100, safe height 40, setup speed 1000 (extremely slow but I'll tune it once I- err, we get it working).

When I hit the probe test button, Z goes down with setup speed, doesn't slow down (it should slow down from 100 above the min Z so G53 -80?) until it hits the float, gives me "pierce height would exceed Z axis maximum limit" and retracts to 0 again. Pierce height for the default material (which I've saved and reloaded) is 3 so it should pierce at -162 + 3 = -159 which apparently exceeds Z axis maximum limit (which is 0.01). What's wrong with my setup? Or could it be that LinuxCNC/QtPlasmaC can't handle my slats at G53 -180?

I've attached the configuration. 

File Attachment:

File Name: qtplasmac_...4.tar.gz
File Size:12 KB




Apart from those issues, QtPlasmaC looks like a great project so far. I'd like to offer my help in beta testing/development once I have a running setup.

Thank you for your time.
Attachments:
Last edit: 22 Aug 2022 15:05 by somuchforfree. Reason: wording

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

More
21 Aug 2022 05:06 - 22 Aug 2022 01:45 #250141 by phillc54
I made a sim from your config to test what is happening.

The speeds you have set are so slow that the probe test times out well before any material would be detected. With a setup speed of 4000 and a probe speed of 400 I see the correct behaviour in probing.

There are a couple of other issues though.
 [AXIS_X]MIN_LIMIT & MAX_LIMIT need to be the same as what is in [JOINT_0]
 [AXIS_Y]MIN_LIMIT & MAX_LIMIT need to be the same as what is in [JOINT_1] & [JOINT_1]

There is an issue with probe testing and Skip IHS where the first probe test works but subsequent ones won't work. You can either set Skip IHS to zero or Power the GUI off then on again between probe test. This issue should not affect anything else. I will fix it ASAP.
Edit: this issue is fixed.


 
Last edit: 22 Aug 2022 01:45 by phillc54.
The following user(s) said Thank You: somuchforfree

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

More
23 Aug 2022 20:44 - 23 Aug 2022 20:48 #250281 by somuchforfree
Thank you for your suggestions.

I've fixed the MIN_/MAX_LIMITs so they're consistent and set Skip IHS to zero, probe speed to 400, setup speed to 4000, torch just 10 mm above the material before doing the probe test so it would definitely not time out before hitting the material but it still doesn't work.

I've tried to run a conversational program but it would of course fail the initial probe and stop.
G21 G64P0.25 G40 G49 G80 G90 G92.1 G94 G97 (preamble)

(conversational line/arc)
;using material #0: DEFAULT
M190 P0
M66 P3 L3 Q1
f#<_hal[plasmac.cut-feed-rate]>
g0 x0.000000 y0.000000
m3 $0 s1
g1 x100.000000 y0.000000
M5 $0

G21 G64P0.25 G40 G49 G80 G90 G92.1 G94 G97 (postamble)
m2


is filtered to

g21g64p0.25g40g49g80g90g92.1g94g97 (preamble)

(conversational line/arc)
;using material #0: DEFAULT
m190p0
m66p3l3q1
f#<_hal[plasmac.cut-feed-rate]>
g53g0z[#<_ini[axis_z]max_limit>*1-5.000] (Z just below max height)
g0x0.000000y0.000000
m3$0s1
g1x100.000000y0.000000
m5$0

g21g64p0.25g40g49g80g90g92.1g94g97 (postamble)
m2
;qtplasmac filtered G-code file



I tried to run the filtered code line by line.
g21... worked I think?
m190... Unknown m code used: M190
m66... didn't look like it did anything
f... worked I think?
g53... worked exactly as described
g0... worked
m3... M3 commands are not allowed in MDI mode
g1... worked
m5$0... would work if the spindle was on I suppose?
g21... I guess that would work
m2... I guess that would work too



Is there any sort of debugging I could do so we can find out where things go wrong? It sounds like some kind of offset calculation error, doesn't it?

I've attached the configuration again. 

File Attachment:

File Name: qtplasmac_...6.tar.gz
File Size:12 KB
Attachments:
Last edit: 23 Aug 2022 20:48 by somuchforfree. Reason: code formatting

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

More
23 Aug 2022 21:56 - 23 Aug 2022 22:19 #250286 by somuchforfree
I've built LinuxCNC and did some caveman tracing. The code in question (src/hal/components/plasmac.comp:1075) is this:
if((float_switch && !float_detected) || ohmic_detected){
                    z_pierce = z_offset_counts + probe_offset + ((pierce_height + (1 * units_per_mm))/ offset_scale);
                    z_max = z_offset_counts + (axis_z_max_limit - axis_z_position - (max_offset * units_per_mm)) / offset_scale;
                    if(z_pierce > z_max){
                        if(probe_testing){
                          state = PROBE_TEST;
                          probe_test_error = TRUE;
                          if(float_switch){
                            rtapi_print_msg(RTAPI_MSG_ERR,"pierce height would exceed Z axis maximum limit %d\n"
                                                          "condition found while moving to probe height %d during float switch probe testing", z_max, z_pierce);
Last edit: 23 Aug 2022 22:19 by somuchforfree.

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

More
23 Aug 2022 22:14 - 23 Aug 2022 22:17 #250289 by somuchforfree
rtapi_print_msg(RTAPI_MSG_ERR, "z_offset_counts %d/probe_offset %d/pierce_height %f/offset_scale %f", z_offset_counts, probe_offset, pierce_height, offset_scale);
rtapi_print_msg(RTAPI_MSG_ERR, "axis_z_max_limit %f/axis_z_position %f/max_offset %d", axis_z_max_limit, axis_z_position, max_offset);
rtapi_print_msg(RTAPI_MSG_ERR,"pierce height would exceed Z axis maximum limit %d\n"
"condition found while moving to probe height %d during float switch probe testing", z_max, z_pierce);
gave me:

z_offset_counts -1113222/probe_offset 0/pierce_height 1.000000/offset_scale 0.000010
axis_z_max_limit 0.010000/axis_z_position 400.000000/max_offset 5

pierce height would exceed Z axis maximum limit -41612221
condition found while moving to probe height -913222 during float switch probe testing
Last edit: 23 Aug 2022 22:17 by somuchforfree. Reason: code formatting

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

More
24 Aug 2022 04:47 - 24 Aug 2022 04:48 #250301 by phillc54
As far as I can see the offset calculations are correct, using your config as a sim these are the values I get when probing with different material thicknesses.
probe test from z height after homing:
 5mm  z_pierce=-17261420   z_max=-504436
10mm  z_pierce=-16879802   z_max=-504436
15mm  z_pierce=-16401614   z_max=-504436
20mm  z_pierce=-15908774   z_max=-504436

I just had another look at your hal file, it has this line:
net plasmac:axis-position joint.2.pos-fb => plasmac.axis-z-position

It should be:
net plasmac:axis-position joint.3.pos-fb => plasmac.axis-z-position
Last edit: 24 Aug 2022 04:48 by phillc54.

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

Moderators: snowgoer540
Time to create page: 0.085 seconds
Powered by Kunena Forum