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:

Lathe Post Variable - Tool Station Number


Recommended Posts

In the lathe toolpaths you have Tool #, Offset #, & Station #. Whst is the post variable to access the Station #?

 

I need to output T010500

where the first pair of numbers (T01)

will either be

01 = Lathe Tool

02 = Live Tool

03 = Gange Tool

For the turret position.

== This is what I want to use the Station Number for.

 

The next two digits (05) = the tool #.

The last two (00) = the offset.

No problem there.

 

Just need to know the post variable for the Station Number.

 

Thanks,

 

Mike Mattera

Link to comment
Share on other sites
  • 11 years later...

I have a question along the lines of this thread. Is there a way to access the previous variable lstation$? 

I'm pulling the data to put a line before, but it is using the next tools lstation$

prv_tldia$ and prv_tlngno$ are giving me values, but not lstation$

 

                  #START OF TOOL BREAKAGE SENSOR CODE
      if prv_tldia$ < .750,
      [
      Head_Number = lstation$
      if Head_Number = -1, 
      [
       Sensor_Tolerance = 0.2
       ]
        if Head_Number <> -1, 
      [
       Sensor_Tolerance = Head_Number /1000
       ]
             pbld, n$, "M101", prv_tlngno$, prv_tldia$, *Sensor_Tolerance, e$
       ]          
             #END OF TOOL BREAKAGE SENSOR CODE
            #pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e$
      #if nextop$ = 1003 | tlchg_home, pbld, n$, *sg28ref, "Y0.", protretinc, e$  #"X0.", - removed before Y move
      #else, pbld, n$, protretinc, e$
      absinc$ = sav_absinc
      coolant$ = sav_coolant

Link to comment
Share on other sites
5 minutes ago, cncgotoguy said:

I have a question along the lines of this thread. Is there a way to access the previous variable lstation$? 

I'm pulling the data to put a line before, but it is using the next tools lstation$

prv_tldia$ and prv_tlngno$ are giving me values, but not lstation$

 

                  #START OF TOOL BREAKAGE SENSOR CODE
      if prv_tldia$ < .750,
      [
      Head_Number = lstation$
      if Head_Number = -1, 
      [
       Sensor_Tolerance = 0.2
       ]
        if Head_Number <> -1, 
      [
       Sensor_Tolerance = Head_Number /1000
       ]
             pbld, n$, "M101", prv_tlngno$, prv_tldia$, *Sensor_Tolerance, e$
       ]          
             #END OF TOOL BREAKAGE SENSOR CODE
            #pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e$
      #if nextop$ = 1003 | tlchg_home, pbld, n$, *sg28ref, "Y0.", protretinc, e$  #"X0.", - removed before Y move
      #else, pbld, n$, protretinc, e$
      absinc$ = sav_absinc
      coolant$ = sav_coolant

Need to make sure you buffer this kind of stuff since yes it will jump ahead you need a buffer to work backwards so to speak. Paging Colin he should have a good idea and think this should get move to posts and off the main forum.

Link to comment
Share on other sites

Some variables are updated "automatically" by MP. Yet, there are some variables where the "previous" values are not automatically maintained.

You are free to add the necessary logic to "set" the "previous" values.

Go to the end of the following Post Blocks:

psof$

ptlchg$

ptlchg0$

And add the following line:

        !lstation$

That code is read as "update the 'lstation$' variable". Using the "Update" variable modifier tells MP to copy the current value of the variable to the "previous" memory address.

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