585,754 active members*
3,799 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > Set Sequence Number as a variable
Results 1 to 17 of 17
  1. #1
    Join Date
    May 2018
    Posts
    74

    Set Sequence Number as a variable

    Hello All,I want to know that are we able to set a sequence number as a variable?Let say I want to jump to a block number N1001 and can I do this:BLN = 1001Goto N[BLN] ??Any ideas?Thanks

  2. #2
    Join Date
    Jun 2015
    Posts
    4154

    Re: Set Sequence Number as a variable

    hy nodo it would be nice if it would work, but it doesn't, so you will need to write explicetly each condition

    Code:
        /|\
         |
         |
         |
         |
         2m
         |
      < -- 1.5m, eat disinfectants ( bio ) -->
         |
         |
         |
         |
        \|/
    do you wish to stack many "if's" ? i was also looking for this a while ago, when i needed to group 10-15 conditions, but in the end i wrote them one by one

    if i may, what do you wish to do ? if you wish, i may help you with code layout / kindly

    ps : a little more infos : N O V are not modal ... they can not be used before (nor after) "=" ... however, if you use numbers after them ( at least N O if i remember corectly), then you may read those numbers using system variables, but so far i never encountered a case that would require such a trick ( like reading active adress or subprogram )
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  3. #3
    Join Date
    Jun 2015
    Posts
    4154

    Re: Set Sequence Number as a variable

    hello, here are 2 examples for staking " if's " :

    Code:
     
        IF  [  condition a  ]  NA
        IF  [  condition b  ]  NB
        IF  [  condition c  ]  NC
        IF  [  condition d  ]  ND
    
        NA   action a
                       goto NZ
    
        NB   action b
                       goto NZ
    
        NC   action c
                       goto NZ
    
        ND   action d
    
                            NZ noex
    Code:
     
           IF  [  not condition a  ]  NB
                       action  a
           goto NZ
    
       NB  IF  [  not condition b  ]  NC
                       action  b
           goto NZ
    
       NC  IF  [  not condition c  ]  ND
                       action  c
           goto NZ
    
       ND  IF  [  not condition d  ]  NZ
                       action  d
    
       NZ noex
    
    N O V are not modal
    i did not mean modal, i also don't know the word ... i mean those are not read/write, can't be used in math expressions ( N= O= V= are not allowed ) / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  4. #4
    Join Date
    May 2018
    Posts
    74

    Re: Set Sequence Number as a variable

    Hi Deadlykitten,Thanks for your info. Actually, I don't need to stack many "ifs". I have a sub program to calculate things for the job. After finish the calculation it will go to destination where we need. So I can call the sub wherever, whenever I want and just assign a block number.Main Programblah blah...BLN = 1001Call O0100My sub looks like this:O0100.....Goto N[BLN]RTSI tried N[BLN] but it did not work. It would be easy and simple if I could set a block number as a variable, right?

  5. #5
    Join Date
    Apr 2009
    Posts
    1262

    Re: Set Sequence Number as a variable

    Block numbers as variables is not a standard feature. I've heard that it may be available as an option. Check your Management Data card from the back of the machine to see if it is listed. Check with Okuma to see if it is offered. Definitely not standard though.

    Best regards,
    Experience is what you get just after you needed it.

  6. #6
    Join Date
    Jun 2015
    Posts
    4154

    Re: Set Sequence Number as a variable

    hy nodo i believed that you wish to stack 'ifs', but i was wrong ...

    Main Programblah blah...BLN = 1001Call O0100
    CALL O0100 BLN = 1001 ( you may put BLN on same line with CALL statement )

    So I can call the sub wherever, whenever I want and just assign a block number
    what do you mean by assigning a block number to a soubroutine ?

    i have no clue what you wish to do, so i can't help ... please be a bit more specific, maybe share your code

    It would be easy and simple if I could set a block number as a variable, right?
    i don't know what you are after, maybe there is a simpler solution / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  7. #7
    Join Date
    Sep 2015
    Posts
    26

    Re: Set Sequence Number as a variable

    look into "User Task 3", it lets you do that. We use it in are programming now.

  8. #8
    Join Date
    May 2018
    Posts
    74

    Re: Set Sequence Number as a variable

    Quote Originally Posted by rdhoggattjr View Post
    look into "User Task 3", it lets you do that. We use it in are programming now.
    You meant User Task 3 for OKUMA?

  9. #9
    Join Date
    Sep 2015
    Posts
    26

    Re: Set Sequence Number as a variable

    Quote Originally Posted by nodochau View Post
    You meant User Task 3 for OKUMA?
    Yeah.

    Code:
    OTDBJ (START TOOL DATABASE FILE LOADER)
    GOTO PAT
    N1 FOPENA MD1:T001.TDB
    GOTO NRTS
    N2 FOPENA MD1:T002.TDB
    GOTO NRTS
    N3 FOPENA MD1:T003.TDB
    GOTO NRTS
    N4 FOPENA MD1:T004.TDB
    GOTO NRTS
    NRTS RTS
    
    We use this on our Okuma HMC's to retrieve information about the current tool. You just pass the tool number (PAT) and it goes to that N number.

  10. #10
    Join Date
    Aug 2011
    Posts
    419
    interesting

    Quote Originally Posted by rdhoggattjr View Post
    Yeah.

    Code:
    OTDBJ (START TOOL DATABASE FILE LOADER)
    GOTO PAT
    N1 FOPENA MD1:T001.TDB
    GOTO NRTS
    N2 FOPENA MD1:T002.TDB
    GOTO NRTS
    N3 FOPENA MD1:T003.TDB
    GOTO NRTS
    N4 FOPENA MD1:T004.TDB
    GOTO NRTS
    NRTS RTS
    
    We use this on our Okuma HMC's to retrieve information about the current tool. You just pass the tool number (PAT) and it goes to that N number.
    "Imagination is more important than knowledge."

  11. #11
    Join Date
    Jun 2015
    Posts
    4154

    Re: Set Sequence Number as a variable

    Quote Originally Posted by nodochau View Post
    You meant User Task 3 for OKUMA?
    hy nodo just in case : ut3 is a special function ( at least for mills ), about some extra macro functions, like GOTO [ argument ], IF and WHILE-DO; pls find attached pdf

    Quote Originally Posted by kurmay View Post
    interesting
    MN_^J<DAK?;BGL1345TU@C2=HI confused ...

    Quote Originally Posted by rdhoggattjr View Post
    We use this on our Okuma HMC's to retrieve information about the current tool
    hy rdhog ... i was wondering about a relevant code example, and when i saw your post ( which is kind of simple but complex ) i remembered that we talked before about those vs* variables

    you use that modified oo30 or something, that has some multilevels

    i like that code ... i can write it without ut3, using a macro in-file search ... however

    i want to ask you something : that code is executed inside the main program as a part of the tool change code, or it is executed only once, before running the main program ( kind of a tool register / preseter program ) ? kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  12. #12
    Join Date
    May 2018
    Posts
    74

    Re: Set Sequence Number as a variable

    Hi rdhoggattj,So PAT has to be a tool number or can be a block number?If I set PAT = 01 it will GOTO N1?And If I set PAT = 9001 and it will GOTO N9001 block number?What control are you using?Thanks a lot.
    Quote Originally Posted by rdhoggattjr View Post
    Yeah.
    Code:
    OTDBJ (START TOOL DATABASE FILE LOADER)GOTO PATN1 FOPENA MD1:T001.TDBGOTO NRTSN2 FOPENA MD1:T002.TDBGOTO NRTSN3 FOPENA MD1:T003.TDBGOTO NRTSN4 FOPENA MD1:T004.TDBGOTO NRTSNRTS RTS
    We use this on our Okuma HMC's to retrieve information about the current tool. You just pass the tool number (PAT) and it goes to that N number.

  13. #13
    Join Date
    Aug 2011
    Posts
    419

    Re: Set Sequence Number as a variable

    If anyone wants to enable user task 3 function on the cnc machine, he can send me a private message.
    I will not get paid from the first 3 people.
    "Imagination is more important than knowledge."

  14. #14
    Join Date
    Sep 2015
    Posts
    26

    Re: Set Sequence Number as a variable

    Quote Originally Posted by nodochau View Post
    Hi rdhoggattj,So PAT has to be a tool number or can be a block number?If I set PAT = 01 it will GOTO N1?And If I set PAT = 9001 and it will GOTO N9001 block number?What control are you using?Thanks a lot.
    Yes that is correct, but that was just how we use it for tools, it can be used with anything. IIRC I also use it for per program tool and home offsets on our Fastems system. We use P200M and P300M.

  15. #15
    Join Date
    May 2018
    Posts
    74

    Re: Set Sequence Number as a variable

    Hi rdhoggattj,It does not work for me. Maybe our machine are old . I did try it but I got error so I posted the issue here though.

  16. #16
    Join Date
    Apr 2009
    Posts
    1262

    Re: Set Sequence Number as a variable

    Check to see if User Task 3 is listed on your data Management card and if it is checked or not. If not, then you will have to either see Kurmay ;-) or your local Okuma Rep for the option.

    BTW Kurmay...how do you accomplish such a sacred task??
    Experience is what you get just after you needed it.

  17. #17

    Re: Set Sequence Number as a variable

    Hi sir , plz guide me how to activate User Task 3 for OSP p 200m & p300

Similar Threads

  1. Xilog 3 error CN25 : unknown sub-program or sequence number
    By Japie77 in forum CNC Machining Centers
    Replies: 9
    Last Post: 06-16-2017, 02:28 AM
  2. Serial number in variable?
    By ghyman in forum Haas Mills
    Replies: 4
    Last Post: 08-30-2016, 11:42 PM
  3. POST 2 SEQUENCE NUMBER ON THE SAME LINE
    By MAINVIST in forum Post Processors for MC
    Replies: 3
    Last Post: 11-06-2013, 10:31 AM
  4. Sequence number not found
    By Darth Yoda in forum G-Code Programing
    Replies: 4
    Last Post: 03-09-2013, 08:09 AM
  5. Sequence Number Before Every Tool Change
    By seattle77 in forum Post Processors for MC
    Replies: 3
    Last Post: 07-16-2009, 03:28 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
  •