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:

Funny canned text output...


tmachine
 Share

Recommended Posts

I just started messing with the canned text function and I am not getting very far.

 

I know that there has been quite a lot written on the canned text subject and I went back and read most of it. But I am not getting the correct output when posting.

 

I am using a stock MPMASTER.PST and .TXT file.

 

M00 and M01 will output ok, but if I select dwell (#5) and MOO (Item#1) the output is M05M00. I have tried the other options like adding a G91 G28 Z0 in #6, but the output is M06M00.

 

What I want is:

 

G91 G28 Z0

G91 G28 Y0

M00

 

But what I get is: M06M07M00 all on one line.

 

Am I missing something?

Link to comment
Share on other sites

Someone correct me if I’m wrong because I really don’t know what I’m doing but I played around with this to get it to output what I need. Here is one example: I have canned text ques. # 10 set to output a reference return on the y axis, so in the pcan_output section in my post I inserted this statement. At the beginning of my post I had to define ten as a constant also.

 

if cantext = ten,

[

n, sg91, *sg28ref, "Y0.", e

]

 

Then in my .txt file as 10. under canned text I changed the statement to “reference return y axis” this way when I open my canned text window it correctly shows what I’ve altered #10 to do. I’ve pretty much changed most of the canned text outputs to do what I need like turn my spindle back on after a program stop etc. etc. I’m sure someone else here can give you better info. Than me, I just play with stuff until it works. Remember to save a copy of your “good” file before starting though. HTH cheers.gif

Link to comment
Share on other sites

You need to look for a setion in your post where this is output. I dont understand why you are doing this with Text and not the Msi that Mpmaster has which is a Misc Real 10. If you turn it on you get this in the output for the post for the operation.

 

I have my post coded to output code this way and the end of toolchanges.

 

code:

G91 G28 Z0

M01

T1 M6

This is what I have at the end of Fadal program:

code:

G91 G28 Z0

M30

This is what I have at the end of a Haas.

code:

G91 G28 Z0

G90 G00 G154 P99 X0 Y0

M02

If you would like this as a hard code then you can write the post as a hard code if you want a switch I would use the Mi10 to do this.

Link to comment
Share on other sites

Hi Ron, cool part you posted pic.s of. I use canned text for g28 only if I use a program stop and want to check a dim. or flip parts or something of that nature. I go to a point and then insert canned text for m00 and g28 y0 both with the point. I get m00 on one line then g28 y0 on the next. I then go to another point and insert canned text that recalls my wcs,turns on my spindle, and outputs my g43 and h value on (3) seperate lines of code after the M0. I asked my dealer for help writing my post to do this after a prog. stop and was told it would get very complicated and would cost $$$$$$$$$$$$ banghead.gif so I do it with canned text. it was easier for me to figure out. I don't know how to do it with misc. int. or reals. At all tool chngs. my post outputs g28's

that wasn't too hard.

Link to comment
Share on other sites

Thanks mike_f, I am attempting your approach. I don't want this every tool change, just at certain points when I want the machine to stop as you mentioned. I can enter canned text as either part of an exsisting OP or at a point, but I get goofy output. I get M plus the number of the canned text option instead of the text itself.

 

I have tried this with other posts, mpfan, mpmeldas etc., and I get the same results.

 

My understanding is that all I should need to do is modify the post .txt file with the text that I want to input, then select it from the canned text dialog.

 

The text looks correct in the canned text dialog, just not in the posted program.

 

Here is how I edited the .txt file:

 

[canned text]

1. "Stop - M00"

2. "Op Stop - M01"

3. "Bld on"

4. "Bld off"

5. "Dwell - G04 P1"

6. "Z Return - G91 G28 Z0"

7. "Y Return - G91 G28 Y0"

8. ""

9. ""

10. ""

 

The "Z Return and the Y Return show up in the canned text dialog, but the posted output is M06M07M00 if I select 6, 7 & 1.

Link to comment
Share on other sites

I'm pretty sure that the alterations you made in the text file won't change your post output but only add the text in your canned text fields. You have to change the pcant_out section of your post. I'll give you another example of what I've done.......

if cantext = seven,

[

n, *spindle, *speed, e

n, *sgcode, *sgabsinc, *g_wcs, pfxout, pfyout, e

n, "G43", *tlngno, pfzout, *scoolant, e

]

I also had to define the constant "seven" at the beginning of the post. this turns my spindle on, re-positions my machine outputting my wcs, and outputs my g43, h# and turns my coolant back on

in three seperate lines of code. Like I said before, I really don't know what I'm doing, I just play with this stuff and look at other sections of my post trying to figure what does what. This might be a stupid way to accomplish what I want to do but it works for me. always save what you start with. Maybe someone else has a better way to do this. e-mail me if you need a better expl. of what I did. good luck cheers.gif

Link to comment
Share on other sites

That seems to work ok except it outputs twice.

 

I entered the IF cantext statement in the pcant_out section like this:

 

if cantext > four,

[

strtextno = no2str(cantext)

strcantext = strcantext + strm + strtextno

]

if cantext = six, #NEW

[

n, "G91 G28 Z0 M05", e

n, "G91 G28 Y0", e

n, "M00", e

]

 

Im MasterCam I am adding the canned text before a tool change by going into the Operation Manager parameters and clicking the Canned Text Box.

 

Any idea why I am getting it output twice? There is also an extra M06 on its own line between the two outputs.

Link to comment
Share on other sites

Ok, finished making the mods using mi10. I edited the post to add my reference lines in the pstop section and again at the ptlchg section. That way it produces the desired output before a tool change or between ops with the same tool. Also with this method, MC takes care of turning the spindle on and puts in the tool offset when bringing it back down.

 

After reading through the previous posts (search results) the first time, I was under the impression that it did not work well for some people, or that it output between depths of cut, or at every tool change etc. so I avoided it. I guess I just read the wrong ones and got confused.

In the end, it is very simple!

Again, thanks for everyone's help.

Link to comment
Share on other sites

Well guys I will tell you that you have learned a great lesson about this place. It may seem to be one way but until you get into the problem and really see what is going sometimes real hard to see what applies and will work best until you do it hands on. I am very happy you guys got and sorry I have stayed out of but as with anything esle you are there doing it yourself hard to find that perfect fix.

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