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:

home position


Jeremiah
 Share

Recommended Posts

I would like to beable to use the home postion values entered in the very first operation, through out. I am using a modified MPFAN.pst. I understand the post is using ZH,XH,YH. How can I save the values it is reading on the 1001 nci line? I did a search for home position and found several threads, but not one pertaining to saving the values. Any help would be greatly appreciated.

 

Thanks

Jeremiah

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Well,

 

If you want, you can always change those values in Screen, Configure, on the NC Settings Page. These will then be transferred into your operation. Keep in mind this will make them ALWAYS what value you have put in there and if you want to change it you'll have to do it on each operation.

 

HTH

 

[ 01-21-2003, 02:29 PM: Message edited by: James Meyette ]

Link to comment
Share on other sites

James-

Thanks for the reply. I am using home position for a safe index position and will need to change it as parts change. I don't really want our programmers having to change defaults for every part. They also snivle about having to set the values in each operation and the "edit common parameters" is not always reliable. There has to be a way to capture these intial values in the post ??

 

Jeremiah

Link to comment
Share on other sites

Here is a section of the PSOF postblock from MPFAN.PST (v9)

 

Added the declaration of 3 variables to store the initial Home Position ->

xhome, yhome, zhome

 

Then IN the PSOF postblock just transfer the value from the XH, YH, ZH variables into our new XHOME, YHOME, and ZHOME variables.

Now you've captured the initial X,Y,Z home positions and can output these coordinates where ever you need to.

 

code:

  

fmt X 2 xhome #Saved X home position

fmt Y 2 yhome #Saved Y home position

fmt Z 2 zhome #Saved Z home position

 

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

]

"%", e

*progno, e

"(PROGRAM NAME - ", sprogname, ")", e

"(DATE=DD-MM-YY - ", date, " TIME=HH:MM - ", time, ")", e

pbld, n, *smetric, e

pbld, n, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e

sav_absinc = absinc

 

# *** Save off the initial X,Y,Z home position coordiates ***

xhome = xh #Save initial X home position

yhome = yh #Save initial Y home position

zhome = zh #Save initial Z home position

 

if mi1 <= one, #Work coordinate system

[

absinc = one

pfbld, n, sgabsinc, *sg28ref, "Z0.", e

pfbld, n, *sg28ref, "X0.", "Y0.", e

"*", pfbld, n, "G92", *xh, *yh, *zh, e

absinc = sav_absinc

]

pcom_moveb

c_mmlt #Multiple tool subprogram call

ptoolcomment

comment

pcan

if stagetool >= zero, pbld, n, *t, "M6", e


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