587,743 active members*
3,036 visitors online*
Register for free
Login

Thread: User task 2

Results 1 to 20 of 20
  1. #1
    Join Date
    Oct 2013
    Posts
    8

    User task 2

    Hello,

    I recently had an okuma user task 2 script dumped on me for debugging. It seems pretty straight forward, but some of the calls I can't decipher. Is there a programming specification available? I've contacted okuma, and my sales rep, which, as per usual, weren't all that helpful. Controller is a OSP-P200L.

    Thank you,

  2. #2
    Join Date
    Oct 2012
    Posts
    85
    I don't have a manual handy but what calls are you wanting to know about? The programming manual for the machine has some on it. If it's a probing macro then you would need the appropriate probing manual.

  3. #3
    Join Date
    Oct 2012
    Posts
    85
    Here is a better explanation on User Task though it is for an older control. I was told for the most part it hasn't changed. Also I should tell you that user task is not as robust as fanuc b.

  4. #4
    Join Date
    Oct 2013
    Posts
    8
    Hi Shags, (I just noticed your second post, thank you)

    Thanks for your help.

    RTS, guessing and END statement?
    NRTS
    NCNT

    This is a snippet from one of the subroutines:

    IF[V8 LT 0]NCNT
    V30=V8
    CALL OMOJI
    NCNT
    IF[V38 EQ 0]NRTS
    CALL OCOUN
    NRTS RTS

    so my interpretation of this is:

    if (V8 < 0) {
    V30 = V8; // set var
    CALL OMOJI; // call OMOJI sub.
    }

    if (V38 == 0) {
    CALL OCOUN; // call OCOUN sub
    }

    The usage of both NCNT and NRTS in these conditionals, no idea.

    Once again, thanks for your help.

    sg.

  5. #5
    Join Date
    Oct 2013
    Posts
    8
    After reading the PDF you posted, the conditionals make way more sense ... bit of a dough-head moment for me here...

  6. #6
    Join Date
    Oct 2012
    Posts
    85
    I understand bud looks like gobblegook sometimes! Ain't macros grand. Glad to help. I was asking similar questions a few months ago on user task.

  7. #7
    Join Date
    Apr 2009
    Posts
    1262
    Quote Originally Posted by Shopgeek View Post
    Hi Shags, (I just noticed your second post, thank you)

    Thanks for your help.

    RTS, guessing and END statement? (Return from Subroutine)
    NRTS (line number or label)
    NCNT (line number or label)

    This is a snippet from one of the subroutines:

    IF[V8 LT 0]NCNT (if common variable 8 is less than 0, jump to line NCNT
    V30=V8 (set variable 30 equal to variable 8)
    CALL OMOJI (call subroutine OMOJI)
    NCNT (line number or label)
    IF[V38 EQ 0]NRTS (if variable 38 equals 0 goto line NRTS)
    CALL OCOUN (call subroutine named OCOUN)
    NRTS RTS (line number NRTS which returns from the subroutine)

    so my interpretation of this is:

    if (V8 < 0) {
    V30 = V8; // set var
    CALL OMOJI; // call OMOJI sub.
    }

    if (V38 == 0) {
    CALL OCOUN; // call OCOUN sub
    }

    The usage of both NCNT and NRTS in these conditionals, no idea.

    Once again, thanks for your help.

    sg.

    The Okuma works like basic for the most part. Hope the comments help.

  8. #8
    Join Date
    Jul 2010
    Posts
    287
    Without reading the manual at hand, the only adder I've got is that on an Okuma, anything beginning with an "N" is a line number. You can use letter or numbers after the N. I always end my subprograms as such:
    NRTS
    RTS
    This way, if for some reason i need to jump out of the sub program, i can simply "GOTO NRTS".
    Not sure why the difference from Fanuc, but it does offer more available unique and easily referenced line numbers than N and 4 digits.

    I would like to know, Shags72, in your opinion, what about Macro B for Fanuc is better than User task 2 for Okuma?
    I do mostly OSP programming anymore, but have been heavy into both, and am just curious about your perspective as someone who uses both as well.

  9. #9
    Join Date
    Oct 2012
    Posts
    85
    Well firstly I am no expert by any stretch of the imagination but I dabble and I have coded some. I have just been translating fanuc/renishaw custom probing macros to user task. Something that is bothersome is local vars being restricted in their use, and not being able to watch them without writing them to a common. Trying to increment a local variable using a variable is not allowed as it is seen as an array, which this to me is not an array, but who am I. ROFL. No while looping allowed which is pretty clean and easier to follow. I have a thread on this in the parametric forum. I am really learning right now. I hope I am wrong about some of this and you can show me the way.
    LV[20+LV19]=LV36
    which if LV19=1 would be LV21=LV36.

  10. #10
    Join Date
    Dec 2008
    Posts
    3135
    Quote Originally Posted by shags72 View Post
    Well firstly I am no expert by any stretch of the imagination but I dabble and I have coded some. I have just been translating fanuc/renishaw custom probing macros to user task. Something that is bothersome is local vars being restricted in their use, and not being able to watch them without writing them to a common. Trying to increment a local variable using a variable is not allowed as it is seen as an array, which this to me is not an array, but who am I. ROFL. No while looping allowed which is pretty clean and easier to follow. I have a thread on this in the parametric forum. I am really learning right now. I hope I am wrong about some of this and you can show me the way.
    LV[20+LV19]=LV36
    which if LV19=1 would be LV21=LV36.
    I think you will find that your "equation" is the wrong way round..
    -the target is to the left, with the calculation on the right ( i.e. LV36=LV[20+LV19] )

    It might mean a different approach if you wanted the contents of LV36 to be placed into a variable that is a result of a calculation

  11. #11
    Join Date
    Oct 2012
    Posts
    85
    I do want the contents of LV36 to be placed into the variable number of the calculation. This is in a loop and I am saving each value into an incremented variable, which is the reason for the equation to name the var #. You can do this in B and you can do this with common variables. Is there a way around this?

    I have seen issues where people start stepping on commons on other machines and want to use as few as possible on a newer machine.

  12. #12
    Join Date
    Nov 2012
    Posts
    24
    Okuma User Task II allows up to 127 local variables to be declared and used in auto operation. These variables are cleared at M30, Reset, power down. They do not pass through to sub programs and sub-macro calls. These local variables are similar to 100's in Fanuc Macro B. You can name them as you choose with the following rules.

    1. Up to four letters/numbers.
    2. Can't start with N, V, O
    3. Can't start with a number

    For example, if you wanted a local variable for an X position of 1.0 you could do the following.

    XPS1=1

  13. #13
    Join Date
    Nov 2006
    Posts
    174
    Does anyone use UserTask3? This allows DO/WHILE loops, which I prefer. Our new (well 12 months old now) machine with P200MA, still didn't come with UserTask3. Should be standard, not an option!

    Didn't realise the locals couldn't be passed to subs. Must remember that 8-)

  14. #14
    Join Date
    Jul 2010
    Posts
    287
    Attachment 206344
    Attachment 206346
    Attachment 206348

    Gonna have to help me here.
    Those are pictures from a P300S-L programming manual.
    See no such thing as a User task 3 with a While/Do loop.
    Where are you getting that information?

    Renishaw has probing routines for the OSP already.
    Why are you transposing routines that already exist in Okuma talk?
    Just curious.

  15. #15
    Join Date
    Nov 2006
    Posts
    174
    Attachment 206468

    Attachment 206460

    Found reference to User Task3 in special functions manual ME32-096-R04a.pdf

  16. #16
    Join Date
    Jul 2010
    Posts
    287
    Mill...
    Have to check the specs. I don't believe I have a spec function manual 2 for my lathe. I wonder if that's a mill vs lathe difference, like VC1 vs V1.
    Report back tomorrow...

  17. #17
    Join Date
    Jul 2010
    Posts
    287
    You are correct about user task 3 FYI. It is new on the p200 I believe it wasn't available on the P100, but I guess it doesn't matter. Seems to be an option, but there is no such thing on the P300L I've been on, nor available.

    That said, I assume you figured out what you needed to long ago, shopgeek. Is that correct?

  18. #18
    Join Date
    Dec 2013
    Posts
    8

    Re: User task 2

    I know this is an old thread. But would you mind sending me this manual? I've searching on line but I couldn't find it!

    Thanks in advance

    Stephan

  19. #19
    Join Date
    Oct 2012
    Posts
    85

    Re: User task 2

    Quote Originally Posted by Stephan Spears View Post
    I know this is an old thread. But would you mind sending me this manual? I've searching on line but I couldn't find it!

    Thanks in advance

    Stephan
    Did you ever get the manual and which one?

  20. #20
    Join Date
    Aug 2011
    Posts
    2517

    Re: User task 2

    there is a full set of OSP200 and OSP300 manuals at CNC Programming Manuals User Guides - CNC Manual

Similar Threads

  1. User task and User task 2
    By shags72 in forum Parametric Programing
    Replies: 20
    Last Post: 12-23-2013, 05:55 PM
  2. User Task, subprograms, unhelpful Reps.
    By gogego in forum Okuma
    Replies: 15
    Last Post: 04-13-2011, 04:15 AM
  3. Replies: 0
    Last Post: 11-17-2010, 07:04 AM
  4. Okuma User Task II G,F,M Status
    By calgarykevvy in forum Okuma
    Replies: 2
    Last Post: 07-09-2009, 04:02 PM
  5. Okuma's User Task 2
    By compuslave in forum G-Code Programing
    Replies: 6
    Last Post: 02-29-2008, 01:36 AM

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
  •