1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

KAREL programming FANUC

  • Kawazaki02
  • September 29, 2020 at 5:18 PM
  • Thread is Unresolved
  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • September 29, 2020 at 5:18 PM
    • #1

    Hello. need help. I want to move the extended axes of the robot. Has anyone encountered this problem before?

    shown in code for 6 axes


    PROGRAM TEST_KAREL

    %ENVIRONMENT TPE

    %ENVIRONMENT BYNAM

    CONST

    MAX_AXS = 9

    JNT_POS = 9

    XYZ_POS = 2

    VAR

    to_prog: STRING[27]

    open_id: INTEGER

    status: INTEGER

    position_no: INTEGER

    new_xyz: XYZWPREXT

    org_xyz: XYZWPREXT

    num_axs: INTEGER

    BEGIN

    to_prog = 'TEST_TP_1'

    OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)

    position_no = 3

    org_xyz = GET_POS_TPE (open_id, position_no, posn_typ, num_axs, status)

    FOR indx_axs= 1 TO num_axs DO

    jp_new [indx_axs] = jp_org[indx_axs] + jp_off [indx_axs]

    new_xyz.x = org_xyz.x +10

    new_xyz.y = org_xyz.y + 10

    new_xyz.z = org_xyz.z + 10

    new_xyz.w = org_xyz.w + 10

    new_xyz.p = org_xyz.p + 10

    new_xyz.r = org_xyz.r + 10

    SET_POS_TPE (open_id, position_no, new_xyz, status)

    CLOSE_TPE (open_id, status)

    END TEST_KAREL

    Images

    • Снимок.JPG
      • 124.56 kB
      • 1,063 × 687
      • 324

    Edited 3 times, last by Kawazaki02 (September 29, 2020 at 6:46 PM).

  • hermann
    Reactions Received
    407
    Trophies
    9
    Posts
    2,611
    • September 29, 2020 at 6:14 PM
    • #2

    Who wrote the program in the picture?

    It should be possible to use

    Code
    new_xyz.ext1=org_xyz.ext1+10

    And by the way, you shouldn't post a picture of a program code. Always post the code in some ASCII representation. Nobody here wants to type already existing code by looking onto a picture.

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • September 29, 2020 at 6:44 PM
    • #3
    Quote from hermann

    Кто написал программу на картинке?

    Должна быть возможность использовать

    Code
    new_xyz.ext1 = org_xyz.ext1 + 10

    И, кстати, не стоит размещать картинку программного кода. Всегда размещайте код в каком-либо представлении ASCII. Здесь никто не хочет набирать уже существующий код, глядя на картинку.

    tried it according to yours, as you need to indicate that this code is for extended axes

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • September 29, 2020 at 6:53 PM
    • #4

    PROGRAM TEST_KAREL

    %ENVIRONMENT TPE

    %ENVIRONMENT BYNAM

    CONST

    MAX_AXS = 9

    JNT_POS = 9

    XYZ_POS = 2

    VAR

    to_prog: STRING[25]

    open_id: INTEGER

    status: INTEGER

    position_no: INTEGER

    jp_org : ARRAY [9] OF REAL

    jp_new : ARRAY [9] OF REAL

    prg_select: INTEGER

    arr_size : INTEGER

    indx : INTEGER

    indx_pos: INTEGER

    num_pos : INTEGER

    indx_axs: INTEGER

    num_axs : INTEGER

    pos_typ : INTEGER

    group_no: INTEGER

    org_jpos : JOINTPOS

    new_jpos : JOINTPOS

    posn_type: INTEGER

    org_xyz : XYZWPREXT

    new_xyz : XYZWPREXT

    BEGIN

    to_prog = 'TEST_TP_1'

    OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)

    group_no = 1

    position_no = 3

    GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status)

    WRITE ('get_pos_typ status', status,CR)

    SELECT pos_typ OF

    CASE (JNT_POS):

    SET_JPOS_TPE (open_id, indx_pos, new_jpos, status)

    WRITE ('indx_pos', indx_pos, 'new_jpos',CR, new_jpos,CR)

    ENDSELECT

    org_jpos = GET_JPOS_TPE (open_id, indx_pos, status)

    org_xyz = GET_POS_TPE (open_id , indx_pos, status)

    new_xyz.x = org_xyz.x +10

    new_xyz.y = org_xyz.y +0

    new_xyz.z = org_xyz.z +0

    new_xyz.w = org_xyz.w +0

    new_xyz.p = org_xyz.p +0

    new_xyz.r = org_xyz.r +0

    new_xyz_ext1 = org_xyz_ext1 + 10

    new_xyz_ext2 = org_xyz_ext2 + 10

    new_xyz_ext3 = org_xyz_ext3 + 10

    SET_POS_TPE (open_id, position_no, new_xyz, status)

    CLOSE_TPE (open_id, status)

    END TEST_KAREL

    Build error

    Translating D:\NikolaevAS\Desktop\untitled18.kl

    KTRANS Version V8.30 (Build 30 11/12/2019)

    Copyright (C) FANUC America Corporation, 1985 through 2016.

    All Rights Reserved.


    D:\NikolaevAS\Desktop\untitled18.kl(72)

    72 new_xyz_ext1 = org_xyz_ext1 + 10

    ^ ERROR

    Id must be defined before this use. Id: ORG_XYZ_EXT1

    D:\NikolaevAS\Desktop\untitled18.kl(73)

    73 new_xyz_ext2 = org_xyz_ext2 + 10

    ^ ERROR

    Id must be defined before this use. Id: ORG_XYZ_EXT2

    D:\NikolaevAS\Desktop\untitled18.kl(74)

    74 new_xyz_ext3 = org_xyz_ext3 + 10

    ^ ERROR

    Id must be defined before this use. Id: ORG_XYZ_EXT3

    D:\NikolaevAS\Desktop\untitled18.kl(76)

    76 SET_POS_TPE (open_id, position_no, new_xyz, status)

    ^ WARNING

    Argument will be passed by value. Id: NEW_XYZ


    ===============Translation not successful===============

    Build Failed: Error translating program: Code: 0xFFFFFFFF:

  • DaveP
    Reactions Received
    23
    Trophies
    4
    Posts
    201
    • September 29, 2020 at 8:11 PM
    • #5

    try replacing the underscores with periods in your new code that Hermann suggested using. His code uses a . instead of a _ in the variable name for the extended axis. new_xyz.ext1 = org_xyz.ext1 + 10

  • R47
    Reactions Received
    11
    Trophies
    3
    Posts
    110
    • September 29, 2020 at 9:29 PM
    • #6

    hi kawazaki02,

    i think you Need to add %ENVIRONMENT REGOPE on your Code.

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • September 29, 2020 at 10:06 PM
    • #7
    Quote from DaveP

    try replacing the underscores with periods in your new code that Hermann suggested using. His code uses a . instead of a _ in the variable name for the extended axis. new_xyz.ext1 = org_xyz.ext1 + 10

    tried it. The result is the same

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • September 29, 2020 at 10:09 PM
    • #8
    Quote from R47

    hi kawazaki02,

    i think you Need to add %ENVIRONMENT REGOPE on your Code.

    did not work. I don't know what to do anymore :frowning_face:

    PROGRAM TEST_KAREL

    %ENVIRONMENT TPE

    %ENVIRONMENT BYNAM

    %ENVIRONMENT REGOPE

    CONST

    MAX_AXS = 9

    JNT_POS = 9

    XYZ_POS = 2

    VAR

    to_prog: STRING[25]

    open_id: INTEGER

    status: INTEGER

    position_no: INTEGER

    jp_org : ARRAY [9] OF REAL

    jp_new : ARRAY [9] OF REAL

    prg_select: INTEGER

    arr_size : INTEGER

    indx : INTEGER

    indx_pos: INTEGER

    num_pos : INTEGER

    indx_axs: INTEGER

    num_axs : INTEGER

    pos_typ : INTEGER

    group_no: INTEGER

    org_jpos : JOINTPOS

    new_jpos : JOINTPOS

    posn_type: INTEGER

    org_xyz : XYZWPREXT

    new_xyz : XYZWPREXT

    org_xyz_ext : XYZWPREXT

    new_xyz_ext : XYZWPREXT


    BEGIN

    to_prog = 'TEST_TP_1'

    OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)

    group_no = 1

    position_no = 3

    GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status)

    WRITE ('get_pos_typ status', status,CR)

    SELECT pos_typ OF

    CASE (JNT_POS):

    SET_JPOS_TPE (open_id, indx_pos, new_jpos, status)

    WRITE ('indx_pos', indx_pos, 'new_jpos',CR, new_jpos,CR)

    ENDSELECT

    org_jpos = GET_JPOS_TPE (open_id, indx_pos, status)

    org_xyz = GET_POS_TPE (open_id , indx_pos, status)

    new_xyz.x = org_xyz.x +10

    new_xyz.y = org_xyz.y +0

    new_xyz.z = org_xyz.z +0

    new_xyz.w = org_xyz.w +0

    new_xyz.p = org_xyz.p +0

    new_xyz.r = org_xyz.r +0

    new_xyz_ext1 = org_xyz_ext1 + 10

    SET_POS_TPE (open_id, position_no, new_xyz, status)

    CLOSE_TPE (open_id, status)

    END TEST_KAREL


    ----------------------------------------------------------------------

    Translating D:\NikolaevAS\Desktop\untitled18.kl

    KTRANS Version V8.30 (Build 30 11/12/2019)

    Copyright (C) FANUC America Corporation, 1985 through 2016.

    All Rights Reserved.


    D:\NikolaevAS\Desktop\untitled18.kl(77)

    77 new_xyz_ext1 = org_xyz_ext1 + 10

    ^ ERROR

    Id must be defined before this use. Id: ORG_XYZ_EXT1

    D:\NikolaevAS\Desktop\untitled18.kl(79)

    79 SET_POS_TPE (open_id, position_no, new_xyz, status)

    ^ WARNING

    Argument will be passed by value. Id: NEW_XYZ


    ===============Translation not successful===============

    Build Failed: Error translating program: Code: 0xFFFFFFFF:

    ----------------------------------------------------------------------

  • hermann
    Reactions Received
    407
    Trophies
    9
    Posts
    2,611
    • September 29, 2020 at 10:46 PM
    • #9

    Are you kidding us?

    You only had to mark the code in my post and copy it to your .kl file and it would have been worked. That's the reason why code has to be inserted into a code-tag.

    Here is the proof, (I have a newer compiler, may be that's the problem, but I don't think so):

    Code
    PROGRAM TEST_KAREL
    %ENVIRONMENT TPE
    %ENVIRONMENT BYNAM
    
    CONST
    MAX_AXS = 9
    JNT_POS = 9
    XYZ_POS = 2
    
    VAR
    to_prog: STRING[25]
    open_id: INTEGER
    status: INTEGER
    position_no: INTEGER
    
    jp_org : ARRAY [9] OF REAL
    jp_new : ARRAY [9] OF REAL
    prg_select: INTEGER
    arr_size : INTEGER
    indx : INTEGER
    indx_pos: INTEGER
    num_pos : INTEGER
    indx_axs: INTEGER
    num_axs : INTEGER
    pos_typ : INTEGER
    group_no: INTEGER
    org_jpos : JOINTPOS
    new_jpos : JOINTPOS
    posn_type: INTEGER
    org_xyz : XYZWPREXT
    new_xyz : XYZWPREXT
    
    BEGIN
    to_prog = 'TEST_TP_1'
    OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
    group_no = 1
    position_no = 3
    GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status)
    WRITE ('get_pos_typ status', status,CR)
    SELECT pos_typ OF
    CASE (JNT_POS):
    SET_JPOS_TPE (open_id, indx_pos, new_jpos, status)
    WRITE ('indx_pos', indx_pos, 'new_jpos',CR, new_jpos,CR)
    ENDSELECT
    
    org_jpos = GET_JPOS_TPE (open_id, indx_pos, status)
    org_xyz = GET_POS_TPE (open_id , indx_pos, status)
    new_xyz.x = org_xyz.x +10
    new_xyz.y = org_xyz.y +0
    new_xyz.z = org_xyz.z +0
    new_xyz.w = org_xyz.w +0
    new_xyz.p = org_xyz.p +0
    new_xyz.r = org_xyz.r +0
    new_xyz.ext1 = org_xyz.ext1 + 10
    
    SET_POS_TPE (open_id, position_no, new_xyz, status)
    CLOSE_TPE (open_id, status)
    
    END TEST_KAREL
    Display More

    Result of Compiling:

    ----------------------------------------------------------------------

    Translating D:\......\test_karel.kl

    KTRANS Version V9.10 (Build 17 9/18/2019)

    Copyright (C) FANUC America Corporation, 1985 through 2017.

    All Rights Reserved.

    D:\.....\test_karel.kl(56)

    56 SET_POS_TPE (open_id, position_no, new_xyz, status)

    ^ WARNING

    Argument will be passed by value. Id: NEW_XYZ

    *** Translation successful, 698 bytes of p-code generated, checksum 12310. ***

    ----------------------------------------------------------------------

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • September 29, 2020 at 10:54 PM
    • #10
    Quote from hermann

    Are you kidding us?

    You only had to mark the code in my post and copy it to your .kl file and it would have been worked. That's the reason why code has to be inserted into a code-tag.

    Here is the proof, (I have a newer compiler, may be that's the problem, but I don't think so):

    thanks, I also compiled, but the additional axes did not move :frowning_face:

  • TomTom
    Reactions Received
    9
    Trophies
    3
    Posts
    49
    • September 30, 2020 at 12:12 PM
    • #11

    After each command always check the status variable. It tells you if the command actually worked or not. For example:

    Code
          OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
          IF (status<>0)  THEN
            FORCE_SPMENU (TP_PANEL, SPI_TPUSER, 1)
            WRITE('Error while opening tp prog',CR)
            POST_ERR(status, '', 0, 2) --2 indicates ABORT; see Karel Manual
            ABORT
          ENDIF
  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • September 30, 2020 at 6:00 PM
    • #12

    Does anyone have an example of a Karel program for shifting additional axes on FANUC robots?

    Or consult on this issue.

  • hermann
    Reactions Received
    407
    Trophies
    9
    Posts
    2,611
    • October 1, 2020 at 4:11 PM
    • #13

    The program has many issues, and in the first version it does'nt make real sense. Who wrote that?

    It compiles, but it has runtime errors and doesn't run till end.

    Here is a working one (only tested with one extended axis), BUT: there seems to be an issue in the KAREL system of fanuc. At least in my test equipment the value of extended axis 1 that comes from the funtion GET_POS_TPE has nothing to do with the real value.

    Code
    PROGRAM TEST_KAREL
    %ENVIRONMENT TPE
    %ENVIRONMENT BYNAM
    %INCLUDE klevtpe
    
    CONST
    MAX_AXS = 9
    
    
    VAR
    to_prog: STRING[25]
    open_id: INTEGER
    status: INTEGER
    position_no: INTEGER
    
    jp_org : ARRAY [9] OF REAL
    jp_new : ARRAY [9] OF REAL
    prg_select: INTEGER
    arr_size : INTEGER
    indx : INTEGER
    indx_pos: INTEGER
    num_pos : INTEGER
    indx_axs: INTEGER
    num_axs : INTEGER
    pos_typ : INTEGER
    group_no: INTEGER
    org_jpos : JOINTPOS
    new_jpos : JOINTPOS
    posn_type: INTEGER
    org_xyz : XYZWPREXT
    new_xyz : XYZWPREXT
    
    BEGIN
     to_prog = 'TEST_TP_1'
     OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
     group_no = 1
     position_no = 3
     indx_pos=3
     GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status)
     --WRITE TPDISPLAY(CHR(cc_clear_win),CHR(cc_home)) -- Clear USER screen
     WRITE TPDISPLAY('get_pos_typ status', status,'  ',posn_type,CR)
    
    SELECT posn_type OF
     CASE (pt_jointpos):
      org_jpos = GET_JPOS_TPE (open_id, indx_pos, status)
      new_jpos=org_jpos
      SET_JPOS_TPE (open_id, indx_pos, new_jpos, status)
      WRITE TPDISPLAY('indx_pos', indx_pos, 'new_jpos',CR, new_jpos,CR)   
    
     CASE (pt_xyzwpr):
      org_xyz = GET_POS_TPE (open_id , indx_pos, status)
      new_xyz=org_xyz
      new_xyz.x = org_xyz.x +10
      new_xyz.y = org_xyz.y +0
      new_xyz.z = org_xyz.z +0
      new_xyz.w = org_xyz.w +0
      new_xyz.p = org_xyz.p +0
      new_xyz.r = org_xyz.r +0 
    
     SET_POS_TPE (open_id, position_no, new_xyz, status)
    
     CASE (pt_rxyzwpr):
      org_xyz = GET_POS_TPE (open_id , indx_pos, status)
      new_xyz = org_xyz  -- init values of Configuraion data 
      new_xyz.x = org_xyz.x +10
      new_xyz.y = org_xyz.y +0
      new_xyz.z = org_xyz.z +0
      new_xyz.w = org_xyz.w +0
      new_xyz.p = org_xyz.p +0
      new_xyz.r = org_xyz.r +0
      new_xyz.ext1 = org_xyz.ext1 +10
      -- new_xyz.ext1 = org_xyz.ext1
      WRITE TPDISPLAY('org_xyz', org_xyz,CR)
      WRITE TPDISPLAY('org_xyz.ext1', org_xyz.ext1,CR)
      WRITE TPDISPLAY('org_xyz.ext2', org_xyz.ext2,CR)
      WRITE TPDISPLAY('org_xyz.ext3', org_xyz.ext3,CR)
      WRITE TPDISPLAY('new_xyz', new_xyz,CR)
      SET_EPOS_TPE (open_id, position_no, new_xyz, status)
    ENDSELECT
    
    CLOSE_TPE (open_id, status)
    
    END TEST_KAREL
    Display More

    You can see the outputs of the WRITE statements on the User screen (MENU - 9 USER).

    And one more remark: Try to write programs on your own, read the karel manuals, learn to debug programs. jm2c.

    I'm out now.

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • October 1, 2020 at 5:30 PM
    • #14
    Quote from hermann

    The program has many issues, and in the first version it does'nt make real sense. Who wrote that?

    It compiles, but it has runtime errors and doesn't run till end.

    Here is a working one (only tested with one extended axis), BUT: there seems to be an issue in the KAREL system of fanuc. At least in my test equipment the value of extended axis 1 that comes from the funtion GET_POS_TPE has nothing to do with the real value.

    You can see the outputs of the WRITE statements on the User screen (MENU - 9 USER).

    And one more remark: Try to write programs on your own, read the karel manuals, learn to debug programs. jm2c.

    I'm out now.

    Display More

    thanks, everything worked

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • October 10, 2020 at 2:01 PM
    • #15

    Hello everyone, I wrote the code. compiles. but when executing the program, it will throw an error. if you remove 47 and 75, then the program is executed well, without errors.

    Code
    PROGRAM TEST_KAR_10
    
    %NOLOCKGROUP
    %ENVIRONMENT REGOPE
    %ALPHABETIZE
    %COMMENT = 'ALL_POS_ARG'
    %ENVIRONMENT TPE
    %ENVIRONMENT BYNAM
    %INCLUDE klevtpe
    
    CONST
    
        MAX_AXS = 9    
    
    VAR
    
        to_prog: STRING[25]
        open_id: INTEGER
        status: INTEGER
        
        indx_pos: INTEGER
    
        num_axs : INTEGER
        group_no: INTEGER
        posn_type: INTEGER
        org_xyz : XYZWPREXT
        new_xyz : XYZWPREXT
    
        num_pos : INTEGER
    
        r_val: REAL
        i_val: INTEGER
        r_flg :BOOLEAN
    
    BEGIN
    
             to_prog = 'TEST_TP_1'
    
         OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
    
                 group_no = 1
                 
        GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status)
    
            WRITE('get_pos_typ status', status,CR)
             
        FOR indx_pos = 1 TO num_pos-1 DO
    
            WRITE ('indx_pos', indx_pos, CR, CR)
    
            SELECT posn_type OF
    
                CASE (pt_rxyzwpr):
    
                GET_REG (101,r_flg, i_val, r_val, status)
    
            WRITE ('Got REAL value from R[101]',CR)
                
          org_xyz = GET_POS_TPE (open_id,  indx_pos, status)
                 new_xyz = org_xyz
                 new_xyz.x = org_xyz.x + i_val
                 new_xyz.y = org_xyz.y + 0
                new_xyz.z = org_xyz.z + 0
                new_xyz.w = org_xyz.w + 0
                new_xyz.p = org_xyz.p + 0
                new_xyz.r = org_xyz.r + 0
                new_xyz.ext1 = org_xyz.ext1 + 0
                new_xyz.ext2 = org_xyz.ext2 + 0
                new_xyz.ext3 = org_xyz.ext3 - i_val
    
        SET_EPOS_TPE (open_id, indx_pos, new_xyz, status)
    
            ENDSELECT
            
        ENDFOR
    
        CLOSE_TPE (open_id, status)
        
    END TEST_KAR_10
    Display More
  • Nation
    Typical Robot Error
    Reactions Received
    538
    Trophies
    9
    Posts
    1,919
    • October 10, 2020 at 2:43 PM
    • #16

    Delete your .pc and the .vr file it leaves behind from the controller, then recompile. The file will complie, but fail to load because there is a difference in declared varibles in the .vr file.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • October 10, 2020 at 2:57 PM
    • #17
    Quote from Nation

    Delete your .pc and the .vr file it leaves behind from the controller, then recompile. The file will complie, but fail to load because there is a difference in declared varibles in the .vr file.

    tried it, didn't help ))

  • hermann
    Reactions Received
    407
    Trophies
    9
    Posts
    2,611
    • October 10, 2020 at 3:12 PM
    • #18

    Once again the program is not correct.

    Writing programs doesn't mean to shuffle program statements found somewhere in the documentation or the internet, and hope that it will work.

    You should put the 'get_pos_typ' into the loop, otherwise you can leave it out, and assume for all position that the type is pt_rxyzwpr.

    1. means in line 46 there is a unitialized variable, looking into the code shows that the variable 'num_pos' is not initialized before using it.

    2. This is a problem of the compiler, if the program that you want to compile is selected on the virtual controller, he fails. Select a different program on the controller an compile again.

  • Kawazaki02
    Reactions Received
    1
    Trophies
    2
    Posts
    20
    • October 10, 2020 at 3:38 PM
    • #19

    Thank you for your comment. I'm just learning to program in KAREL so far, so don't judge too three. I'll try to loop the program, unsubscribe about the results =)

    I just need a little support from knowledgeable people to learn from experienced )

  • hermann
    Reactions Received
    407
    Trophies
    9
    Posts
    2,611
    • October 10, 2020 at 4:49 PM
    • #20

    Yes it is hard stuff to learn programming, it is hard stuff to learn programming a robot, but it is harder stuff to learn programming by programming a robot.

    And the next level is to learn programming on a fanuc robot with karel :astonished_face:, that will be a pain in the ass, because the debugging possiblities aren't that good.

    Good luck :upside_down_face:.

    As always I recommend to learn programming on a personal computer with a common programming language like C, Pascal, Basic, and then switch to a robot, and learn the robot specific things.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Similar Threads

  • How do I know Karel is installed?

    • ashwinmudigonda
    • February 19, 2018 at 6:53 PM
    • Fanuc Robot Forum
  • Dynamic control of FANUC Robot in Run-Time

    • Gokul N A
    • July 3, 2019 at 10:39 AM
    • Fanuc Robot Forum
  • Fanuc Code Verses Epson or ABB

    • AwfulAutomation
    • July 15, 2019 at 12:49 PM
    • General Discussion of Industrial Robots Only
  • Utility of KAREL Programming?

    • StoopidEngineer
    • April 22, 2019 at 11:10 PM
    • Fanuc Robot Forum
  • Converting a p-code in Karel function

    • emanuel_eng
    • October 9, 2017 at 8:48 PM
    • Fanuc Robot Forum
  • Fanuc Virtual Environment

    • NPG92
    • March 16, 2018 at 8:43 PM
    • Fanuc Robot Forum
  • ABB RAPID Veteran, a few question about FANUC KAREL

    • Elok
    • February 27, 2018 at 7:49 PM
    • Fanuc Robot Forum
  • Karel Program for RJ2 controller

    • demionkrishan
    • November 14, 2017 at 3:11 PM
    • Fanuc Robot Forum
  • Karel Translator Directives

    • bencor21
    • August 24, 2017 at 2:35 PM
    • Fanuc Robot Forum
  • HELP WITH FANUC R2000ib 165 F

    • Fran94
    • February 10, 2017 at 8:39 PM
    • Fanuc Robot Forum

Tags

  • Fanuc
  • karel
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download