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:

pwcs -mcx


HEAVY METAL
 Share

Recommended Posts

for some reason my offsets are not posting out Ex. E1,E2.

my post has the pwcs on the tool change line for start of file and null and tool change. but it is being ignored. is there a reason why.

 

 

psof0$ #Start of file for tool zero

psof$

 

psof$ #Start of file for non-zero tool number

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool$

]

 

n$, "(T)", sprogname$,"$", e$

pbld, n$, "(1)", *sgplane, '$', e$

sav_absinc = absinc$

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

pstrtool,e$

comment$

pcan

pbld, n$, "(9)", sccomp, "M03", "S100", '$', e$

n$, "(9)", "M6", *t$, '$', e$

pcan1, pbld, n$, "(9)", *speed, *spindle, '$', e$

if mi1$ > one, absinc$ = zero

pbld, n$, '(9)',pwcs, '$', e$

pbld, n$, '(9)', scoolant, '$', e$

pbld, n$, *sgcode, pfxout, pfyout, pcout, pgear, strcantext, '$', e$

pbld, n$, *sgcode, pfzout, '$', e$

pindex

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

Link to comment
Share on other sites

Does it post it at all, like on the first tool change and then not again?

 

Many posts have a switch in the top to output the wcs at alll toolchanges.

 

trying a *pwcs might have some effect as well.

Link to comment
Share on other sites

hi jg

here is the post block

pwcs #G54+ coordinate setting at toolchange

if mi1 > one,

[

sav_frc_wcs = force_wcs

if sub_level, force_wcs = zero

if workofs <> prv_workofs | (force_wcs & toolchng),

[

if sub_level, result = mprint(swrkserror)

g_wcs = workofs + 1

*g_wcs

]

force_wcs = sav_frc_wcs

!workofs

]

Link to comment
Share on other sites

Heavy,

 

You need to set the work offset number in the "Planes" button inside each toolpath. This is the offset that Mastercam reads and then outputs at the pwcs call. BTW, if the box is unchecked or if it is set to "-1" then Mastercam will assume that your work offset hasn't changed and will not output a new work offset number. The "-1" value tells Mastercam to ignore that feature (kind of like turning that switch off).

 

You can also assign a work offset to a WCS automatically if you go into the "View Manager". Use the attributes section to assign a work offset number to each plane.

 

In your pwcs postblock you have it set too:

 

g_wcs = workofs + 1

 

This means that whatever work offset number you enter in the work offsets data entry field will get the number 1 added to it. That means a work offset entry of "0" gets output as E1. I would change the g_wcs line to:

 

g_wcs = workofs

 

( just delete the + 1)

 

Then the number you enter in the work offset data entry field is the work offset you get. 0=E0, 1=E1, ect.

 

I don't know how much custom stuff you have in your post, but Mastercam X ships with two Fadal posts, a format 1 and a format 2. Both of these posts require almost no editing to get perfect Fadal code. You might consider just taking the new Fadal post for version X and making changes to it. Both post are already setup for the E series of work offsets, X style coolant options, ect. If you can't find it on the X install disk, contact your reseller. They should be able to send it to you.

 

HTH,

 

Colin Gilchrist

The Boeing Company

Link to comment
Share on other sites

i got something going on because it is not posting out a fixture off set with the first tool. my post worked fine in v9. i have been working with offsets since v8. here is what my post looks like

 

psof$ #Start of file for non-zero tool number

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool$

]

 

n$, "(T)", sprogname$,"$", e$

pbld, n$, "(1)", *sgplane, '$', e$

sav_absinc = absinc$

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

pstrtool,e$

comment$

pcan

pbld, n$, "(9)", sccomp, "M03", "S100", '$', e$

n$, "(9)", pwcs, "M6", *t$, '$', e$

pcan1, pbld, n$, "(9)", *speed, *spindle, '$', e$

if mi1$ > one, absinc$ = zero

pbld, n$, '(9)', scoolant, '$', e$

pbld, n$, *sgcode, pfxout, pfyout, pcout, pgear, strcantext, '$', e$

pbld, n$, *sgcode, pfzout, '$', e$

pindex

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

Link to comment
Share on other sites

i want to force the fixture offset out here .this what i changed(if mi1$ => one & workofs$ <> prv_workofs$) but it is just posting a blank line with($) does anyone know what is wrong with this code. this whole problem started when i went to transform some ops to run on two pallets

 

 

 

 

ptlchg0$ #Call from NCI null tool change (tool number repeats)

pcuttype

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

comment$

pcan

pbld, n$, '(1)', sgplane, '$', e$

if prv_spdir2 <> spdir2, pbld, n$, "(9)", *sm05, '$', e$

if prv_speed <> speed | prv_spdir2 <> spdir2,

pbld, n$, "(9)", *speed, *spindle, pwcs, pgear, '$', e$

pbld, n$, '(9)', scoolant, '$', e$

if mi1$ => one & workofs$ <> prv_workofs$,

[

sav_absinc = absinc$

absinc$ = zero

pbld, n$, "(9)", pwcs, "$", e$

pbld, n$, "(0)", pfxout, pfyout, pfcout, '$', e$

pbld, n$, "(0)",pfzout, '$', e$

pe_inc_calc

ps_inc_calc

absinc$ = sav_absinc

]

if cuttype = zero, ppos_cax_lin

if gcode$ = one, plinout

else, prapidout

pcom_movea

c_msng$ #Single tool subprogram call

Link to comment
Share on other sites

Heavy,

 

You're going to have to do more trouble shooting. The code itself as you posted doesn't look bad that I can see (hard to tell though). A couple of quick suggestions to fix these issues. Go into your control definition, under the files tab and set the keep error file to "On fatal and non-fatal errors" and set the message option to "All error messages to file". This will produce a .err file in your nci directory with all the errors encountered during posting. If you just updated the file there is a good possibility that something hasn't been defined properly in X or there is some other random error.

 

Also, try throwing in a:

"!", ~workofs$, prv_workofs$, e$

before the:

if mi1$ => one & workofs$ <> prv_workofs$,

line you just added. This will show you what the values are and let you know the post is at least getting to that point. If nothing is output, then the post isn't making it to this statement and you need to move the statement closer to the pwcs statement until you find the road block.

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...