Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Change A output on Mpmaster to work on Fadals.


crazy^millman
 Share

Recommended Posts

Ok this is going to be a big post and sorry for that in advance and thanks also for any that want to respond to this one.

 

This is what the MPFADAL2 post has for variables.

code:

scaxadrs     A     #Address for the rotary axis

scaxminus A- #Address for the rotary axis (signed motion)

Then this is the Code for the caluctions for that in MPFADAL2 as best I can tell

code:

pcoutrev        #Rotary axis revolution calculation (Modify for wind-up)

cdelta = csav - prv_csav

while abs(cdelta) > ctol, #If motion exceeds ctol, add wind-up

[

if cdelta > zero,

[

rev = rev - one

cdelta = cdelta - 360

]

else,

[

rev = rev + one

cdelta = cdelta + 360

]

]

if cuttype <> one, cabs = rev * 360 + csav

else, cabs = sav_rev * 360 + csav

!csav

sav_cabs = cabs

if index <> 1,

[

#Keep tablebetween 0 - 360

while cabs < 0 & absinc <> 1, cabs = cabs + 360

while cabs > 360 & absinc <> 1, cabs = cabs - 360

 

# Calc signed direction. Not sure why I need to flop indx_mc

 

#Phase shift delta 10 revolutions, check odd/even

if frac(int((cdelta + 3600)/180)/two), indx_mc = zero #indx_mc = one

else, indx_mc = one #indx_mc = zero

if cdelta < 0, indx_mc = zero

else, indx_mc = one

if indx_mc = one, result = nwadrs(scaxadrs, cabs)

else, result = nwadrs(scaxminus, cabs)

]

 

 

 

pindxcalc #Index move calculations, direction is shortest

#Check if in tolerance

cdelta = frac(abs(csav)/ctable)

if cdelta > ixtol & cdelta < 1-ixtol,

result = mprint(sindxerror)

cdelta = prvcabs - cabs

#Phase shift delta 10 revolutions, check odd/even

if frac(int((cdelta + 3600)/180)/two), indx_mc = one

else, indx_mc = zero

if indx_mc = one, result = nwadrs(scaxadrs, indx_out)

else, result = nwadrs(scaxminus, indx_out)

 

#Set range 0-360

indx_out = csav

 

while indx_out < 0, indx_out = indx_out + 360

while indx_out > 360, indx_out = indx_out - 360

So I put the same variable values in MPMASTER. I have done this for E offset fixture and it works great. As well as the Mi1 Misc function for all the workofs calls and all with that and it works good.

 

 

So using my logic I went to the same place and found this and tried to replace it to see if it would work it did not do right.

 

code:

 pcoutrev        #Rotary axis revolution calculation (Modify for wind-up)

cdelta = csav - prv_csav

while abs(cdelta) > ctol, #If motion exceeds ctol, add wind-up

[

if cdelta > zero,

[

rev = rev - one

cdelta = cdelta - 360

]

else,

[

rev = rev + one

cdelta = cdelta + 360

]

]

if cuttype <> one, cabs = rev * 360 + csav

else, cabs = sav_rev * 360 + csav

if (cuttype = zero | opcode = 3 | (gcode = 0 & cuttype <> one)) & one_rev = one,

[

while fmtrnd(cabs) >= 360,

[

cabs = cabs - 360

rev = rev - 1

]

while fmtrnd(cabs) < 0,

[

cabs = cabs + 360

rev = rev + 1

]

#while fmtrnd(cabs) < -360,

# [

# cabs = cabs + 720

# rev = rev + 2

# ]

if abs(cdelta) >= 0.0005, prv_cabs = c9k

]

!csav

 

pindxcalc #Index move calculations, direction is shortest

#Check if in tolerance

cdelta = frac(abs(csav)/ctable)

if cdelta > ixtol & cdelta < 1-ixtol,

result = mprint(sindxerror)

cdelta = prvcabs - cabs

#Phase shift delta 10 revolutions, check odd/even

if frac(int((cdelta + 3600)/180)/two), indx_mc = one

else, indx_mc = zero

 

