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

Help with INTP-322 Alarm code

  • naresh
  • April 5, 2017 at 3:25 PM
  • Thread is Resolved
  • naresh
    Trophies
    3
    Posts
    4
    • April 5, 2017 at 3:25 PM
    • #1

    Dear All,

    I wrote a Karel program that receives joint angles via TCP/IP protocol and moves the robot to desired position, which is working fine. Then I copied the same code and saved with other name. Now strange thing is that when I run the new program, it throws INTP-322 Alarm code with line number. Below is the code.

    CNV_REL_JPOS(j,act_jnt,stat)

    Even I have checked the variables by writing them to user panel, all of them are initialized properly.

    Now my question is that why I am getting Alarm code, while the exactly same code is running without having any problems in other program.

    Could any one help me to understand and resolve this issue. By the way I am working with R-30iA controller.

    Thanks for your time in advance.

    Regards,
    Naresh

  • bidzej
    Reactions Received
    23
    Trophies
    4
    Posts
    592
    • April 5, 2017 at 4:28 PM
    • #2

    The description for the error is "KAREL program error. The argument value of a built-in routine was wrong."

    Are you executing the program on the very same controller as the older version?
    Are the variable definitions in the same .KL file as the rest of the program? Have you copied them together with the rest of the source code?

  • naresh
    Trophies
    3
    Posts
    4
    • April 5, 2017 at 5:24 PM
    • #3

    Hello bidzej,

    First of all thanks for your reply.

    Yes I am running the both programs on the same controller. variables are also same. Basically It is the same code, the only difference is change in program name.

    Regards,
    Naresh

  • bidzej
    Reactions Received
    23
    Trophies
    4
    Posts
    592
    • April 5, 2017 at 7:44 PM
    • #4

    Interesting... Are all the variables local, or does anything come from another program (FROM: instruction after the definition)?
    I have no sensible idea why this could happen :hmmm: Would be best if you could post the whole code here...

  • naresh
    Trophies
    3
    Posts
    4
    • April 6, 2017 at 12:41 PM
    • #5

    Hello bidzej,

    yes, all the variables are local. Here is the sample code

    PROGRAM manlmode
    %NOLOCKGROUP
    VAR
    comm_port : FILE
    j : ARRAY[6] OF REAL
    stat : INTEGER
    jnt : JOINTPOS
    vel_ : REAL
    jnt1 : STRING[14]
    test : STRING[54]
    xj, yj, zj, rxj, ryj, rzj, id,vels : STRING[15]
    CONST

    BEGIN

    MSG_DISCO('S3:',stat)
    MSG_CONNECT('S3:',stat)
    OPEN FILE comm_port('rw','S3:')

    RUN_TASK('MOVEJ',0,TRUE,TRUE,1,stat)

    START_LOOP ::

    READ comm_port (id::0::2)
    READ comm_port (xj::0::2)
    READ comm_port (yj::0::2)
    READ comm_port (zj::0::2)
    READ comm_port (rxj::0::2)
    READ comm_port (ryj::0::2)
    READ comm_port (rzj::0::2)
    READ comm_port (vels::0::2)
    WRITE('id:',id, CR)

    CNV_STR_INT(id,cur_id)

    IF(cur_id = 2) THEN

    CNV_STR_REAL(xj, j[1])
    CNV_STR_REAL(yj, j[2])
    CNV_STR_REAL(zj, j[3])
    CNV_STR_REAL(rxj, j[4])
    CNV_STR_REAL(ryj, j[5])
    CNV_STR_REAL(rzj, j[6])
    CNV_STR_REAL(vels,vel_)
    WRITE('vel:',vel_,CR)

    CNV_REL_JPOS(j,jnt,stat)
    SET_JPOS_REG(1,jnt,stat)

    ENDIF

    DELAY (50)
    GO TO START_LOOP
    END manlmode

  • bidzej
    Reactions Received
    23
    Trophies
    4
    Posts
    592
    • April 6, 2017 at 4:02 PM
    • #6

    ok, try changing the definition of the variable j from ARRAY[6] OF REAL to ARRAY[9] OF REAL - the length of the array must be equal or greater than the number of joints in the system, and 9 is the default value...

  • naresh
    Trophies
    3
    Posts
    4
    • April 6, 2017 at 5:08 PM
    • #7

    I even tried that, but it didn't work. I still have the same alarm code :wallbash:. Its really very strange that old application is working but not new one. I need these two applications because user should able to select from one of these two applications to move the robot either in manual mode or in auto mode.

    RUN_TASK('MOVEJ',0,TRUE,TRUE,1,stat)

  • lemon132
    Reactions Received
    2
    Trophies
    2
    Posts
    14
    • January 17, 2022 at 12:00 PM
    • #8

    having a similar error did you find a solution ? thanks

  • lemon132
    Reactions Received
    2
    Trophies
    2
    Posts
    14
    • January 17, 2022 at 3:32 PM
    • #9

    worked for me by replacing jointpos by jointpos6 data type

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
  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