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:

HMC 0 degree position


Recommended Posts

Greetings All...

 

I use MPMaster.pst with mpmaster_horizontal.mmd-9, that the machine 0 degree position was at left side not front.

I have select the axis that lies along the 0 degree position of the rotary axis like this picture.

hmc-0.jpg

 

But that always output C0 with front side.

What parameter that I need to modify..??

 

Thanks...

 

 

 

Link to comment
Share on other sites

Well that post doesn't have the mat functions in it that the 5 Axis posts do. Might need to make a math function that add a vaule to the C axis output. Colin should have a good suggestion on how to approach it. Shoot the webmaster your sim information so they can validate your company and then you should see more responses.

 

Welcome to the forum.

Link to comment
Share on other sites

Unfortunately, that "0.0 degree position" option isn't "hooked up" to anything inside the post.

 

Mastercam post processors are setup with the "MP.DLL" post engine (the dynamic linked library), setup to do most of the "heavy lifting" for you. What this means is the MP engine is setup to process and calculate things a certain way, based on "conventions" that were setup a long time ago.

 

So, if you want to follow the "programming conventions" that Mastercam setup to work with the "default" values in the post, then everything is "easy".

 

What you want to do; which is use a "non-standard" way of setting up Mastercam and the Post, to drive output for your machine.

 

The biggest "convention" that you have to either work with, or overcome, is the way that Mastercam's MP.DLL uses "Planes" to automatically calculate Rotary output angles. There are two basic formats:

 

Top/Top - Top WCS, Top T/C Planes, mean that you can use X or Y as the Rotary axis. Which one you use is "up to you", but you must be consistent about how you create your planes. So if you are rotating on the X Axis, all of your T/C Planes must have the X+ direction remain fixed, and each Tool Plane must be a rotation of the Gnomon (XYZ Triad), that is rotated about the X+ axis.

 

The same is true if you are rotating about "Y". All planes must be a rotation where the Y+ direction is "fixed" and all the planes have the Y direction constant.

 

Those are the two options for "VMC" or Vertical programming.

 

For a Horizontal machine, MP.DLL expects you to use Top/Front for your programming. That is the "Top - WCS", and the "Front" T/C Plane.

 

All rotations for a Horizontal machine must use the "Front" plane as "B0.0", and the plane must be rotated about the "Front Y+ Axis". As long as all your planes are "Front" based, and the Y Axis remains fixed, you are good to go.

 

 

Now, you've got a situation with your machine where the "conventions" of the  machine, where the Rotary B0.0 face does not match the Front Plane in Mastercam.

 

So, you are in a bit of a pickle. Now fortunately, I am pretty well versed in the Rotary Processing aspects of the MP.DLL engine.

 

The main variable inside the MP-based post processors that controls "Rotary Processing" is 'rotaxtyp$'.

 

'rotaxtyp$' is the secret. Based on the value of this variable, MP.DLL can be configured to process many different types of rotary motion. The "main" use is for controlling 4 Axis configuration, but you can also setup 5X or Mill-Turn plane processing, by changing the value of 'rotaxtyp$'.

 

For the variable, there are several different settings that tell MP how to process planes, and which "plane" is the "0.0 Reference Plane".

 

The values are as follows:

 

-3 = Single Axis Rotation. Sets the reference tool plane to the Right Side Plane view for 'c$' angle equal to 0. Rotation is about the Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CCW positive.

 

-2 = Single Axis Rotation. Sets the reference tool plane to the Front Plane view for 'c$' angle equal to 0. Rotation is about the Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CCW positive.

 

-1 = Single Axis Rotation. Sets the reference tool plane to the Top Plane view for 'c$' angle equal to 0. Rotation is about the X or Y axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y.

 

0 = Single Axis Rotation. Sets the reference tool plane matrix to the First Operation View in the NCI file for 'c$' angle equal to 0. Rotation is about the X, Y, or Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y or Z.

 