#Set range 0-360

indx_out = csav

 

while indx_out < 0, indx_out = indx_out + 360

while indx_out > 360, indx_out = indx_out - 360

Fadal are not like most machines they use the A- in a weird way if you say -315 it will not be where you would think it would be. The MPFADAL2 post does it good even with Multiaxis toolpaths but no where the same ability with all the Definitions that MPMaster does.

 

Example of code produced by both is in the FTP under All NC Prgorams NC program T is made by Mpmaster and T2 is made by MpFadal.

 

Crazy Millman confused.gifconfused.gif

Link to comment
Share on other sites

Not shure what output you want?

 

scaxadrs A #Address for the rotary axisscaxminus A- #Address for the rotary axis (signed motion)

 

 

From master

 

# Table rotation direction

# Table rotation direction, index

sindx_cw M22 #Rotate CW code

sindx_ccw M21 #Rotate CCW code

sindx_mc #Target for string

 

fstrsel sindx_cw indx_mc sindx_mc

 

 

Change

# Table rotation direction

# Table rotation direction, index

sindx_cw A #Rotate CW code

sindx_ccw -A #Rotate CCW code

sindx_mc #Target for string

 

fstrsel sindx_cw indx_mc sindx_mc

I did the same thing on my okuma4th

I made M16 Modal M15 Modal for output

only when dir. change

Was

pindex #Index output

if index & rot_on_x,

[

pbld, n, `sindx_mc, indx_out, e

!cabs, !cinc

]

To

pindex #Index output

if index & rot_on_x,

[

sav_mcode = indx_mc

sav_mcode = zero

pbld, n, `sindx_mc, indx_out, e

!cabs, !cinc

]

Link to comment
Share on other sites

Nope Md I didnt care about using the same variables just wanted it to output the negateive of the postive values and pistive of the negative value it is the way the Fadals Work. I took out the M21 and M22 in the post so will have to put it back in there no problem though. I will give that a try I appericate you sharing that with me.

 

No Problem Sharing Webmaster I sent Dave my modified HTML set-up sheet for fadals.

 

If anyone wants it email me I have zipped and will email you it all back.

 

Crazy Millman

Link to comment
Share on other sites

When I made my Okuma-4th work I used my Okuma pst

and took the rotation fromulas from Fadal post put it in Okuma pst added some formulas and outputs made M15 M16 modal and it worked. That old Fadal pst works real good on 4-th direction changes.

Link to comment
Share on other sites

Ok I have looked at this again. I understand what each post is doing expect for the part where the guy put this:

quote:

# Calc signed direction. Not sure why I need to flop indx_mc

I did not put this in the Mpfadl post the orignal person did. I think this is where they changed the postive value to a negative value or I am thinking they dont and just use a A or A- with the move they want it to match to. I really could care less at this point if you gave me the MPMASTERFADAL post I want to figure this one out.

 

Crazy millman

 

PS Md we do not use the mcode to change direction that is what the A and A- are for on the Fadals. I tried that didnt work either.

 

[ 09-11-2003, 01:19 AM: Message edited by: Millman^crazy ]

Link to comment
Share on other sites

You need to add output this might fix it.

 

# --------------------------------------------------------------------------

# Rotary Axis Settings

# --------------------------------------------------------------------------

 

 

scaxadrs A #Address for the rotary axis

scaxminus -A #Address for the rotary axis (signed motion)

 

You still might need to track more down

But I think That should fix it.

 

add

 

Table rotation direction

# Table rotation direction, index

sindx_cw A #Rotate CW code

sindx_ccw -A #Rotate CCW code

sindx_mc #Target for string

 

fstrsel sindx_cw indx_mc sindx_mc

 

and force output

 

[ 09-11-2003, 01:20 PM: Message edited by: md ]

Link to comment
Share on other sites

Well I have to eat some humble pie here on this on. Dave and MD was able to point me in the right direction on this one. It was in the Variable call needed to have it using a A and A- call as a defintion verse just one defintion for the Axis.

 

Well I think I got it licked so appericate all the Help.

 

Crazy millman

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...