![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Parametric Programing (custom macro b, fadal macro, okuma user task) |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| just wondered if anyone has already tried to do this. i normally use g68 rotation on work offset if casting datums are out of square. but i wonder if someone has already developed a macro where it would take the normal programmed coordinates and convert each into the rotated coordinates. have not done a lot of trig programming with macros and not looking for a bolt circle program. just want normal x y coordinate then convert to new x y coordinate with rotation added. looking mainly for okuma control thanks |
|
#2
| |||
| |||
| I have seen this thing done at post processor level but never on the control except for the G68 you mention. Consider this, for every line of code to position the tool you would have to have a macro call to adjust the tool position. Very dodgy in my view. I think you would be better writing a program in VB or Java to read in your program, adjust all your X & Y's by a given amount and output a new, compensated version of the program. A sort of second level post processor if you like. The math is relatively simple except for the cardinal points i.e. 0°, 90°, 180° and 270° where the tangent can be eith 0 or infinity. Maybe some of the higher end CNC editors have this function. Can anyone tell us? |
|
#3
| ||||
| ||||
| Not easy to implement. For general milling/positioning, you would need to set up a macro that requires the arguments Move Type (linear/circular/rapid), finish X pos, finish Y pos, I and J or R (as required for circular move), Feedrate. You could also have an argument to specify cutter compensation, but it would probably be easiest in the beginning to apply cutter compensation in a safe position off the finished profile before using your macro. You would need to define your rotation angle as a common variable at the start of the program. In your macro you need to calculate the polar length and angle of the programmed X and Y position from zero using pythagoras for the length (hypotenuse) and arctan (type 2) for the angle. Hint: - Use absolute X and Y values to calc the length so you always get a positive result. You add your rotation to this angle to find the new angle, then recalculate the X (=cos(new angle)*length) and Y (=sin(new angle)*length). Obviously the circular move requires the same for I and J. Your macro then performs the required movement to the new X and Y. Unfortunately this approach is very limited, you will need to program contours line-by-line as any milling cycles will not be rotated. I have implemented a similar thing on Fanuc, but only to recalculate the work offset position. DP |
|
#4
| |||
| |||
| Thanks was just looking to use on straight drilling coordinates not milling. understand that milling would require to store a lot more positions. thought along the line using regular coordinates: g65p___ x___y____ g65p___ x___y____ etc then in sub to convert the x and y to whatever with r adjusted. at least on fanuc but with the okumas would have to delve into their style a bit more. i use macros for simple things but when it gets into the trig can be a little more hairy. no not mind ordering the option it is just the hassle of having to wait. Thanks again |
|
#5
| |||
| |||
| First off what series Fanuc control are you using?? Can you tell us a bit more in detail of what exactly you are doing? By the looks of your last post you may have the ability of using a macro "modal" call where you can just specify the points after. In order to find the best calculation method we need more detail. Stevo |
| Sponsored Links |
|
#6
| |||
| |||
| First off what model Fanuc are you using? With milling it is going to be pretty involved, as already stated above. If you give us more detail we may be able to help some more. What exactly are you trying to do? How do you want to specify the drilling angle for each hole? By the looks of your last post using a macro "modal" call may be an option but need to know more details. Stevo |
|
#7
| |||
| |||
| Hi stevo1: actually i wanted to do it on a okuma mill horizontal with the 5000 series control. just drills a bolt circle but because of some stupid -c- datum angular back to the casting they need to adjust. they can have a moveable stop but it seems too difficult for modern day. i did do it with g68 on fanuc and a r set with variable. the problem is they like it so i told them we would have to get the option for okuma. we did get it for one machine smaller model and had to wait about six weeks for software from japan. it was same type of deal back to cast datum on angular. would be no problem if they had not invented cmm machines. i think i cold manage with the fanuc. off track but i did find g68 good for angle heads 90 degree head at a angle just put in the r value and program a y movement in incremental for the feed distance. easy to adjust for different tool length. anyhow not that up on the okumas with trig in program. thanks for any input. |
|
#8
| |||
| |||
| Yes G68 on Fanuc is pretty easy. I have never used it or programmed any macros for a 5000series control. I had to do this some time ago on a new product that we brought to our Midwest operation. The product never did fully launch before outsourcing it but I got most of the macro programming done before hand. I had a wicked smart mathematics guy working with me and he had a bunch of formulas I used and converted into macros. I don’t remember the names of the formulas off hand but I do believe that I still have all of the documents at home. I have the macros handy but without the formulas it is hard to figure what I was doing. I will dig them up and post them when I get some time. Stevo |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help!- Coordinate Rotation G68 | dougtyler | Fanuc | 10 | 09-21-2010 11:00 AM |
| Fanuc 16T Macro Option | MarkT | Fanuc | 3 | 08-31-2009 07:18 AM |
| Need Help!- WITH COORDINATE ROTATION (G68) FANUC 18-M | PICMAN | Fanuc | 5 | 06-25-2009 09:03 AM |
| Haas Coordinate Rotation G68 | ddk114 | Haas Visual Quick Code | 1 | 02-19-2008 01:48 PM |
| G68 Coordinate Rotation System | ebigfoot2 | Fanuc | 2 | 08-13-2007 07:33 AM |