585,768 active members*
4,068 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > Error in IF, GOTO statement. LC40 OSP5000
Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2013
    Posts
    18

    Question Error in IF, GOTO statement. LC40 OSP5000

    Hey guys

    Im trying to run a program with an inbuilt partcounter and I keep getting an error in the IF, GOTO statement.
    The error number is 423-1 wich refferes to "Sequence name where branch is made is not programmed."
    Code:

    Code:
    V1=0
    V2=5 (ANTALL DELER)
    NA001 V1=V1+1
    NA009 G13 (AP, UTVENDIG)
    NA010 G50 S1500 P10
    NA020 G00 X900 Z500 T111111
    NA030 G96 S250 M44 M3 M8 G110
    NAO40 G00 X70 Z16
    NA041 G01 X40 F.11
    NA042 G00 Z17
    NA043 G00 X67 Z20
    NA050 G85 NLAP1 D4 F.3 U.5 W.10
    NLAP1 G81 (KONTUR UTV.)
    NA060 G00 X61 Z18
    NA070 G01 G42 X64.98 Z14 F.15
    NA080 G01 Z-3.5
    NA090 G01 X70
    NA100 G40
    NA110 G80
    NA111 G00 X900 Z500 T030303
    NA112 G96 S300 M44 M87
    NA113 G00 X67 Z20
    NA120 G87 NLAP1
    NA130 G00 X300
    NA131 M01 (KONTROLL MAL)
    NA140 G00 X900 Z500
    NB150 G14 (INNV.)
    NB160 G96 G111 S250 P20
    NB170 G00 X900 Z500 T040404
    NB180 G00 G41 X49.5 Z18
    NB190 G01 X43.5 Z15 F.11
    NB200 G01 Z1
    NB210 G01 Z0 X45 F.7
    NB220 G01 Z-3.5
    NB230 G01 X42
    NB240 G40
    NB250 G00 Z500
    NB260 G00 X900
    NB270 G14 (INNV. GJ)
    NB280 G50 S780
    NB290 G00 X900 Z500 T0612 M87
    NB300 G97 S780 M44
    NB310 G00 X43.5 Z116
    NB320 G00 Z23
    NB330 G71 X45.2 Z-2 H1.3 D.3 U.05 B60 F1.5 M33 M73
    NB340 G00 Z18 M9
    NB350 G00 X900
    NB360 M01 (PRXVEMEL)
    NB370 G50 Z34.5 (NYTT NULLPUNKT TURRET B)
    NB380 G00 Z500
    NC390 G13 (BORING, GJENGING)
    NC400 M110 P30
    NC410 M15
    NC420 G94 X55 Z46 M242 SB=1000 T0707 M8
    NC430 G183 X55 Z-6 C0 K29 Q4 F120 D2
    NC440 G180
    NC450 G00 X900 Z500 T0909 M146 M12
    NC460 G00 X55 Z46 M242 SB=400
    NC470 G184 X55 Z-4 C0 K25 Q4 F320
    NC480 G180
    NC490 G00 X900 Z500 M146 M12
    NC500 G95 M109 M5
    NA510 G13 (STIKKE AV)
    NA520 G97 S700
    NA530 G00 X67 Z-3 T1213 M86 M44 M3
    NA540 M5
    NA550 M01 (PAUSE FXR STIKKING)
    NA560 M3
    NA570 G01 X63 F.07
    NA580 G00 X67
    NA590 G00 Z1
    NA600 G01 X63 Z-3
    NA610 G01 X46
    NA620 G04 F5 M9
    NA630 G01 X43 F.05
    NA640 G50 Z16.5 (NYTT NULLPUNKT TURRET A)
    NA650 G00 X900 Z500
    IF[V1 LT V2]NA001
    M5 M9
    M2

  2. #2
    Join Date
    Dec 2008
    Posts
    3109
    I'd go a little different by
    omitting the actual variable setting in the program
    and have the parts count at the end of the program

    the variables can be set in the user pages, and if someone runs the program from the start, then your count is not lost
    the variables used should be stated in your header

    ie
    ( V1 = # Parts Finished )
    ( V2 = Quantity Required )
    ....
    ....
    VC1=VC1+1
    IF [ VC1 LT VC2 ] NA001
    M5 M9
    M2
    %

    I think the spaces are important, your alarm comment seems to indicate that it can't find the GOTO sequence number

  3. #3
    Join Date
    Dec 2008
    Posts
    3109
    delete

  4. #4
    Join Date
    Dec 2008
    Posts
    3109
    delete

  5. #5
    Join Date
    Dec 2008
    Posts
    3109
    delete

  6. #6
    Join Date
    Dec 2008
    Posts
    3109
    delete

  7. #7
    Join Date
    Dec 2008
    Posts
    3109
    delete

  8. #8
    Join Date
    Apr 2009
    Posts
    1262
    I'm with Superman, Check for typo's in the NA001's and look for O vs 0's as well. VC1's are for Mills and V1's are for lathes. (don't ask me Okuma's logic on that one)

  9. #9
    Join Date
    Apr 2013
    Posts
    18
    I found the problem.
    The G13/G14 has to start before anything else..

  10. #10
    Join Date
    Nov 2007
    Posts
    352
    IF[V1 LT V2]GOTO NA001

  11. #11
    Join Date
    Jul 2010
    Posts
    287
    I agree, put the NA001 after the G13. The control is getting confused since on the G13 turret there is no line named Na001. That line is before a turret is designated, so telling the G13 turret to look for it, it will never find it, and generate your alarm.

Similar Threads

  1. LB15 OSP5000 CPU error
    By geeserteg in forum Okuma
    Replies: 17
    Last Post: 12-22-2020, 10:41 PM
  2. Replies: 6
    Last Post: 12-03-2011, 01:27 AM
  3. IF THEN statement won't run
    By mikey B in forum Parametric Programing
    Replies: 7
    Last Post: 09-30-2011, 12:38 AM
  4. Using an IF statement inside a While looping
    By ggborgen in forum Parametric Programing
    Replies: 6
    Last Post: 06-23-2009, 06:40 PM

Posting Permissions

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