Hello Guest it is October 25, 2021, 11:29:55 PM

Author Topic: Something's interfering with G52 command  (Read 2821 times)

0 Members and 1 Guest are viewing this topic.

Something's interfering with G52 command
« on: August 13, 2008, 05:02:07 PM »
I've lost most of my day fighting with this.

I'm trying to repeat a part using G52 offsets and subroutine calls.  The part just repeats in the same postion.

Is there something in the code that's cancelling the G52 offsets?  (I've read through the manual several times on the subject and don't see anything wrong with what I'm trying to do)


M101 (Switch to Z1)

M98 P1234 (Start of subroutine)
G52 Y35 (Offset for next piece)
M98 P1234
G52 Y70
M98 P1234
G52 Y105
M98 P1234
G52 Y140
M98 P1234
G52 Y175
M98 P1234
G52 Y210
M98 P1234
G52 Y245
M98 P1234
G52 Y280
M98 P1234
G52 Y315
M98 P1234
G52 Y350
M98 P1234
G52 Y385
M98 P1234
G52 Y420
M98 P1234

G0 X0 Y0
M30 (End and re-wind)

O1234 (Subroutine for Alps Rotary switch)

M7 (Turn on Z1)
F500 (Speed for engraving)

N9 G00 X6.000 Y19.428 Z10.000
N10 X6.000 Y19.428 Z2.540
N11 G01 X6.000 Y19.428 Z-0.300
N12 G42 X4.920 Y20.194
N13 G02 X4.547 Y23.113 I1.157 J1.631
N14 G03 X5.017 Y24.401 I-1.530 J1.288
N15 G40 G01 X5.017 Y32.178
N16 G00 X5.017 Y32.178 Z5.000
N17 X9.517 Y32.098
N18 X9.517 Y32.098 Z2.540
N19 G01 X9.517 Y32.098 Z-0.300
N20 G42 X9.517 Y23.574
N21 G02 X8.604 Y21.896 I-2.000 J0.000
N22 G03 X6.018 Y19.416 I5.163 J-7.975
N23 X7.679 Y9.657 I5.710 J-4.049
N24 G01 X10.534 Y7.632
N25 G03 X13.322 Y8.107 I1.157 J1.631
N26 G40 G01 X13.950 Y8.992
N27 G00 X13.950 Y8.992 Z5.000
N28 X20.331 Y1.727
N29 X20.331 Y1.727 Z2.540
N30 G01 X20.331 Y1.727 Z-0.300
N31 G42 X20.331 Y4.424
N32 G03 X19.808 Y5.773 I-2.000 J0.000
N33 G01 X14.840 Y11.210
N34 G03 X14.200 Y11.775 I-2.953 J-2.698
N35 G01 X9.662 Y14.993
N36 G02 X9.345 Y17.976 I1.157 J1.631
N37 X18.355 Y17.787 I4.422 J-4.055
N38 G03 X24.737 Y23.016 I3.243 J2.550
N39 G01 X24.608 Y23.170
N40 X24.476 Y23.322
N41 X24.342 Y23.473
N42 X24.205 Y23.622
N43 X24.066 Y23.770
N44 X23.924 Y23.916
N45 X23.779 Y24.061
N46 X23.633 Y24.204
N47 G02 X23.017 Y25.647 I1.385 J1.443
N48 G40 G01 X23.017 Y32.138
N49 G00 X23.017 Y32.138 Z5.000
N50 X18.517 Y32.138
N51 X18.517 Y32.138 Z2.540
N52 G01 X18.517 Y32.138 Z-0.300
N53 G42 X18.517 Y27.036
N54 G03 X19.602 Y25.258 I2.000 J0.000
N55 G01 X19.747 Y25.182
N56 X19.891 Y25.104
N57 X20.034 Y25.025
N58 X20.176 Y24.943
N59 X20.317 Y24.860
N60 X20.456 Y24.776
N61 X20.595 Y24.689
N62 X20.732 Y24.601
N63 X20.868 Y24.511
N64 X21.002 Y24.420
N65 X21.135 Y24.327
N66 X21.267 Y24.232
N67 X21.398 Y24.136
N68 X21.527 Y24.038
N69 X21.654 Y23.939
N70 X21.780 Y23.838
N71 X21.905 Y23.736
N72 X22.028 Y23.633
N73 X22.150 Y23.528
N74 X22.270 Y23.422
N75 X22.388 Y23.315
N76 X22.505 Y23.206
N77 X22.620 Y23.096
N78 X22.734 Y22.985
N79 X22.846 Y22.873
N80 X22.956 Y22.760
N81 X23.065 Y22.646
N82 X23.172 Y22.530
N83 X23.277 Y22.414
N84 X23.381 Y22.296
N85 X23.482 Y22.178
N86 X23.583 Y22.059
N87 G02 X19.733 Y18.868 I-1.925 J-1.596
N88 G03 X7.445 Y18.404 I-5.966 J-4.946
N89 X8.276 Y13.524 I2.855 J-2.024
N90 G01 X12.355 Y10.632
N91 G02 X12.655 Y10.370 I-1.157 J-1.631
N92 G01 X17.241 Y5.490
N93 G02 X16.119 Y2.149 I-1.458 J-1.369
N94 G01 X15.181 Y1.989
N95 G02 X12.846 Y3.898 I-0.336 J1.972
N96 G03 X11.403 Y5.756 I-1.999 J-0.063
N97 G02 X8.377 Y7.349 I2.364 J8.165
N98 G03 X5.832 Y7.342 I-1.268 J-1.546
N99 G40 G01 X3.282 Y5.228
N100 G00 X3.282 Y5.228 Z5.000
N101 X27.203 Y4.517
N102 X27.203 Y4.517 Z2.540
N103 G01 X27.203 Y4.517 Z-0.300
N104 G42 X17.813 Y11.176
N105 G02 X17.219 Y14.661 I1.446 J2.039
N106 G40 G01 X18.986 Y17.153
N107 G00 X18.986 Y17.153 Z5.000
N108 X14.488 Y21.637
N109 X14.488 Y21.637 Z2.540
N110 G01 X14.488 Y21.637 Z-0.300
N111 G42 X14.761 Y24.559
N112 G03 X14.416 Y25.881 I-1.991 J0.186
N113 G01 X14.371 Y25.946
N114 G02 X14.017 Y27.082 I1.646 J1.136
N115 G40 G01 X14.017 Y32.138
N116 G00 X14.017 Y32.138 Z25.000

