|
| |||||||
| Home | Recent Posts | HELP-FORUMS (ask/answer) | Classifieds-free | File Sharing / Documents | Photo Galleries | Polls | Newsletter | Machinetoolhelp.com. |
| Programming / Applications All CNC programming, CNC applications, milling, turning, tooling, macro programming, and other CNC machine tool related questions. |
![]() |
| | Bookmark or Share | Thread Tools | Search this Thread | Display Modes |
| |||
|
Help Please. I am looking for a macro B program to cut a scroll on a cnc vertical mill with a Fanuc 0i-MC control. The sroll is on the top face i.e. circular interpolation in the X & Y axis with the depth in Z.Thanks.
|
| |||
| Quote:
If your control does not have the above functions, Post more information regarding the accuracy of the scroll. For example: 1. Is the scroll to be an approximation. In that case circular interpolation may be used in the Macro Program to give an approximate Spiral. 2. Is the scroll to be an accurate form. In this case I can supply the math routines so you can write your own Macro, or supply the Macro. You will learn more if you write your own. Regards, Bill |
| |||
|
The control does not support spiral / conical interpolation. The accuracy of the scroll is not to important. An approximation would be good enough in this case. |
| |||
| Quote:
The following arguments can be passed using a G65 call. You could also create a custom G Code by registering a number corresponding to the G code in, say, parameter #6050 so as to call macro program O9010. For example, register 101 in #6050 to call O9010 with G101 G65 P9010 X0.0 Y0.0 A0.0 C2.0 H50.0 K50.0 R100.0 F200 or G101 X0.0 Y0.0 A0.0 C2.0 H50.0 K50.0 R100.0 F200 Start angle of scroll = A(#1) (3 o'clock is 0 degree, 12 o'clock is 90 degree, etc) Number of rotations of scroll commencing at A = C(#3) X Centre of Scroll = X(#24) Y Centre of Scroll = Y(#25) Start Radius of Scroll = R(#18) Increase of Scroll Radius from Start to End = H(#11) Number of points = K(#6) Cut Feed Rate = F(#9) O9010 'Calculate the incremental angle and rise between points. #4 = (Incremental angle between points) #4 = [360*#3] / [#6-1] #5 = (Incremental rise between points) #5 = #11 / [#6-1] The following relies on the tool being positioned at the Start Point of the Scroll. The first point calculated is the second point on the scroll. To calculate the start point of the scroll and drive the tool there via the Macro, initialize both #27 and #28 to Zero. Otherwise, the following initialization will calculate the second point of the scroll. #27 = (nth number of point, after the Start point being calculated) #27 = 1 #28 = (the accumulated incremental angle to be added to the start angle) #28 = #4 WHILE [#27 LT #6] DO1 #29 = #24 + [Cos[#1 + #28] * [#18 + [#5 * #27]]] #30 = #25 + [Sin[#1 + #28] * [#18 + [#5 *#27]]] G01 X#29 Y#30 F#9 #28 = #28 + #4 #27 = #27 + 1 END1 The above only applies the X,Y moves. You could expand on the above by passing a Retract Level, a Z Depth, and a Z Feed Rate as arguments in the call block, and incorporate these in the Macro program. To do this, you would have to do the following before executing the WHILE/END loop: 1. Calculate the first point on the scroll in X,Y 2. Rapid to the coordinates found in 1. 3. Rapid to Retract Level 4. Feed to Z Depth The above is a conversion of a routine from software I wrote. I know for sure that the routine works perfectly in the software, but I haven't tested it as a Macro program with a CNC machine. However, I can't see that I've made any mistakes, so it should be OK, but check it out in single block in fresh air first. I can also show you a technique of repeating the scroll at various levels, if the scroll has to be cut to a depth greater than the tool will cope with in one go. Post back if you require any further explanation, or help. Regards, Bill Last edited by angelw; 02-01-12 at 03:54 PM. Reason: Correct the program number of the Macro Program |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
| |