User Graphic Command


Results 1 to 1 of 1

Thread: User Graphic Command

  1. #1
    Member kurmay's Avatar
    Join Date
    Aug 2011
    Posts
    419
    Downloads
    3
    Uploads
    0

    Default User Graphic Command

    Hi

    How can we use any variable in the definition block of UGC?


    sample

    LEN1=any number

    DEF WORK
    PS LC,[0,0],[LEN1,50]
    END


    Thanks

    Similar Threads:
    https://www.facebook.com/okuma.tuning


  2. #2
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: User Graphic Command

    hi, i also tried, and it failed ... but, what about creating a macro, so to handle this ?

    code will be like this :

    Code:
    [ main-program.min ]
    
    CALL ODRAW
    // program continues
    M02
    
    [ odraw.ssb ]
    
    ODRAW
    (------<DRAWING DATA>------)
    NOEX VTLIN[4]=3 VTLFN[4]=1 VTLL[4]=50 VTLA2[4]=3 VTLA1[4]=80
    NOEX VTLIN[6]=8 VTLFN[6]=1 VTLD[6]=12 VTLL[6]=50 VTLA2[6]=5 VTLA1[6]=80
    NOEX VWKR=9999.999 VCHKL=0 VCHKD=0 VCHKX=80 VCHKZ=-38
    DEF WORK
    PT LF,LC,[-38,0],[80,80], [38,0]
    END
    DEF WORKF
    PF 0,[0,0],80,D
    END
    CLEAR
    DRAW
    RTS
    is possible to parameterize entire odraw, by creating a soubroutine that will generate linear code (g-code), starting with some numbers

    so you use LEN1 inside main program, generate the soubroutine, and the main program will call it; downside is that it will require to create the soubroutine before executing the main program, thus more keystrokes; if u wish, i will create an example

    to do it without auxialary keystrokes, then it will be required to create the code like you wish, before sending it to the machine, and i can't do that / kindly

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  3. #3
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: User Graphic Command

    i mean a parametric, like this :

    Code:
    [ test.min ]
    
    
        NOEX LEN1 = 60
    
    
        FWRITC odraw.ssb;C ( append c = rewrite existing content )
        NOEX PUT 'ODRAW'    PUT $0D0A
    $        PUT 'DEF WORK' PUT $0D0A
    $        PUT 'PS LC,[0,0],[' PUT LEN1 , 3 PUT ',50]' PUT $0D0A
    $        PUT 'END'      PUT $0D0A PUT 'RTS'
        WRITE C
      ( CLOSE C )
    
    
    M02
    that generates linear code :

    Code:
    [ odraw.ssb ]
    
    ODRAW
    DEF WORK
    PS LC,[0,0],[ 60,50]
    END
    RTS


    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

User Graphic Command

User Graphic Command