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:

Canned text stuff


Recommended Posts

Hey all,

 

I know there is lots of good info on previous posts about this, but I just don't find what I am looking for.

 

I maybe first need something explained; At the near bottom of my post I have 3 sections that look as follows

 

[canned text]

1. "Stop - M00"

2. "Op Stop - M01"

3. "Bld on"

4. "Bld off"

5. "Dwell - G04 P1"

6. "G90 G00 Z15."

7. "G90 G00 Z5."

8. ""

9. ""

10. ""

 

They are all the same. Why is there 3 of them?

 

So, after that, obviously I have incorperated the #6 & #7 myself. Problem being that MCX does not output #6 or #7 when I select it.

 

quote:

# --------------------------------------------------------------------------

# Canned Text

# --------------------------------------------------------------------------

pcan #Canned text - before output call

strcantext = sblank

if cant_no$ > zero,

[

if cant_pos1$ = zero, pcant_1

if cant_pos2$ = zero, pcant_2

if cant_pos3$ = zero, pcant_3

if cant_pos4$ = zero, pcant_4

if cant_pos5$ = zero, pcant_5

if cant_pos6$ = zero, pcant_6

if cant_pos7$ = zero, pcant_7

if cant_pos8$ = zero, pcant_8

if cant_pos9$ = zero, pcant_9

if cant_pos10$ = zero, pcant_10

pbld, n$, strcantext, e$

strcantext = sblank

]

 

pcan1 #Canned text - with move

strcantext = sblank

if cant_no$ > zero,

[

if cant_pos1$ = one, pcant_1

if cant_pos2$ = one, pcant_2

if cant_pos3$ = one, pcant_3

if cant_pos4$ = one, pcant_4

if cant_pos5$ = one, pcant_5

if cant_pos6$ = one, pcant_6

if cant_pos7$ = one, pcant_7

if cant_pos8$ = one, pcant_8

if cant_pos9$ = one, pcant_9

if cant_pos10$ = one, pcant_10

]

if cstop$, strcantext = strcantext + sm00

if cgstop$, strcantext = strcantext + sm01

#Output of strcantext occurs at the end of the output line

 

pcan2 #Canned text - after output call

strcantext = sblank

if cant_no$ > zero,

[

if cant_pos1$ = two, pcant_1

if cant_pos2$ = two, pcant_2

if cant_pos3$ = two, pcant_3

if cant_pos4$ = two, pcant_4

if cant_pos5$ = two, pcant_5

if cant_pos6$ = two, pcant_6

if cant_pos7$ = two, pcant_7

if cant_pos8$ = two, pcant_8

if cant_pos9$ = two, pcant_9

if cant_pos10$ = two, pcant_10

pbld, n$, strcantext, e$

strcantext = sblank

]

 

pcant_1 #Canned text - output call

cantext$ = cant_val1$

pcant_out

 

pcant_2 #Canned text - output call

cantext$ = cant_val2$

pcant_out

 

pcant_3 #Canned text - output call

cantext$ = cant_val3$

pcant_out

 

pcant_4 #Canned text - output call

cantext$ = cant_val4$

pcant_out

 

pcant_5 #Canned text - output call

cantext$ = cant_val5$

pcant_out

 

pcant_6 #Canned text - output call

cantext$ = cant_val6$

pcant_out

 

pcant_7 #Canned text - output call

cantext$ = cant_val7$

pcant_out

 

pcant_8 #Canned text - output call

cantext$ = cant_val8$

pcant_out

 

pcant_9 #Canned text - output call

cantext$ = cant_val9$

pcant_out

 

pcant_10 #Canned text - output call

cantext$ = cant_val10$

pcant_out

 

pcant_out #Canned text - build the string for output

#Assign string select type outputs

if cantext$ = three, bld = one

if cantext$ = four, bld = zero

#Build the cantext string

if cantext$ = one, strcantext = strcantext + sm00

if cantext$ = two, strcantext = strcantext + sm01

if cantext$ > four,

[

strtextno = no2str(cantext$)

strcantext = strcantext + strm + strtextno

]

Now if I am not mistaken, it does call the output for #6 & 7...? So, if it does (somebody please tell me it does) why does it not output them?

 

Thanks!

Link to comment
Share on other sites

Here's one of my sectios, notice what happens

 

code:

pcant_out       #Canned text - build the string for output

if cantext$ = one, [pbld, n$, sm00, e$

pbld, n$ "(CLEAN CHIPS)", e$

]

 

if cantext$ = two, [

pbld, n$, sg00, "Z6.0", sm09, e$

pbld, n$, sg91, "G28", "Y0.", e$

pbld, n$, sm00, e$

pbld, n$, "(CHANGE CLAMPS)", e$

pbld, n$, sg00, *g_wcs, sg90, pfxout, pfyout,

*speed, sm03, e$

pbld, n$, sm08, e$

]

if cantext$ = three, [

pbld, n$, "M201", e$

]

 

if cantext$ = four, [

pbld, n$, "M200", e$

]

 

if cantext$ = five, [pbld, n$, sm00, e$

pbld, n$, "(ROTATE TO DEGREE)", e$

]

 

if cantext$ = 6, [pbld, n$, sg91, "G28", "Y0.", e$

pbld, n$, sg90, *g_wcs, "X0.", e$

pbld, n$, sm00, e$

pbld, n$, "(LOOSEN AND RETIGHT VISE)", e$

pbld, n$, "( DO NOT OVERTIGHTEN)", e$

]

 

if cantext$ = 7, [pbld, n$, sg91, "G28", "Y0.", e$

pbld, n$, sg90, *g_wcs, "X0.", e$

pbld, n$, sm00, e$

pbld, n$, "(CHANGE SCREW LOCATIONS)", e$

]

Link to comment
Share on other sites

I found when I used the spelling, the function would not work on those numbers, when I switched to the digits it output as expected.

 

I do not understand, nor did I look too deeply why it functioned that way, I kind of just went with it

Link to comment
Share on other sites

quote:

The reason that it did not work when you spelled out "six" or "seven" is that they are not initialized as variables at the top of your post.

Makes sense Colin, I never looked at why, I just tried that and then moved on

 

Thanks for the info however wink.gif

 

cheers.gif

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

Hello,

 

i won't to activate Canntext for my post.

I have add some stuff that is in the "post-book"

But the cant_pos1$ is allways "-1"  - this tells me that the Canntext is OFF - how i can activate the Canntext for my post? Is this a variable?

 

Sincerely 

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