1 = Single Axis Rotation. Sets the reference tool plane to the Top Plane view for 'c$' angle equal to 0. Rotation is about the X or Y axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y. This is identical to the '-1' setting.

 

2 = 5 Axis Rotation. Intended for rotary motion in Tables. Tool Plane Tool Paths: must be supported in the post customization file by calls to the postblock 'pmx0$' pm every motion post block call. The post writer is responsible for all rotary calculations and position mapping.

 

3 = Mill/Turn Applications. Resolves 'a$' and 'c$' angles when rotated about the X Axis.

   Cross: the base view must be "BACK (view 3)" for 'c$' angle equal to zero. 'c$' is returned in the range 0-360, CCW positive. 'a$' os returned as '0.0'.

   Face: the base view must be view "RIGHT SIDE (view 5)" for 'c$' angle equal to zero. 'c$' is returned in the range 0-360 degrees, CCW positive. 'a$' is returned as '90'.

   Back Face: the base view must be "Left Side (view 6) for c$ angle equal to zero. 'c$' is returned in the range 0-360 degrees, CCS positive. 'a$' is returned as '-90'.

 

4 = 5 Axis Rotation. Intended for rotary motion in the head. Tool Plane Tool Paths: must be supported in the post customization file by calls to the postblock 'pmx0$' pm every motion post block call. The post writer is responsible for all rotary calculations and position mapping.

 

5 = Shuts of rotation. No mapping or calculations are performed for Tool Plane Positioning. Post writer is responsible for all angle calculations, although post may not call post blocks in the "expected" order, so care is needed in testing for proper output.

 

6 or Greater = Allows rotary support in the post customization file by making the call to 'pmx0$' on every motion postblock call from 'prapid$' to 'pg32e$'. (See database order (mill/lathe) in Volume 3). Calls for the output postblocks are limited to those normally called with 2D and 3D contour motion. The post writer is responsible for all rotary calculations and position mapping. (Note: 'rotaxtyp$' should be set to a large value (example: 9999) to allow future expansion of this variable by CNC Software.)

  • Like 2
Link to comment
Share on other sites

Unfortunately, that "0.0 degree position" option isn't "hooked up" to anything inside the post.

 

Mastercam post processors are setup with the "MP.DLL" post engine (the dynamic linked library), setup to do most of the "heavy lifting" for you. What this means is the MP engine is setup to process and calculate things a certain way, based on "conventions" that were setup a long time ago.

 

So, if you want to follow the "programming conventions" that Mastercam setup to work with the "default" values in the post, then everything is "easy".

 

What you want to do; which is use a "non-standard" way of setting up Mastercam and the Post, to drive output for your machine.

 

The biggest "convention" that you have to either work with, or overcome, is the way that Mastercam's MP.DLL uses "Planes" to automatically calculate Rotary output angles. There are two basic formats:

 

Top/Top - Top WCS, Top T/C Planes, mean that you can use X or Y as the Rotary axis. Which one you use is "up to you", but you must be consistent about how you create your planes. So if you are rotating on the X Axis, all of your T/C Planes must have the X+ direction remain fixed, and each Tool Plane must be a rotation of the Gnomon (XYZ Triad), that is rotated about the X+ axis.

 

The same is true if you are rotating about "Y". All planes must be a rotation where the Y+ direction is "fixed" and all the planes have the Y direction constant.

 

Those are the two options for "VMC" or Vertical programming.

 

For a Horizontal machine, MP.DLL expects you to use Top/Front for your programming. That is the "Top - WCS", and the "Front" T/C Plane.

 

All rotations for a Horizontal machine must use the "Front" plane as "B0.0", and the plane must be rotated about the "Front Y+ Axis". As long as all your planes are "Front" based, and the Y Axis remains fixed, you are good to go.

 

 

Now, you've got a situation with your machine where the "conventions" of the  machine, where the Rotary B0.0 face does not match the Front Plane in Mastercam.

 

