586,065 active members*
4,570 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > CamWorks > Camworks - How to use "special" characters in custom post
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2016
    Posts
    4

    Camworks - How to use "special" characters in custom post

    Hi all,

    I am currently an HSMWorks / Solidworks user and I'm trying to see if Camworks will fit my needs...
    I am trying to modify the post to output some "special" characters in the final gcode file. For example, on my machine (Fanuc 18M) I need to bring the table to a certain position at the end of the cycle. This position is stored in macro variable #531.

    My current HSMWorks code will output the following line:
    G00 G53 X[#531] Y0.0

    What I am struggling with in Camworks is how to insert the square brackets [ ] and number sign #.

    Using the EC Editor, in my SRC file I have the following:

    :SECTION=END_OF_TAPE
    :T:<N><G:00><G:91><G:28> Z0<EOL>
    :T:G00 G53 X[#531] Y0.0<EOL>
    :T:<N><M:30><EOL>

    However, when I post with this I only get the "G00 G53 X" and it seems to get confused with the square bracket. I assume these brackets are reserved for programming syntax. I have tried defining a new Attribute, but I don't think I am implementing it correctly.

    I have added this into the MILL.lib file:


    :ATTRNAME=LEFT SQ
    :ATTRTYPE=POST
    :ATTREMARK=
    :CODETYPE=HARDCODE
    :CODE=[
    :ATTREND

    :ATTRNAME=RIGHT SQ
    :ATTRTYPE=POST
    :ATTREMARK=
    :CODETYPE=HARDCODE
    :CODE=]
    :ATTREND

    And then try to use it like:

    :SECTION=END_OF_TAPE
    :T:<N><G:00><G:91><G:28> Z0<EOL>
    :T:G00 G53 X<LEFT SQ>#531<RIGHT SQ> Y0.0<EOL>
    :T:<N><M:30><EOL>

    But my output puts out literally "<LEFT SQ>". How do I call up these attributes to use them in the post?

    Any better ways to get around this? Are there any "escape characters" I can use to allow my just to type the exact text I want to see in the final posted file?

    Cheers.

  2. #2
    Join Date
    Jun 2015
    Posts
    4154

    Re: Camworks - How to use "special" characters in custom post

    hy i can help you with a small program, that will edit your file automatically, in background

    thus, you won't even know that it is there / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  3. #3
    Join Date
    Sep 2016
    Posts
    4

    Re: Camworks - How to use "special" characters in custom post

    Quote Originally Posted by deadlykitten View Post
    hy i can help you with a small program, that will edit your file automatically, in background

    thus, you won't even know that it is there / kindly
    Thanks, but I'd rather understand the syntax of these files and how to use them better so that I can make subsequent changes as I need. This is just one of several.....

  4. #4
    Join Date
    Sep 2016
    Posts
    4

    Re: Camworks - How to use "special" characters in custom post

    I have solved this issue and will follow-up with this for those in the future who run into this....

    Although I defined my custom attributes with a SPACE in between (i.e. "LEFT SQ"), you cannot reference this attribute with a space.... You need to use underscore ("LEFT_SQ"). Perhaps this is something they teach you on the first day of Camworks training Guess I missed that one.

    This line posts as expected:
    :T:G90 G53 X<LEFT_SQ><POUND_SIGN>531<RIGHT_SQ> Y0.0<EOL>

    Cheers

Similar Threads

  1. Replies: 0
    Last Post: 05-30-2021, 06:22 PM
  2. Replies: 2
    Last Post: 06-14-2013, 12:50 AM
  3. X Axis "Goes Off Pattern", "Awry", "Skewed", "Travels"
    By DaDaDaddio in forum Laser Engraving / Cutting Machine General Topics
    Replies: 1
    Last Post: 05-06-2013, 09:59 AM
  4. Special offer for users of a "CNC Zone" !
    By thecrack in forum News Announcements
    Replies: 5
    Last Post: 04-26-2011, 01:10 PM
  5. Replies: 3
    Last Post: 03-15-2010, 11:11 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •