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:

Chuck Jaw parameter capture


Recommended Posts

Hi,

 

I am looking to get the info from the Z position of the chuck jaws in the Chuck Jaws properties for the main spindle on the Stock Setup page  to output it as the stroke limit on the G300 line at the beginning of a Tsugami program.

 

I looked in the parameter reference book and found it. 

 

My question is:  If you have a main and a sub spindle, are there different parameters for the two spindles?  I only see the one page in the reference book.

 

  • Like 1
Link to comment
Share on other sites

What if you want to read the parameter for output of the Z axis position of both the main chuck and the sub spindle chuck, how would you do that?  Are there different parameter numbers that go with each page?  

 

I don't actually want to read the parameter for the sub spindle.  I do want to make sure I am going to get the parameter for the Z axis position of the main chuck though. It just got me curious when I did not see a page for that in the parameter reference book.

 

I attached 2 pictures showing hopefully what I am trying to accomplish.  

G300 program example.pdf

chuck jaw page.pdf

Link to comment
Share on other sites
  • 2 weeks later...

I'm not sure I fully understand all that you're asking. As far as Z positions of your stock to the face of the jaws, that distance on the main spindle is controlled in the parameters but i usually control that length for the sub spindle within the cut off parameters. This can be controlled in the setup parameters but in the cut off op it will automatically transfer and copy all your geometry to the other chuck. As far as lines of code being in a specific location, that's going to be a post thing. Hope this helps

Link to comment
Share on other sites

Scott,

 

The issue is that Mastercam only has a "single parameter" value for the Z-Axis position of the Chuck Jaw, but you are also allowed to build a machine with multiple chucks. Because there is only a single numeric parameter to hold that Z position value, that parameter number gets overwritten. So unless you modify your logic to figure out "which" chuck is active, you don't know if you are getting the correct Z value or the Z value for the Sub Spindle.

 

Brian,

 

First, add an entry to the "17000" parameter table. (make sure you adjust the "number of entries" in the 'fprmtbl' line above):

fprmtbl 17000   8   #Table Number, Size - Machine Definition parameter table
        17391   axis_label   #Axis label - 1=X,2=Y,3=Z
        17402   rot_dir      #Rotary direction
        17408   rot_index    #Index or continuous
        17409   rot_angle    #Index step
        17410   rot_type     #Rotary type
        17101   all_cool_off #First coolant off command shuts off ALL coolant options
        17102   v9_coolant   #Use V9 coolant option
        17435   chuck_z_pos

In order to make sure you are getting the "correct" Jaw Z value, you can capture the "name" of the Axis Combination from the 20601 parameter line. The 20601 parameter string has 4 different parameters on the string. So if you use 'rparsngl', you can grab the 4th parameter, which is the name of the Axis combination being used.

 

if prmcode$ = 20601, saxis_combo = rparsngl(sparameter$, 4) #Get parameter number 4 (axis combo name) from string

 

Then, after you have setup that code to capture the Axis Combination name, make sure you have your Axis Combinations named correctly, and that you are selecting the correct Axis Combination for each toolpath. Then you can add some code to look for the Chuck Z position parameter, and only capture the value if you are using the "Left" chuck.

	  if prmcode$ = 20601,
	    [
		saxis_combo = rparsngl(sparameter$, 4) #Capture 4th parameter string
		saxis_combo = ucase(saxis_combo)       #Force uppercase for comparison
		if strstr("LEFT", saxis_combo) = one, g300 = chuck_z_pos
		else,
		  [
		  #Note: this 'else' condition is entirely optional. I just added it
		  #      to show you a potential use of the condition if needed...
                  g300 = m_one #turn G300 "off" when using Right chuck
		  ]
		]
  • Like 4
Link to comment
Share on other sites
  • 7 years later...

When I try to transfer from main to sub , my sub goes to soft limit. It’s a mazak 250msy. It seems that when the sun is home it’s at zero. But when u define it you give it a 15 or whatever the gap is …so the code ends up trying to go to B.5 which in reality it needs to be like -16 or something close …machine def issue or axis combo it’s an impost ability 

Link to comment
Share on other sites
5 hours ago, theTitaniumD said:

When I try to transfer from main to sub , my sub goes to soft limit. It’s a mazak 250msy. It seems that when the sun is home it’s at zero. But when u define it you give it a 15 or whatever the gap is …so the code ends up trying to go to B.5 which in reality it needs to be like -16 or something close …machine def issue or axis combo it’s an impost ability 

If you have a problem then is best to start your own topic not piggy back on something else.

#1 have you reached out to your seller?

#2 Can you provide a Z2G from Mastercam including the Post in it so someone can take a look?

I have programmed Twin Spindle Machines in Mastercam for almost 20 years so sorry if I am not going to have to think you needed training.

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