584,837 active members*
4,895 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > EdgeCam > Add token in code constructor
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2014
    Posts
    18

    Add token in code constructor

    Hello guys, there is a way to add another token in code construction tab?
    thanks

  2. #2
    Join Date
    Jun 2008
    Posts
    125

    Re: Add token in code constructor

    Yes you can. How confident are you with Code Wizard? Look in your Code Wizard help (at least from 2012r1) for CGE - Code Generator Extension.
    Attached Thumbnails Attached Thumbnails CGE.jpg  

  3. #3
    Join Date
    Apr 2014
    Posts
    18

    Re: Add token in code constructor

    hi meegers, thanks for the help
    i studied the cxt file, i understood a bit of language, I also have a code generetor guide.
    i read about cge but i don't understand one thing:
    i neet to create a cge file with editor?
    and after i have to follow the procedure "compile cge" or "import cge"?

  4. #4
    Join Date
    Apr 2014
    Posts
    18

    Re: Add token in code constructor

    I read this from code wizard help:

    [I]Working with CGEs - Source Files
    The top level CGS file must contain basic version and type information as set out here:
    ;TEMPLATE=AUTOLATHE=EXTENSION 3
    ;VERSION^Test Extension^2010.02.11^05/11/09^RHA
    The first line denotes the template type and extension name. Allowable types are AUTOLATHE and AUTOMILL (denoting adaptive lathe and mill templates). The extension name is used for identification purposes and must be unique.
    The second line specifies a description, version number and date. The version number shown conforms to the template versioning format in Edgecamversion.release.month (for example 2010.02 is 2010 R2). The last entry is the author

  5. #5
    Join Date
    Jun 2008
    Posts
    125

    Re: Add token in code constructor

    Yeah it's a little tricky. When I'm back at work on Monday I'll dig out the code I used and see if I can explain in clearer terms!

  6. #6
    Join Date
    Apr 2014
    Posts
    18

    Re: Add token in code constructor

    thanks meegers

  7. #7
    Join Date
    Jun 2008
    Posts
    125

    Re: Add token in code constructor

    This is some code from a cgs we use ......

    **** Header of CGS

    * ;TEMPLATE=AUTOLATHE=EXAMPLE 1

    ;TEMPLATE=AUTOLATHE=G&L VTC2500 EXTENSION

    ;VERSION^CGE include file^2013.10.02^30/08/13^MME

    ************************************************** ********

    **** New variable can be declared (must be outside macros, procedures...)

    %DECLARE=#AUTOTOOLCHANGE,#WINTOOLONLY

    ************************************************** ******
    **** New Machine declaration for Qxxx declaration
    * No replacement, only addition

    %MACHINE=LATHE=G&L VTC2500
    Q525=_radio=Toolchange Type^Auto^Manual[15]
    Q526=_radio=WinTool Only or Output^Output^Don't Output[15]
    %ENDMACH

    ************************************************** ********
    **** Macro/Procedure replacement

    %MACRO=15=TL=Toolchange=8,12,13,24,80,47,48,16,15, 201,202,203,206,525,526,
    $SPC=" "; Reset trace spacing
    #MACRO=15
    %IF #NCSUPPRESS=1 %THEN MASK=1
    #AUTOTOOLCHANGE=UNVAR525
    #WINTOOLONLY=UNVAR526
    %CALL=PMACRO-15
    %ENDM

    %MACRO=165=TL=Toolchange=8,12,13,24,80,47,48,16,15 ,201,202,203,206,525,526
    $SPC=" "; Reset trace spacing
    #MACRO=165
    %IF #NCSUPPRESS=1 %THEN MASK=1
    #AUTOTOOLCHANGE=UNVAR525
    #WINTOOLONLY=UNVAR526
    %CALL=PMACRO-165
    %ENDM


    Save this as a CGS file. Then open up code wizard and 'compile CGE'. Code Wiz will then create a CGE from your CGS.
    I'd then close down the Code Wiz and restart it. Open up your post that you want to add/modify and then chose the 'Import CGE' option from the File menu, and then compile.

  8. #8
    Join Date
    Apr 2014
    Posts
    18

    Re: Add token in code constructor

    sorry, i don't understand why i can't see the my new token.
    this is the cgs text (are the first and the second line correct?)

    ;TEMPLATE=AUTOLATHE=EXTENSION 1
    ;VERSION^CGE include file^2014.10.02^12/05/14^PQU
    * token per Setup Dati Lista Utensili
    %CALL=CODECON_SET-TOOLING-DATA
    ;Use Tokens^DELETE^BLKNUM^TURRETNO^LENGTHOFFSET^XGAUGEL ENGTH^ZGAUGELENGTH
    ;Use Tokens^TOOLDIAM^TOOLRADIUS^CORNER^REACH^NOSERAD-X^NOSERAD-Z
    ;Use Tokens^LBRKT^RBKT^TOOLUNITS^TSTORE_USER1^TSTORE_US ER2^TSTORE_STRING1^TSTORE_STRING2^TOOL-ANGLE^TOOL_GROUP^TOOL_GROUP_NUMBER^TOOL_GROUP_TEXT ^TOOL_ID^TOOL_ID_NUMBER^TOOL_ID_TEXT
    ;Use Tokens^USER-1^USER-2^USER-3^USER-4^USER-5^USER-6^USER-7^USER-8^USER-9^USER-10^USER-11^USER-12^USER-13^USER-14^USER-15^USER-16^USER-17^USER-18^USER-19^USER-20^USER-STRING^USER-STRING-1^USER-STRING-2^USER-STRING-3^USER-STRING-4^USER-STRING-5
    %ENDM


    here you can see my cxt
    Attached Files Attached Files

  9. #9
    Join Date
    Apr 2014
    Posts
    18

    Re: Add token in code constructor

    which is the difference from .cge and .cgi?

Similar Threads

  1. Replies: 51
    Last Post: 09-16-2020, 01:28 AM
  2. TOKEN Chairman visit Sharpecnc today
    By leo zhu in forum News Announcements
    Replies: 0
    Last Post: 05-24-2010, 03:15 PM
  3. Replies: 2
    Last Post: 11-12-2008, 02:17 PM
  4. lead token for thread turning...where is it?
    By inflateable in forum EdgeCam
    Replies: 2
    Last Post: 07-23-2008, 11:56 AM
  5. Token, header/ footer OOOmy
    By cncadmin in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 05-06-2004, 08:00 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
  •