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:

Brain fart


Recommended Posts

I'm working with the generic haas 3x post. If I create

 

ptoolcomment    #Comment for tool
      "test",e$

to test output, I get the output just fine. But when I replace the test with

ptoolcomment    #Comment for tool
      "",e$

I don't get any output. The double quote is defined. What am I doing wrong?

Link to comment
Share on other sites

This

ptoolcomment    #Comment for tool
      "test",e$
      tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
      if tool_info = 1 | tool_info = 3,
        [
        pstrtool #Convert strtool$ to uppercase if string is not empty
        scomm_fx_arg = strtool$ + sdelimiter + drs_str(2, tnote) + sdelimiter +
          drs_str(2, toffnote) + sdelimiter + drs_str(2, tlngnote) + sdelimiter + drs_str(2, tldia$)
        pcomment_out #Check comment length and output to NC file
        ]

Outputs this

G0 G17 G40 G49 G80 G90
test
(LOCATE 2 EACH 6" KURT VISES SPACED 8" APART CENTER TO CENTER)

This

ptoolcomment    #Comment for tool
      "",e$
      tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
      if tool_info = 1 | tool_info = 3,
        [
        pstrtool #Convert strtool$ to uppercase if string is not empty
        scomm_fx_arg = strtool$ + sdelimiter + drs_str(2, tnote) + sdelimiter +
          drs_str(2, toffnote) + sdelimiter + drs_str(2, tlngnote) + sdelimiter + drs_str(2, tldia$)
        pcomment_out #Check comment length and output to NC file
        ]

Outputs this

G0 G17 G40 G49 G80 G90
(LOCATE 2 EACH 6" KURT VISES SPACED 8" APART CENTER TO CENTER)
(SQUARE CUT A TOOLING BLANK TO 15.0" X 9.0" X 1.5")

Link to comment
Share on other sites

Try this

 

ptoolcomment    #Comment for tool
      tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
      if tool_info = 1 | tool_info = 3,
        [
        " ", e$
        pstrtool #Convert strtool$ to uppercase if string is not empty
        scomm_fx_arg = strtool$ + sdelimiter + drs_str(2, tnote) + sdelimiter +
          drs_str(2, toffnote) + sdelimiter + drs_str(2, tlngnote) + sdelimiter + drs_str(2, tldia$)
        pcomment_out #Check comment length and output to NC file
        ]

 

That space between the "" should get it

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