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 question

  • Fabian Munoz
  • August 5, 2020 at 2:50 PM
  • Thread is Unresolved
  • Fabian Munoz
    Reactions Received
    134
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • August 5, 2020 at 2:50 PM
    • #1

    I dont get why i'm getting uninitialized data On register 3 i have a value of 5 for sure and in pr5 i have a comment "pick point"

    I keep reading the manual and i dont get it and it's so simple:pouting_face::pouting_face::pouting_face:

    Retired but still helping

  • Nation
    Typical Robot Error
    Reactions Received
    556
    Trophies
    9
    Posts
    1,937
    • August 5, 2020 at 3:50 PM
    • #2

    Would you be able to post the code, in text format?

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

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

  • Fabian Munoz
    Reactions Received
    134
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • August 5, 2020 at 3:57 PM
    • #3

    Hi

    I initialized the variables, still does not work

    I had sothing similar running for testing, then I "clean" the code and it's not working, and it;s so simple


    PROGRAM PRcomment

    VAR

    status: INTEGER

    pos_cmt: STRING[30]

    pr_nr:INTEGER

    register_no :INTEGER

    real_flag :BOOLEAN

    int_value :INTEGER

    real_value :REAL

    -- SR[1] will manage the comments names for the registers

    BEGIN

    status=1

    pr_nr=1

    register_no=1

    real_flag=TRUE

    int_value =1

    real_value =1

    pos_cmt = 'aaa'

    -- Read value from register 3, flag it if it is integer or real

    GET_REG(3,real_flag,int_value,real_value,status)

    -- Read comment of an specific position register

    GET_PREG_CMT(int_value, pos_cmt, status)

    -- Write comment from PR to an specific string register

    SET_STR_REG(1,pos_cmt,status)

    END PRcomment

    Retired but still helping

  • Nation
    Typical Robot Error
    Reactions Received
    556
    Trophies
    9
    Posts
    1,937
    • August 5, 2020 at 4:05 PM
    • #4

    Odd. I compiled your code, and it works fine on my machine. I tested it with your values and a few others.

    Maybe try deleting your code and the vr file it leaves, then recompile and see if it works.

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

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

  • Fabian Munoz
    Reactions Received
    134
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • August 5, 2020 at 4:24 PM
    • #5

    I deleted, then compiled again and it works

    Weird, because I thought that i did in the last hour of my life that i never getting back

    Thanks

    Retired but still helping

  • Sangito
    Reactions Received
    1
    Trophies
    3
    Posts
    2
    • October 1, 2020 at 2:42 PM
    • #6

    Look like your register is empty or 0.

    Put a value in it see what happen.

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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Similar Threads

  • Karel Language- get P position from a TP program

    • rudolf1385
    • May 28, 2020 at 11:33 AM
    • Fanuc Robot Forum
  • Karel question

    • JRivard
    • January 10, 2019 at 9:46 PM
    • Fanuc Robot Forum
  • ABB RAPID Veteran, a few question about FANUC KAREL

    • Elok
    • February 27, 2018 at 7:49 PM
    • Fanuc Robot Forum
  • Reading from keyboard KAREL

    • MajsterSyru
    • October 13, 2017 at 12:13 AM
    • Fanuc Robot Forum
  • How to check for joint angles and axis orientation in Karel code?

    • utkarshsinghnain
    • December 1, 2016 at 12:58 AM
    • Fanuc Robot Forum
  • Question of difference between *.tp and *.pc

    • toso
    • October 7, 2016 at 8:38 AM
    • Fanuc Robot Forum
  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