So, you are in a bit of a pickle. Now fortunately, I am pretty well versed in the Rotary Processing aspects of the MP.DLL engine.

 

The main variable inside the MP-based post processors that controls "Rotary Processing" is 'rotaxtyp$'.

 

'rotaxtyp$' is the secret. Based on the value of this variable, MP.DLL can be configured to process many different types of rotary motion. The "main" use is for controlling 4 Axis configuration, but you can also setup 5X or Mill-Turn plane processing, by changing the value of 'rotaxtyp$'.

 

For the variable, there are several different settings that tell MP how to process planes, and which "plane" is the "0.0 Reference Plane".

 

The values are as follows:

 

-3 = Single Axis Rotation. Sets the reference tool plane to the Right Side Plane view for 'c$' angle equal to 0. Rotation is about the Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CCW positive.

 

-2 = Single Axis Rotation. Sets the reference tool plane to the Front Plane view for 'c$' angle equal to 0. Rotation is about the Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CCW positive.

 

-1 = Single Axis Rotation. Sets the reference tool plane to the Top Plane view for 'c$' angle equal to 0. Rotation is about the X or Y axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y.

 

0 = Single Axis Rotation. Sets the reference tool plane matrix to the First Operation View in the NCI file for 'c$' angle equal to 0. Rotation is about the X, Y, or Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y or Z.

 

1 = Single Axis Rotation. Sets the reference tool plane to the Top Plane view for 'c$' angle equal to 0. Rotation is about the X or Y axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y. This is identical to the '-1' setting.

 

2 = 5 Axis Rotation. Intended for rotary motion in Tables. Tool Plane Tool Paths: must be supported in the post customization file by calls to the postblock 'pmx0$' pm every motion post block call. The post writer is responsible for all rotary calculations and position mapping.

 

3 = Mill/Turn Applications. Resolves 'a$' and 'c$' angles when rotated about the X Axis.

   Cross: the base view must be "BACK (view 3)" for 'c$' angle equal to zero. 'c$' is returned in the range 0-360, CCW positive. 'a$' os returned as '0.0'.

   Face: the base view must be view "RIGHT SIDE (view 5)" for 'c$' angle equal to zero. 'c$' is returned in the range 0-360 degrees, CCW positive. 'a$' is returned as '90'.

   Back Face: the base view must be "Left Side (view 6) for c$ angle equal to zero. 'c$' is returned in the range 0-360 degrees, CCS positive. 'a$' is returned as '-90'.

 

4 = 5 Axis Rotation. Intended for rotary motion in the head. Tool Plane Tool Paths: must be supported in the post customization file by calls to the postblock 'pmx0$' pm every motion post block call. The post writer is responsible for all rotary calculations and position mapping.

 

5 = Shuts of rotation. No mapping or calculations are performed for Tool Plane Positioning. Post writer is responsible for all angle calculations, although post may not call post blocks in the "expected" order, so care is needed in testing for proper output.

 

6 or Greater = Allows rotary support in the post customization file by making the call to 'pmx0$' on every motion postblock call from 'prapid$' to 'pg32e$'. (See database order (mill/lathe) in Volume 3). Calls for the output postblocks are limited to those normally called with 2D and 3D contour motion. The post writer is responsible for all rotary calculations and position mapping. (Note: 'rotaxtyp$' should be set to a large value (example: 9999) to allow future expansion of this variable by CNC Software.)

 

There you go again breaking out that secret decoder ring. :unworthy: :unworthy: :unworthy: Thanks for the detailed information. More copied and pasted into my forum stuff.

Link to comment
Share on other sites

So, knowing all that, where does that leave you for your situation???

 

There are several places inside the post processor where "rd_md$" is called. This is the call to "read machine parameters". Leave these alone.

 

The place you need to make an edit is in 'psynclath$'. This is where the "decision" is made on what type of machine you are programming for (vertical vs. horizontal), and is where we can override the post settings.

 

Original:

