Array offset

More
12 years 5 months ago #47101 by gaeldk
Array offset was created by gaeldk
Hello,

Hello,

I have a milling operation that needs to be repeated for example 4 times.
Assume I have the GCode for the first.

How can I programm an array to repeat the operation with a specific deta in X and Y, say for example delta X 2cm, delta Y 3cm ?

That would lead to 4 times the same operation but with a homing offset of

X 0 Y 0 for the first
X 0 Y 3 for the second
X 2 Y 0 for the third
X 2 Y 3 for the 4th

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

More
12 years 5 months ago #47103 by Todd Zuercher
Replied by Todd Zuercher on topic Array offset
I set up some files to do just that this morning. This might not be the best way but it works for me.
Code:
G92.1 G90 O100 sub (G-code lines to be repeated here) G0 X0Y0 O100 endsub O102 repeat [2] (number of rows Y repeats) O103 repeat [2] (number of columns X repeats) O100 call G0 X2.0Y0 (width of columns) G92 X0Y0 O103 end repeat G92.1 G0 X0Y3.0 (length of rows) G92 X0Y0 O102 endrepeat

To do more than 2x2 change the numbers in the brackets to the number of desired repeats in that direction.
This code will make all the repeats in an X row then start over with all the Xs in the next Y row....
The following user(s) said Thank You: gaeldk

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

More
12 years 5 months ago #47110 by gaeldk
Replied by gaeldk on topic Array offset
Thank you !
I see the process here.

Wouldn't it be even better with a final G92.1 to do a final offset reset ?

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

More
12 years 5 months ago #47114 by Todd Zuercher
Replied by Todd Zuercher on topic Array offset
Yes, it would. I have one in the normal post-amble of my files, and it didn't get included in the copy and paste.

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

More
11 years 10 months ago - 11 years 10 months ago #53950 by gaeldk
Replied by gaeldk on topic Array offset
Hello,

Found out that the G-Code was not correct when having more than 2 lines in the Y direction.
Below is a corrected G-Code
Code:
G92.1 (INIT G-code here) O100 sub (G-code lines to be repeated here) G0 X0Y0 O100 endsub #1=17 (number of items on Y) #2=4 (number of items on X) #3=72.5 (spacing for X) #4=72.5 (spacing for Y) O102 repeat [#1] (number of rows Y repeats) O103 repeat [#2] (number of columns X repeats) O100 call G0 X#3 Y0 (width of columns) G92 X0Y0 O103 end repeat G0 X[#3*-#2] G92X0 G0 X0 Y#4 (length of rows) G92 X0Y0 O102 endrepeat G92.1 M2
Last edit: 11 years 10 months ago by gaeldk.
The following user(s) said Thank You: crisiacuf

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

More
11 years 10 months ago #53961 by Todd Zuercher
Replied by Todd Zuercher on topic Array offset
Thanks,

I have never tried to run more than 2 rows in the Y, so I missed the error.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum