Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: birillo1959 on October 18, 2021, 06:17:10 AM

Title: error G31 Probing Arrays
Post by: birillo1959 on October 18, 2021, 06:17:10 AM
GOOD MORNING
I downloaded the G31 Probing Arrays macro from the MACH TOOL BOX section
I installed "M1299.m1s" then I launched "G31ExtPolArrayV2.01.txt" and it gives me an error
I corrected the first line M1289 with M1299
Gcode starts but when the "G1Z3110" line is reached the Z axis goes to the end of its stroke.

  (G31 External Polar Array V2.01)
   M1289
   M40
%
G90
  G0 Z # 110
  # 106 = [# 100 + # 102 * COS [# 103]]
  # 107 = [# 101 + # 102 * SIN [# 103]]
  G0 X # 106 Y # 107
  G1 Z # 123
  122 = Fix [# 122] <-------------- maybe it should be # 122 = Fix [# 122]

%

M98 P1 L # 122
G1Z3110 <-------- --------------------------------
M41
M30
%

o1 (sub1)
# 123 = [# 123 + # 121]
G1 Z # 123
  M98 P2 L # 108
  M99
 
%

o2 (sub)
  # 105 = [# 103 + # 104]
  # 106 = [# 100 + # 102 * COS [# 105]]
  # 107 = [# 101 + # 102 * SIN [# 105]]
  G90
  G0 X # 106 Y # 107
  G31 X # 100 Y # 101
  # 103 = # 105
  m99

given its usefulness it would be possible to correct it
I use version 3.043.062
I thank those who can help me
Title: Re: error G31 Probing Arrays
Post by: JohnHaine on January 29, 2022, 07:42:23 AM
Yes, well that line tells z to move up to 3110 mm!  So it's doing what the code tells it to. Looking a few lines above maybe the 3 should be # ?
Title: Re: error G31 Probing Arrays
Post by: BR549 on January 29, 2022, 06:41:27 PM
YEP the 3 == #

(;-) TP
Title: Re: error G31 Probing Arrays
Post by: birillo1959 on January 31, 2022, 12:56:38 PM
thanks for the reply, the macro has improved
now it starts goes into position it goes down then it goes up again and it stops
I don't know maybe the problem is that I have a Chinese card?
Title: Re: error G31 Probing Arrays
Post by: JohnHaine on January 31, 2022, 01:17:26 PM
Apart from correcting that error with the Z move, have you corrected the obvious 122 = fix[# 122] ?  Note the spurious space between # and 122.

And...
o0001 (G31 Interior Polar Array V1.01)

   M1299
   M40
%
  G90   
  #106 = [#100 + #102 * COS[#103]]
  #107 = [#101 + #102 * SIN[#103]]
  g0 Z#110
  g0 X#100 Y#101
  G1 Z#111
  G31 X #106 Y #107
  G4 P1 
  G0 X#100 Y#101

M98 P1 L#122
G1 Z [#111+121] <<121 should be #121?

M41
M30
%

o0001 (SUB1)
  M98 P2 L#108
  G0 Z#110
  m99

o0002 (SUB2)
  #105=[#103+#104]
  #106 = [#100 + #102 * COS[#105]]
 #107 = [#101 + #102 * SIN[#105]]
 G90
 G31 X #106 Y #107
 G4 P1
 G0 X#100 Y#101
 #103 = #105
 m99
%

There could be other simple errors too given that these only needed a quick look to see.
Title: Re: error G31 Probing Arrays
Post by: birillo1959 on February 01, 2022, 03:01:52 AM
JohnHaine thanks for the help, I did as recommended but still have the same problem
Title: Re: error G31 Probing Arrays
Post by: JohnHaine on February 01, 2022, 04:51:18 AM
I notice that the macro you posted first starts:
(G31 External Polar Array V2.01)
   M1289
   M40

However the macro it calls first, M1289, is not correct, it should be M1299!  This has been pointed out elsewhere on the forum.

Was the code you downloaded like this?  It's very careless.
Title: Re: error G31 Probing Arrays
Post by: birillo1959 on February 01, 2022, 05:20:50 AM
I have renamed the macro M1299, the probing starts from the center goes to the beginning of the probing the Z goes down then goes up and stops everything and tells me the machining is finished. programming I do not understand but I assume that there is some problem in writing the macro
Title: Re: error G31 Probing Arrays
Post by: TPS on February 01, 2022, 12:12:47 PM
this code has to in M1299.M1s in your macro folder:
Code: [Select]
' G31 Polar Array Calibration Macro V1.00
Xpos= getdro(0)
Ypos= getdro(1)
Pspeed= Question (" Probe Feed Rate")
Rleg= Question ("Input Max Leg Length")
Linc= Question ("Input leg Separation Angle")
SafZ= Question ("Input SafeZ Height")
Phgt= Question ("Input Safe Probe Height")
Spnt= Question ("Input start point in DEG, zero is x axis 3oclock")
Tdeg= Question ("Input Total Arc Width of Array in DEGs")
Nrep= (Tdeg / Linc)

Setvar (100 , Xpos)
Setvar (101 , Ypos)
Setvar (102 , Rleg)
Setvar (104 , Linc)
Setvar (108 , Nrep)
Setvar (109 , Pspeed)
Setvar (110 , SafZ)
Setvar (111 , Phgt)
Setvar (103 , Spnt)
Code " F#109"

End



and this is the GCode you have to run (it will call M1299)
Code: [Select]



o0001 (G31 Interior Polar Array V1.01)

   M1299
   M40
%
  G90   
  #106 = [#100 + #102 * COS[#103]]
  #107 = [#101 + #102 * SIN[#103]]
  g0 Z#110
  g0 X#100 Y#101
  G1 Z#111
  G31 X #106 Y #107
  G4 P1 
  G0 X#100 Y#101

M98 P1 L#122
G1 Z [#111+121]

M41
M30
%

o0001 (SUB1)
  M98 P2 L#108
  G0 Z#110
  m99

o0002 (SUB2)
  #105=[#103+#104]
  #106 = [#100 + #102 * COS[#105]]
 #107 = [#101 + #102 * SIN[#105]]
 G90
 G31 X #106 Y #107
 G4 P1
 G0 X#100 Y#101
 #103 = #105
 m99
%

bbut i have no ideas what it will/should do.
Title: Re: error G31 Probing Arrays
Post by: birillo1959 on February 02, 2022, 02:07:21 AM
Good morning
perhaps I have not explained myself well, in summary
I renamed M1289.txt in M1299.m1s and installed in MACH3 \ MACROS \ MACH3MILL, the problem is this:
I launch the program
he asks me for the various parameters
asks me where to save the tripletfile
starts the machine positions itself for the descent
goes down
goes back
at this point it tells me the finished work.
Title: Re: error G31 Probing Arrays
Post by: TPS on February 02, 2022, 02:38:51 AM
var 121 and 122 are nowhere calculated
Title: Re: error G31 Probing Arrays
Post by: JohnHaine on February 02, 2022, 05:12:29 AM
Oops!  How true!

This macro seems to be a complete mess.
Title: Re: error G31 Probing Arrays
Post by: TPS on February 02, 2022, 07:19:10 AM
as mentoined earlier: no ideas what it will/should do
Title: Re: error G31 Probing Arrays
Post by: birillo1959 on February 03, 2022, 01:51:36 PM
TPS thanks for the reply, I state that I do not understand programming, the array is taken from the site under download / mach tool box
in theory it should probe the outside of a piece, I don't know if I'm having problems or it's the macro, too bad it would have been useful !!
Title: Re: error G31 Probing Arrays
Post by: TPS on February 04, 2022, 02:11:05 AM
this script will not probe a outside of a part.

may this:

https://www.youtube.com/watch?v=CsXjI1998ik
http://www.craftycnc.com/probe-it-wizard-mach3/

is what you are looking for.
Title: Re: error G31 Probing Arrays
Post by: BR549 on February 07, 2022, 10:10:38 PM
Well it probed parts for about 10 years inside and out BUT the code in the toolbox may not be a good copy of the script.

(;-) TP
Title: Re: error G31 Probing Arrays
Post by: BR549 on February 08, 2022, 10:47:56 PM
I take that back it is over 17 years old now. I drug out the old PC that ran it and pulled off a copy for you to try.  Notice the last modify date 2004 (;-)
(;-) TP
Title: Re: error G31 Probing Arrays
Post by: birillo1959 on February 09, 2022, 01:51:20 PM
thanks BR549 I tried it works fine !!!!