psynclath$      #Read NCI Axis-Combination (950) line
      pset_mach   #Set rotary switches by reading machine def parameters
      #Rotaxtyp = 1 sets initial matrix to top
      #Rotaxtyp = -2 sets initial matrix to front
      if vmc, rotaxtyp$ = one
      else, rotaxtyp$ =  -2

Modified:

psynclath$      #Read NCI Axis-Combination (950) line
      pset_mach   #Set rotary switches by reading machine def parameters
      #Rotaxtyp = 1 sets initial matrix to top
      #Rotaxtyp = -2 sets initial matrix to front
      
      rotaxtyp$ = 0 #Set initial view to first view encountered in NCI file.

      #NOTE: To use this setting, your First Operation in your NCI file MUST, MUST
      #      start at "B0.0". If that is the "LEFT" side, use that T Plane as your
      #      First Operation. If you do not want to "machine" at B0.0, then simply
      #      use a "Point Operation", and set a Z value of a Clearance Point for the
      #      first tool used in the program. All subsequent T Planes of the program must
      #      be a rotation of the "initial B0.0" view, where one axis (X, Y, or Z)
      #      remains constant. If your planes are not created correctly, you will
      #      get an error: "Only single-axis rotation is allowed! Angles may be incorrect!"

As I mentioned in the comment above, you must program the first operation in Every Program, to use the "Left side Plane" as the first plane encountered. Each subsequent T-Plane should have the Left Side rotated, about the Y axis of the T-Plane.

Link to comment
Share on other sites

Hi Ron,

 

That info is copied, verbatim, from the Volume 2, MP Post Guide, Chapter 6: Rotary Processing. All this info is "available" if you have the documentation. However, as you've probably experienced, it is not the easiest info to decipher.

 

That description has remained the same since at least V9, and probably a little earlier (V6 or V7?) Prior to V6, the entire posting mechanism was different, but it's been this way now for 20+ years.

 

That said, Volume 1 of the MP Post Guide is 209 pages, Volume 2 is 141 pages, and Volume 3 (language reference) is a whopping 1090 pages. Add in the "NCI and Parameter Ref Guide (at 465 pages), and you've got almost 2,000 pages of information that describe the MP Language, and it's respective functions. It's a lot to go through, even when that is your job...

Link to comment
Share on other sites
  • 1 month later...

Thanks... 

 

I try to modify the pxyzcout with coffset

 

coffset : 90

 

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_cw_pos & vmc, csav = -csav
        if not(rot_cw_pos) & not(vmc), csav = -csav
        csav = csav + coffset 
Link to comment
Share on other sites

Unfortunately, that "0.0 degree position" option isn't "hooked up" to anything inside the post.

 

Mastercam post processors are setup with the "MP.DLL" post engine (the dynamic linked library), setup to do most of the "heavy lifting" for you. What this means is the MP engine is setup to process and calculate things a certain way, based on "conventions" that were setup a long time ago.

 

So, if you want to follow the "programming conventions" that Mastercam setup to work with the "default" values in the post, then everything is "easy".

 

What you want to do; which is use a "non-standard" way of setting up Mastercam and the Post, to drive output for your machine.

 

The biggest "convention" that you have to either work with, or overcome, is the way that Mastercam's MP.DLL uses "Planes" to automatically calculate Rotary output angles. There are two basic formats:

 

Top/Top - Top WCS, Top T/C Planes, mean that you can use X or Y as the Rotary axis. Which one you use is "up to you", but you must be consistent about how you create your planes. So if you are rotating on the X Axis, all of your T/C Planes must have the X+ direction remain fixed, and each Tool Plane must be a rotation of the Gnomon (XYZ Triad), that is rotated about the X+ axis.

 

The same is true if you are rotating about "Y". All planes must be a rotation where the Y+ direction is "fixed" and all the planes have the Y direction constant.

 

Those are the two options for "VMC" or Vertical programming.

 

For a Horizontal machine, MP.DLL expects you to use Top/Front for your programming. That is the "Top - WCS", and the "Front" T/C Plane.

 

