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:

Tool table output order?


Recommended Posts

I've already asked my reseller. Maybe someone here can help.

 

I am wanting to change the output of the "tool table" at the beginning of the program to numerical order, rather than the order they are used in the CAM.

 

My post is a modification of the "Generic Haas" post that comes with MC

 

I realize I can re-order the tools inside the CAM before posting, but if you are doing multiple operations and toolpath groups, I don't want the tool numbers moving around all the time.

 

is this possible?

Link to comment
Share on other sites

I have done what you are trying to do with buffers in the post.  I did it using two seperate buffers, one for the various numerical values and one for the string values.  I initially created a blank buffer with the maximum number of tools that I have in the machine, then placed the information for the specific tool in the corresponding location.  Example, if it is tool 10, then it went into buffer location 10.

 

I did it years ago and I don't remember all the details, but above is the general approach that I used.

 

I hope this helps.

 

Clarence

Link to comment
Share on other sites

Clarence is spot on. You have to use a Buffer File of some type. I usually use a String Buffer, if all you want is a "single" entry for each tool. Sometimes, the customer only wants a single entry, if all data is the same, but would request "multiple" entries for each tool, if the "H/D" number changes, or some other issue. This gets a little more complicated, but is still doable with Buffer Files.

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

Trying to bump this post back up.

 

I haven't been able to get anywhere with this issue.

 

The MP documentation just does not explain buffers well enough, or give any relevant examples that you can learn from.

 

As I mentioned in the OP, I have contacted my reseller, and they don't even know how to do it.

 

Thanks,

Link to comment
Share on other sites

How much Post Development experience do you already have? Are you able to define variables, and write basic logic conditions in your Post already?

 

The reason I ask is that I've taught a class in using Buffer Files in MP, but it is a fairly advanced class. If you don't have good knowledge of the MP Language, people can get lost quickly.

 

We've only ever run the Buffer Files class once, because frankly there just isn't enough demand for the course to offer it on a regular basis.

 

If you are biased towards "self-learning" and can watch videos to learn a new subject, then I'm sure we could get you the recorded version of the course and you could simply watch the videos to learn about Buffer Files. Depending on your current knowledge of Posts, this may or may not be enough for you to achieve your goal.

 

As an alternative, I also offer "one-on-one" training sessions (done online, through Go to Meeting), and I also offer post development services.

 

I'm not the only source of post knowledge available, there are certainly other 3rd party developers that do post work, and there are some other training resources, but not much for "posts" that I'm aware of. (besides the courses I've taught online through Eapprentice.  www.eapprentice.net  )

Link to comment
Share on other sites

The pre-recorded course was done in X8 or X9. I have no plans to do a "2017" version, as there is nothing specific to a Mastercam version. Buffer Files have essentially functioned the same way since Version 9.

 

The course is not free, unfortunately. Please contact "Derek AT eapprentice DOT net", (replace AT with @, and DOT with ".") For information about purchasing the course. Derek can give you pricing details, I'm not supposed to discuss pricing on this forum.

Link to comment
Share on other sites

I should mention though, that there is a whole new mechanism available for Tool Table creation in 2017. I have to explore the options and do some work with the new variables and functions before I'd feel comfortable trying to teach a new class.

 

I believe one of the new options is a mechanism to auto-sort the tool list. This is ideal because MP does all the heavy lifting for you. When I have some time, I'll see if there is an "easy way" to update this thread with some code snippets for the new Tool Table stuff.

 

There are actually many sweet bits of goodness tucked away in this new data structure and the functions allow you to search backwards and forwards, from your current place in the NCI. This is going to be an awesome and welcome enhancement to the MP Language.

  • Like 1
Link to comment
Share on other sites

And just to further clarify; both the "new" methods and the old methods are mutually exclusive. You can't mix and match them.

 

Buffer Files have many more uses than just generating a Tool Table though. So learning about buffers is still an essential part of advanced post development, and has many uses beyond tool table creation.

Link to comment
Share on other sites

Here how i made it for myself... hope that helps.


#BUFFER 1

fmt 8 size1

fmt 8 rc1

fmt 8 wc1

fbuf 1 0 80 0 1

wc1 : 1

 

#BUFFER 2

fmt 8 size2

fmt 8 rc2

fmt 8 wc2

fbuf 2 0 1 0 0

wc2 : 1

 

NumOutil_1 : 0

NumToolMin : 999

NumToolMax : 0

Idx_Start : 0

Idx_End : 0

sTool : ""

fmt 7 noutil

fmt 7 noutil510

 

 

psof$

pRead_buf #post sorted tooltable

 

pwrtt$

pWrite_buf #Store tools used

 

pRead_buf

Idx_Start = NumToolMin

Idx_End = NumToolMax

 

size2 = rbuf(1,0)

 

#Sort and post tooltable

while Idx_Start <= Idx_End, [rc2 = 1

while rc2 <= size2, [

NumOutil_1 = rbuf(2,rc2)

if NumOutil_1 = Idx_Start, [ rc1 = rc2 - 1

sTool = rbuf(1,rc1)

n$, *sTool, e$

]

 

]

Idx_Start = Idx_Start + 1

]

 

 

pWrite_buf

 

#Customize your tool string here

noutil = t$

noutil510 = t$ + 510

sTool = no2asc(35) + no2str(noutil510) + "=" + no2str(noutil) + " ( " + strtool$ + " )"

 

NumOutil_1 = t$

if NumToolMin > t$, NumToolMin = t$

if NumToolMax < t$, NumToolMax = t$

 

sTool = wbuf(1,wc1)

NumOutil_1 = wbuf (2,wc2)

Link to comment
Share on other sites

Colin,

 

I have only done very basic edits to the post so far. Mostly just deleting/adding variables to existing post lines, as I have learned what the variables output. I haven't done any formulas/logic yet, without others help that is. 

 

David,

 

Thank you for posting that section of code here. I'm afraid I just don't understand enough yet to be able to use it though. I tried copying it into my .pst and got all kinds of errors.

Link to comment
Share on other sites

psof$ and pwrtt$ postblocks should already exist in your post so pay attention to only append custom postblocks (= don't create a redundant psof$/pwrtt$ post block).

 

Then, inside Pwrite_buf postblock, you'll need to customize 'sTool' string to suit your needs. Check you have 'fs 7' (format statement) in your post and that should be OK...

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

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