M7x restore_settings failed

More
5 years 3 months ago - 5 years 3 months ago #213464 by rajewski
I'm trying to write a macro that will measure all my tool lengths and update the tool table but I've run into an issue.

I have a main subroutine that does the tool changes and calls another sub to do the actual measurements. The first measurement goes well but the second throws the error "M7x: restore_settings failed executing: ' F1200.0': Unknown oword number"

I'm running the master branch (from build-bot) so this may be a bug.

The main looping macro
Code:
o<measure_tool_lengths> sub #<start> = #1 #<end> = #2 #<idx> = #<start> #<x>=#<_x> (save current x position with current offset) #<y>=#<_y> (save current y position with current offset) G90 G0 G53 Z0 (move to safe Z) G0 G53 X#<_ini[toolsensor]x> Y#<_ini[toolsensor]y> o100 while [#<idx> LE #<end>]     T#<idx> M6     o<measure_tool_length> call     #<idx> = [#<idx> + 1] o100 endwhile G0 G53 Z0 G0 X#<x> Y#<y> o<measure_tool_lengths> endsub M2

The measurement macro
Code:
O<measure_tool_length> sub M70 (Save modal states) G61 (exact path mode to prevent collisions) G92.2 (Remove G92 if set) #<x>=#<_x> (save current x position with current offset) #<y>=#<_y> (save current y position with current offset) G90 G0 G53 Z0 (move to safe Z) G0 G53 X#<_ini[toolsensor]x> Y#<_ini[toolsensor]y> G49 G59.3 G10 L2 P0 Z0 (remove offsets) G0 G53 Z#<_ini[toolsensor]z> M64 P2 (Enable probe) F#<_ini[toolsensor]search_feed> G91 G38.2 Z#<_ini[toolsensor]maxprobe> G1 Z1.0 F#<_ini[toolsensor]probe_feed> G4 P0.5 G38.2 Z-2.0 M65 P2 (Disable probe) G90 (back to start point) M72 (restore state) G0 G53 Z0 G0 X#<x> Y#<y> (write the value to the tool table) G10 L1 P#5400 Z[#5063 - #<_ini[toolsensor]offset>] O<measure_tool_length> endsub M2

EDIT: After messing with it more it turns out the error only was thrown after an actual tool change. It seems the M73 I was using in my tool change made the tool measurement macro fail. If I replace this with an M70/M72 pair it works. Seems like a bug in the master branch?
Last edit: 5 years 3 months ago by rajewski.

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

More
3 years 8 months ago - 3 years 8 months ago #265446 by dinodf
Replied by dinodf on topic M7x restore_settings failed
Hi,
this problem is not resolved yet?
I have tested and have the same problem on LinuxCNC 2.8.4 :-(

EDIT: I have this error using a subroutine to call the change tool and probe length, if I do it in a normal GCode file it do all correctly.
With
Code:
O <touch_plate> sub  M6T1 O<set_tool_length> call M6T2 O<set_tool_length> call M6T3 O<set_tool_length> call M6T4 O<set_tool_length> call M6T5 O<set_tool_length> call M6T6 O<set_tool_length> call M6T7 O<set_tool_length> call M6T8 O<set_tool_length> call M6T9 O<set_tool_length> call O <touch_plate> endsub M2
 
it fail with error, but if I do it in a normal .ngc file:
Code:
M6T1 O<set_tool_length> call M6T2 O<set_tool_length> call M6T3 O<set_tool_length> call M6T4 O<set_tool_length> call M6T5 O<set_tool_length> call M6T6 O<set_tool_length> call M6T7 O<set_tool_length> call M6T8 O<set_tool_length> call M6T9 O<set_tool_length> call M2
 
LinuxCNC do all correctly

 
 
Last edit: 3 years 8 months ago by dinodf.

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

More
3 years 8 months ago #265449 by tommylight
M7x is not a valid M code, probably inside the "touch_plate" file?

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

More
3 years 8 months ago #265462 by andypugh

M7x is not a valid M code, probably inside the "touch_plate" file?
He is just using a shortcut to mean M70 and M72. 

 

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

More
3 years 8 months ago - 3 years 8 months ago #265463 by andypugh
Do you have any idea which line is triggering the error? It seems to be saying it is an "F0 G64" but then "unknown O-word number" makes no sense.
Last edit: 3 years 8 months ago by andypugh.

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

More
3 years 8 months ago #265464 by tommylight

M7x is not a valid M code, probably inside the "touch_plate" file? 
He is just using a shortcut to mean M70 and M72. 
Screenshot, bottom right side, error ?
Or is that used also for error reporting?

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

Time to create page: 0.094 seconds
Powered by Kunena Forum