M9 (Turn off Z1)
M102 (Switch to Z2)
M8 (Turn on Z2)
F200 (Speed for cutting)

N10 G00 X19.174 Y12.663 Z10.000
N11 X19.174 Y12.663 Z2.540
N12 G01 X19.174 Y12.663 Z0.000
N13 X19.313 Y14.156 Z-1.000
N14 X19.174 Y12.663 Z-2.000
N15 X19.313 Y14.156
N16 G00 X19.313 Y14.156 Z5.000
N17 X21.944 Y19.726
N18 X21.944 Y19.726 Z2.540
N19 G01 X21.944 Y19.726 Z0.000
N20 X20.987 Y20.881 Z-1.000
N21 X21.944 Y19.726 Z-2.000
N22 X20.987 Y20.881
N23 G00 X20.987 Y20.881 Z5.000
N24 X17.946 Y23.037
N25 X17.946 Y23.037 Z2.540
N26 G01 X17.946 Y23.037 Z0.000
N27 X16.540 Y23.558 Z-1.000
N28 X17.946 Y23.037 Z-2.000
N29 X16.540 Y23.558
N30 G00 X16.540 Y23.558 Z5.000
N31 X12.828 Y23.905
N32 X12.828 Y23.905 Z2.540
N33 G01 X12.828 Y23.905 Z0.000
N34 X11.350 Y23.653 Z-1.000
N35 X12.828 Y23.905 Z-2.000
N36 X11.350 Y23.653
N37 G00 X11.350 Y23.653 Z5.000
N38 X12.154 Y19.232
N39 X12.154 Y19.232 Z2.540
N40 G01 X12.154 Y19.232 Z0.000
N41 X10.791 Y18.607 Z-1.000
N42 X12.154 Y19.232 Z-2.000
N43 X10.791 Y18.607
N44 G00 X10.791 Y18.607 Z5.000
N45 X7.962 Y22.098
N46 X7.962 Y22.098 Z2.540
N47 G01 X7.962 Y22.098 Z0.000
N48 X6.807 Y21.141 Z-1.000
N49 X7.962 Y22.098 Z-2.000
N50 X6.807 Y21.141
N51 G00 X6.807 Y21.141 Z5.000
N52 X4.651 Y18.100
N53 X4.651 Y18.100 Z2.540
N54 G01 X4.651 Y18.100 Z0.000
N55 X4.130 Y16.694 Z-1.000
N56 X4.651 Y18.100 Z-2.000
N57 X4.130 Y16.694
N58 G00 X4.130 Y16.694 Z5.000
N59 X3.783 Y12.982
N60 X3.783 Y12.982 Z2.540
N61 G01 X3.783 Y12.982 Z0.000
N62 X4.035 Y11.504 Z-1.000
N63 X3.783 Y12.982 Z-2.000
N64 X4.035 Y11.504
N65 G00 X4.035 Y11.504 Z5.000
N66 X9.974 Y9.868
N67 X9.974 Y9.868 Z2.540
N68 G01 X9.974 Y9.868 Z0.000
N69 X11.198 Y9.001 Z-1.000
N70 X9.974 Y9.868 Z-2.000
N71 X11.198 Y9.001
N72 G00 X11.198 Y9.001 Z5.000
N73 X9.588 Y4.805
N74 X9.588 Y4.805 Z2.540
N75 G01 X9.588 Y4.805 Z0.000
N76 X10.995 Y4.284 Z-1.000
N77 X9.588 Y4.805 Z-2.000
N78 X10.995 Y4.284
N79 G00 X10.995 Y4.284 Z5.000
N80 X14.706 Y3.937
N81 X14.706 Y3.937 Z2.540
N82 G01 X14.706 Y3.937 Z0.000
N83 X16.185 Y4.189 Z-1.000
N84 X14.706 Y3.937 Z-2.000
N85 X16.185 Y4.189
N86 G00 X16.185 Y4.189 Z25.000
N87 X23.943 Y4.306 Z10.000
N88 X23.943 Y4.306 Z2.540
N89 G01 X23.943 Y4.306 Z-2.000
N90 G00 X23.943 Y4.306 Z5.000
N91 X26.290 Y7.616
N92 X26.290 Y7.616 Z2.540
N93 G01 X26.290 Y7.616 Z-2.000
N94 G00 X26.290 Y7.616 Z5.000
N95 X25.267 Y29.563
N96 X25.267 Y29.563 Z2.540
N97 G01 X25.267 Y29.563 Z-2.000
N98 G00 X25.267 Y29.563 Z5.000
N99 X20.767 Y29.563
N100 X20.767 Y29.563 Z2.540
N101 G01 X20.767 Y29.563 Z-2.000
N102 G00 X20.767 Y29.563 Z5.000
N103 X16.267 Y29.563
N104 X16.267 Y29.563 Z2.540
N105 G01 X16.267 Y29.563 Z-2.000
N106 G00 X16.267 Y29.563 Z5.000
N107 X11.767 Y29.563
N108 X11.767 Y29.563 Z2.540
N109 G01 X11.767 Y29.563 Z-2.000
N110 G00 X11.767 Y29.563 Z5.000
N111 X7.267 Y29.563
N112 X7.267 Y29.563 Z2.540
N113 G01 X7.267 Y29.563 Z-2.000
N114 G00 X7.267 Y29.563 Z5.000
N115 X2.767 Y29.563
N116 X2.767 Y29.563 Z2.540
N117 G01 X2.767 Y29.563 Z-2.000
N118 G00 X2.767 Y29.563 Z25.000
N119 X0.267 Y22.680 Z10.000
N120 X0.267 Y22.680 Z2.540
N121 G01 X0.267 Y22.680 Z-2.000
N122 G42 X0.267 Y29.563
N123 G02 X2.767 Y32.063 I2.500 J0.000
N124 G01 X25.267 Y32.063
N125 G02 X27.767 Y29.563 I0.000 J-2.500
N126 G40 G01 X27.767 Y20.405
N127 G00 X27.767 Y20.405 Z5.000
N128 X27.767 Y18.369
N129 X27.767 Y18.369 Z2.540
N130 G01 X27.767 Y18.369 Z-2.000
N131 G42 X27.767 Y10.288
N132 G03 X28.151 Y9.286 I1.500 J0.000
N133 G02 X28.330 Y6.170 I-1.861 J-1.670
N134 G01 X26.016 Y2.907
N135 G02 X22.714 Y2.196 I-2.039 J1.446
N136 G03 X21.176 Y2.182 I-0.757 J-1.295
N137 G02 X0.267 Y13.921 I-7.159 J11.740
N138 G40 G01 X0.267 Y21.123
N139 G00 X0.267 Y21.123 Z25.000

M9 (Turn off Z2)
M101 (Switch to Z1)
M99 (Return from Subroutine)
Re: Something's interfering with G52 command
« Reply #1 on: August 13, 2008, 05:38:50 PM »
OK, found the problem.

G52 X0 Y0

was missing from the end of the subroutine

I'm not sure why that's necessary but it is.