![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| Inverting values. Hi I need to edit the standrad MPFAN postprocessor for MC 9 to invert the values of X and Y For example: postprocessor outputs X125.0 and I wan't to have X-125.0 I think I need this for I and J also. Is this doable?? I'm having a Fanuc 21i system. /Fredrik |
|
#2
| ||||
| ||||
|
__________________ Toby D. "Imagination and Memory are but one thing, but for divers considerations have divers names" Schwarzwald (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) www.refractotech.com |
|
#3
| ||||
| ||||
Are you programming it backwards? Not sure the reasoning here.
__________________ Matt San Diego, Ca ___ o o o_ [l_,[_____], l---L - □lllllll□- ( )_) ( )_)--)_) (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#4
| ||||
| ||||
|
Maybe he is doing a Mirror Image for Left/Right Hand Parts. I'm confused too
__________________ Toby D. "Imagination and Memory are but one thing, but for divers considerations have divers names" Schwarzwald (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) www.refractotech.com |
|
#5
| |||
| |||
|
The reason is that the coordinates is reversed in my machine compared to MC. In MC all values to the right an top of the origin is positive, but in my machine those values are negative... Or can I work around this with some G-code in my system. Anyway, I wrote a small C# program to invert the values, but it would be great if I didn't have to do that. ![]() /Fredrik |
| Sponsored Links |
|
#6
| ||||
| ||||
| Is there a parameter in the control you could switch to have the axis inverted ? Just thinking out loud here... |
|
#7
| ||||
| ||||
| This can be done you just need to determine if changing it in the post is the best way for you to do it or not. If you do not have a large number of programs already for your machine tool you might be better off changing them in the machine to match the standard right hand rule. If you want to do it in the post processor you can though. I have done it several times and it seems to work great. I am not going to tell you exactly how because I do not know your post, but to reverse the sign of a variable you use the logic below. xabs is my variable for this example. xabs = xabs * -1 This will take the value of xabs and change it from positive to negative or from negitive to positive. This is the easy part. The hard part is making sure you have this in the right location of your post. Where you need to put it will vary based on if your post supports rotary logic or not. Typically this is done where the XYZ and IJK matrix is mapped to the current plane. I strongly sudgest you take this information to your Mastercam dealer and request this change. They should be able to make this change for you. Thanks and I hope this helps PS You have a PM AC |
|
#8
| ||||
| ||||
| Change the GCode filename extension to .TXT and open the file using Word for Windows as a text document. Click the Edit Tab and then Replace. Stick X in the replace bit and X- in the Replace With bit. Do the same with Y. Watch out for any X0 and Y0 values.. you'll need to change these manual cos the Replace will change these to X-0 which might mess up your program. Save the file then rename it with the appropriate filename extension. Hope this helps!
__________________ I love deadlines- I like the whooshing sound they make as they fly by. |
|
#9
| ||||
| ||||
| theres a variable for changing that. If you search in the post (dia_mult) you'll find ..... dia_mult : 2 #Multiplier for output on X axis (Neg. switches sign of X) y_mult : 1 #Multiplier for output on Y axis (Neg. switches sign of Y) z_mult : 1 #Multiplier for output on Z axis (Neg. switches sign of Z) dia_mult is what changes the output for Radius ot Dia. Every X value runs thru it before getting output. Changing it to -2 will invert the value and make the output 2 times the radius. Mike Mattera
__________________ Tips For Manufacturing Training CD's, DVD's for Mastercam, SolidWorks, Inventor, G-Code Training & More http://www.tipsforcadcam.com |
|
#10
| |||
| |||
| The default MPFAN in V9 contained some limited logic for this. To do it properly, open the .pst file and find the following section: Code: pxyzcout #Map coordinates
if rot_on_x,
[
if cuttype = zero, pxyzcout0 #Toolplane Positioning
if cuttype = one, pxyzcout1 #Axis Substitution
if cuttype = two, pxyzcout2 #Polar Conversion
if cuttype = three, pxyzcout3 #Simulatneous 4 axis (Multi-axis)
if rot_ccw_pos = one, csav = -csav
if mr_rt_actv <> two,
[
pcoutrev
if index, pindxcalc
pfcalc
]
else, feed = fr_pos
]
else,
[
xabs = vequ (x)
feed = fr_pos
]
#Check flags and change orientation # - eap 1/17/03
if xflip = yes, xabs = xabs * -1 # - eap 1/17/03
if yflip = yes, yabs = yabs * -1 # - eap 1/17/03
if zflip = yes, zabs = zabs * -1 # - eap 1/17/03 Code: #Check flags and change orientation # - eap 1/17/03
if xflip = yes,
[
xabs = xabs * -1
i = i * -1
]
if yflip = yes,
[
yabs = yabs * -1
j = j * -1
]
if zflip = yes,
[
zabs = zabs * -1
k = k * -1
] Code: xflip : no #Reverse X axis orientation - eap 1/17/03 yflip : no #Reverse Y axis orientation - eap 1/17/03 zflip : no #Reverse Z axis orientation - eap 1/17/03 Code: xflip : yes #Reverse X axis orientation - eap 1/17/03 yflip : yes #Reverse Y axis orientation - eap 1/17/03 zflip : no #Reverse Z axis orientation - eap 1/17/03 |
| Sponsored Links |
|
#11
| ||||
| ||||
| Why did I think he was asking abouy a lathe post ? Mike Mattera
__________________ Tips For Manufacturing Training CD's, DVD's for Mastercam, SolidWorks, Inventor, G-Code Training & More http://www.tipsforcadcam.com |
|
#12
| ||||
| ||||
| Good Point Post_Guy. The I J K arc values also have to be flipped for the circles to come out right. It seems that code was missing from the original MPFAN. Mike Mattera
__________________ Tips For Manufacturing Training CD's, DVD's for Mastercam, SolidWorks, Inventor, G-Code Training & More http://www.tipsforcadcam.com |
![]() |
| 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 |
| Torque values | cncshaper | Stepper Motors and Drives | 2 | 11-23-2007 12:17 AM |
| Inverting a 220 to 110 v transformer | elogicca | General Electronics Discussion | 4 | 01-20-2007 11:55 AM |
| K Values And Bend Radii | lostbaka | Bending, Forging,Extrusion... | 1 | 12-04-2006 07:29 AM |
| List of L values for G10 L?? | iMisspell | G-Code Programing | 3 | 07-30-2006 11:32 PM |
| Output values?? | hop | Machine Problems, Solutions , Wireless DNC, serial port | 0 | 06-07-2006 06:37 AM |