All rotations for a Horizontal machine must use the "Front" plane as "B0.0", and the plane must be rotated about the "Front Y+ Axis". As long as all your planes are "Front" based, and the Y Axis remains fixed, you are good to go.

 

 

Now, you've got a situation with your machine where the "conventions" of the  machine, where the Rotary B0.0 face does not match the Front Plane in Mastercam.

 

So, you are in a bit of a pickle. Now fortunately, I am pretty well versed in the Rotary Processing aspects of the MP.DLL engine.

 

The main variable inside the MP-based post processors that controls "Rotary Processing" is 'rotaxtyp$'.

 

'rotaxtyp$' is the secret. Based on the value of this variable, MP.DLL can be configured to process many different types of rotary motion. The "main" use is for controlling 4 Axis configuration, but you can also setup 5X or Mill-Turn plane processing, by changing the value of 'rotaxtyp$'.

 

For the variable, there are several different settings that tell MP how to process planes, and which "plane" is the "0.0 Reference Plane".

 

The values are as follows:

 

-3 = Single Axis Rotation. Sets the reference tool plane to the Right Side Plane view for 'c$' angle equal to 0. Rotation is about the Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CCW positive.

 

-2 = Single Axis Rotation. Sets the reference tool plane to the Front Plane view for 'c$' angle equal to 0. Rotation is about the Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CCW positive.

 

-1 = Single Axis Rotation. Sets the reference tool plane to the Top Plane view for 'c$' angle equal to 0. Rotation is about the X or Y axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y.

 

0 = Single Axis Rotation. Sets the reference tool plane matrix to the First Operation View in the NCI file for 'c$' angle equal to 0. Rotation is about the X, Y, or Z axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y or Z.

 

1 = Single Axis Rotation. Sets the reference tool plane to the Top Plane view for 'c$' angle equal to 0. Rotation is about the X or Y axis of the WCS. 'c$' is returned in the range of 0-360 degrees, CW positive about X, CCW positive about Y. This is identical to the '-1' setting.

 

2 = 5 Axis Rotation. Intended for rotary motion in Tables. Tool Plane Tool Paths: must be supported in the post customization file by calls to the postblock 'pmx0$' pm every motion post block call. The post writer is responsible for all rotary calculations and position mapping.

 

3 = Mill/Turn Applications. Resolves 'a$' and 'c$' angles when rotated about the X Axis.

   Cross: the base view must be "BACK (view 3)" for 'c$' angle equal to zero. 'c$' is returned in the range 0-360, CCW positive. 'a$' os returned as '0.0'.

   Face: the base view must be view "RIGHT SIDE (view 5)" for 'c$' angle equal to zero. 'c$' is returned in the range 0-360 degrees, CCW positive. 'a$' is returned as '90'.

   Back Face: the base view must be "Left Side (view 6) for c$ angle equal to zero. 'c$' is returned in the range 0-360 degrees, CCS positive. 'a$' is returned as '-90'.

 

4 = 5 Axis Rotation. Intended for rotary motion in the head. Tool Plane Tool Paths: must be supported in the post customization file by calls to the postblock 'pmx0$' pm every motion post block call. The post writer is responsible for all rotary calculations and position mapping.

 

5 = Shuts of rotation. No mapping or calculations are performed for Tool Plane Positioning. Post writer is responsible for all angle calculations, although post may not call post blocks in the "expected" order, so care is needed in testing for proper output.

 

6 or Greater = Allows rotary support in the post customization file by making the call to 'pmx0$' on every motion postblock call from 'prapid$' to 'pg32e$'. (See database order (mill/lathe) in Volume 3). Calls for the output postblocks are limited to those normally called with 2D and 3D contour motion. The post writer is responsible for all rotary calculations and position mapping. (Note: 'rotaxtyp$' should be set to a large value (example: 9999) to allow future expansion of this variable by CNC Software.)

 

I learn more....

Thank you very much...

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