![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I'm sure this is quite basic to people who use parametric programming alot, I just can't quite figure it out. I'm trying to do it similar to below. #1=20.2 (Large Ř) #2=2.7 (Small Ř) #3=0.6 (Cut Size) #4=[[#1-#2]/2] (8.75) G01 Y#4 rounded up to the nearest multiple of #3 I want it to be able to move Y axis to the nearest multiple above #4 which would be 9.00. Any one got any ideas? Thanks |
|
#2
| ||||
| ||||
| I dont know what control you have, but most with parametric take a RND or in the case of Fanuc take ROUND. If so #5= ROUND #4 GO1 Y#5 Should work. Al
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#4
| ||||
| ||||
| I assume you want to round it up only? in other words did you want to round up to a whole number above #4 + #3? Al
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#6
| ||||
| ||||
| What if you do the round off like I showed and then compared the rounded # with #4 and if less than #4 add #3? A No wait that won't work, I have to go over that again but I think we are on the right track, unless someone else can jump in. l
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#7
| |||
| |||
| The problem for me is that I need it to start at the large Ř come in the value of #4 (8.75) but if someone specifies a cut size that is not a multiple of the different Ř's it can't come in to the correct size, I think. |
|
#8
| ||||
| ||||
| I belive there is a Fix function available this will simply remove the fractional part of a number and return the next lower integer. Just use this on the return of your devision. A bit rusty on Fanuc but check the manual for the proper syntax. Good Luck |
|
#9
| ||||
| ||||
| Are #1 & #2 going to change or just #3? Al
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#11
| ||||
| ||||
| I think at this point we need to get a clearer understanding of what you want to do, as the way I read your first post is a round up to 9.00, but that does not round up to an increment of 0.6? Which is the impression I get in the later post. Al
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#12
| |||
| |||
| Sorry for the confusion, you're right I would of liked it to round to 9.00, only because the cut size is 0.6, which would equal 15 cuts (15 x 0.6) to achieve 9.00. I think I have worked out what to do, I just can't get the ROUND function to work. I thought if I could have it round out the difference between total depth divided by cut depth as per below: #1=20.2 (Large Ř) #2=2.7 (Small Ř) #3=0.6 (Cut Size) #4=[[#1-#2]/2] (8.75 depth per side) #5=[#4/#3] (14.58333 Depth divided by depth of cut) #6=[ROUND#5] This formula doesn't work though. If possible I would like it to round the value of #5 up to 15.00. I think because I don't fully understand it, I'm having trouble explaining the scenario. Thanks for your patience Al The Man. |
![]() |
| 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 |
| parametric programming | Karl_T | CamSoft Products | 21 | 05-24-2005 03:58 PM |
| Need Program Suggestions... Help | elalto | General CAM Discussion | 1 | 08-12-2004 04:09 PM |
| G codes | Citron | CamSoft Products | 14 | 06-10-2004 11:59 PM |
| My work in progress, suggestions welcome! | freezer | DIY-CNC Router Table Machines | 5 | 02-15-2004 09:11 PM |