parts counter
Close
Login to Your Account
Results 1 to 9 of 9

Thread: parts counter

  1. #1
    Join Date
    Aug 2017
    Country
    UNITED STATES
    State/Province
    California
    Posts
    9
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1

    Default parts counter

    I've got a Okuma LB 12 at home, I know a complete dinosaur. but she kicks butt.
    I'm doing this.

    V01 = 1
    N000 V01 = V01 + 1


    ( PROGRAM )


    / IF [ V01 LE 20 ] N000
    M2

    Works great, But if I have to reset it loses count ( the count starts over ) is there code that will keep the count even after reset?

  2. #2
    Join Date
    Aug 2011
    Location
    Houston Texas
    Posts
    121
    Post Thanks / Like
    Likes (Given)
    9
    Likes (Received)
    2

    Default

    I have an idea that may work let me test after lunch.

  3. #3
    Join Date
    Aug 2017
    Country
    UNITED STATES
    State/Province
    California
    Posts
    9
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1

    Default

    Thank you Sir.

  4. #4
    Join Date
    Sep 2015
    Country
    UNITED STATES
    State/Province
    Ohio
    Posts
    1,032
    Post Thanks / Like
    Likes (Given)
    598
    Likes (Received)
    1003

    Default

    Type V1=0 in MDI, cycle start. Leave it out of the program altogether.
    Or if your control can run a schedule program (.sdf I think) you can do it easier there.

  5. #5
    Join Date
    Aug 2011
    Location
    Houston Texas
    Posts
    121
    Post Thanks / Like
    Likes (Given)
    9
    Likes (Received)
    2

    Default

    What I was thinking did work.

    At the top of my program typically I have

    N100 V1=1
    N200 V2=2

    ....
    Program
    ....

    V1=V1+1
    N700 IF [V1 LE V2] GOTO N200
    N800 IF [V1 GE V2] GOTO N900
    N900 M30


    What I thought was, manually set V1 in the common variables to 0 before running the program the first time. Then Add this one line before N100.

    IF [V1 LE V2] GOTO N200
    N100 V1=1

    If common variable is set to 0 the first run, it will start from the beginning of part count. Once it starts counting, the IF statement will make the program pick right back up on the last part count no matter how many times you stopped and loaded a new bar etc.... If you never reached the V2 part count it doesn’t reset V1 upon cycle start on a new bar of material.

    You have to either reach total part count, or manually reset V1 to 0 in parameters Common Variable.

  6. #6
    Join Date
    Aug 2017
    Country
    UNITED STATES
    State/Province
    California
    Posts
    9
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1

    Default

    Thanks man, I'll give it a shot.

  7. Likes clayton liked this post
  8. #7
    Join Date
    Aug 2011
    Location
    Houston Texas
    Posts
    121
    Post Thanks / Like
    Likes (Given)
    9
    Likes (Received)
    2

    Default

    There are multiple ways to control machine behavior with programming variables etc. As well a couple of different approaches to achieve this as others have suggested.

    Best of luck!

  9. #8
    Join Date
    Feb 2011
    Location
    ct. usa
    Posts
    13
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    4

    Default

    This should run the number of pcs. in v2 with out resetting v1
    V1 would have to be entered in the macro's for the first time the program is run or you might get a number of pcs. not equal to V2 somewhere between 1-20 pcs.


    $O0001.MIN%

    N1
    V2=20
    IF[V1LT0]GOTO2(SAFETY RESET)
    IF[V1GEV2]GOTO2(RESET COUNTER)
    IF[V1GT0]GOTO3(BY PASS COUNTER RESET)

    N2 V1=0
    N3




    V1=V1+1
    IF[V1 GT V2]GOTO200
    GOTO1
    N200M30

    %

  10. #9
    Join Date
    Aug 2017
    Country
    UNITED STATES
    State/Province
    California
    Posts
    9
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1

    Default

    Oh No, Got a alarm. at work, Its a OSP700L tried that code out on it to see if it works. must have typed it in wrong. the Alarm is 3205 ALARM-C WORK COUNTER OVER. I set the common variable back to zero but the Alarm still will not go away.


Tags for this Thread

Bookmarks

Posting Permissions

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