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

How to get Realtime data position and power consumsion with Ethernet KRL

  • rakhaswm
  • June 7, 2024 at 4:13 AM
  • Thread is Unresolved
  • rakhaswm
    Posts
    1
    • June 7, 2024 at 4:13 AM
    • #1

    Hai All!!!
    Good day for all
    I have some problem to get realtime data position and power consumsion

    For system variable $POST_ACT / $POST_ACT_MEAS / $AXIS_ACT / $AXIS_ACT_MEAS / $ENERGY_TOTAL
    I dont have reference for access or declare this variable to send with Ethernet KRL

    and this my code

    LOOP
    ;insert your code here

    RET=EKI_Init("SendParsing")
    RET=EKI_Open("SendParsing")

    ;FOLD Write data to connection
      
    RET=EKI_SetString("SendParsing","Robot/Info/RobotName", $ROBTRAFO[])
    RET=EKI_SetInt("SendParsing","Robot/Info/SerialNum", $KR_SERIALNO)
      
    RET=EKI_SetInt("SendParsing","Robot/Data/Power/OperatingTime", $ROBRUNTIME) ;minute
    RET=EKI_SetInt("SendParsing","Robot/Data/SpeedAct", $OV_PRO)
    RET=EKI_SetInt("SendParsing","Robot/Data/SpeedJog", $OV_JOG)
      
    RET=EKI_SetINT("SendParsing","Robot/Data/MachineRunTime/ProgramRunTime", $ROB_TIMER) ;
    RET=EKI_SetBool("SendParsing","Robot/Data/Gripper", $TCP_IPO)
    RET=EKI_SetBool("SendParsing","Robot/Data/Power/PowerStatus", $POWER_FAIL)
    RET=EKI_SetReal("SendParsing","Robot/Data/Current/1", $CURR_ACT[1])
    RET=EKI_SetReal("SendParsing","Robot/Data/Current/2", $CURR_ACT[2])
    RET=EKI_SetReal("SendParsing","Robot/Data/Current/3", $CURR_ACT[3])
    RET=EKI_SetReal("SendParsing","Robot/Data/Current/4", $CURR_ACT[4])
    RET=EKI_SetReal("SendParsing","Robot/Data/Current/5", $CURR_ACT[5])
    RET=EKI_SetReal("SendParsing","Robot/Data/Current/6", $CURR_ACT[6])
      ON_ERROR_PROCEED
    IF $ERR.NUMBER > 0 THEN
    RET=EKI_SetReal("SendParsing","Robot/Data/A1", $AXIS_ACT.A1)
    RET=EKI_SetReal("SendParsing","Robot/Data/A2", $AXIS_ACT.A2)
    RET=EKI_SetReal("SendParsing","Robot/Data/A3", $AXIS_ACT.A3)
    RET=EKI_SetReal("SendParsing","Robot/Data/A4", $AXIS_ACT.A4)
    RET=EKI_SetReal("SendParsing","Robot/Data/A5", $AXIS_ACT.A5)
    RET=EKI_SetReal("SendParsing","Robot/Data/A6", $AXIS_ACT.A6)
    RET=EKI_SetReal("SendParsing","Robot/Data/E1", $AXIS_ACT.E1)
    RET=EKI_SetReal("SendParsing","Robot/Data/E2", $AXIS_ACT.E2)
    RET=EKI_SetReal("SendParsing","Robot/Data/E3", $AXIS_ACT.E3)
    RET=EKI_SetReal("SendParsing","Robot/Data/E4", $AXIS_ACT.E4)
    RET=EKI_SetReal("SendParsing","Robot/Data/E5", $AXIS_ACT.E5)
    RET=EKI_SetReal("SendParsing","Robot/Data/E6", $AXIS_ACT.E6)
    ERR_CLEAR($ERR)
    ERR_CLEAR($ERR)
    ELSE

    ENDIF
       
      ON_ERROR_PROCEED
    IF $ERR.NUMBER > 0 THEN
    RET=EKI_SetReal("SendParsing","Robot/Data/Pos/X", $POS_ACT_MES.X)
    RET=EKI_SetReal("SendParsing","Robot/Data/Pos/Y", $POS_ACT_MES.Y)
    RET=EKI_SetReal("SendParsing","Robot/Data/Pos/Z", $POS_ACT_MES.z)
    RET=EKI_SetReal("SendParsing","Robot/Data/Pos/A", $POS_ACT_MES.A)
    RET=EKI_SetReal("SendParsing","Robot/Data/Pos/B", $POS_ACT_MES.B)
    RET=EKI_SetReal("SendParsing","Robot/Data/Pos/C", $POS_ACT_MES.C)
    ERR_CLEAR($ERR)
    ELSE

    ENDIF
      
      
    ;FOLD Get Mode Operational
    SWITCH $MODE_OP
    CASE #AUT
    RET=EKI_SetString("SendParsing","Robot/Data/Mode", "Automatic Mode")
    CASE #EX
    RET=EKI_SetString("SendParsing","Robot/Data/Mode", "Automatic External Mode")
    CASE #T1
    RET=EKI_SetString("SendParsing","Robot/Data/Mode", "T1 Mode")
    CASE #T2
    RET=EKI_SetString("SendParsing","Robot/Data/Mode", "T2 Mode")
    CASE #INVALID
    RET=EKI_SetString("SendParsing","Robot/Data/Mode", "Invalid Operating Mode")
    DEFAULT
    ;insert your code here
    ENDSWITCH
        
    SWITCH $ABS_ACCUR
    CASE #ACTIVE
    RET=EKI_SetString("SendParsing","Robot/Data/ABSStats", "ACTIVE")
    CASE #INACTIVE
    RET=EKI_SetString("SendParsing","Robot/Data/ABSStats", "INACTIVE")
    CASE #NONE
    RET=EKI_SetString("SendParsing","Robot/Data/ABSStats", "NONE")
    DEFAULT
    ;insert your code here
    ENDSWITCH
    ;ENDFOLD (Write Mode Operation)
      
    RET=EKI_SetBool("SendParsing","Robot/Data/SafetyStatus", $STOPMESS)
      
    ;FOLD Get POSE Data
    ;ON_ERROR_PROCEED
    ;IF $ERR.NUMBER > 0 THEN
    ;ERR_CLEAR($ERR)
    ;ELSE

    ;ENDIF
    ;ENDFOLD (Write Axis Data)

    ;ENDFOLD (Write data to connection)
    RET = EKI_Send("SendParsing","Robot")
    ;wait until data read

    ;WAIT FOR $FLAG[1]
    ;FOLD WAIT Time= 1.0 sec ;%{PE}
    ;FOLD Parameters ;%{h}
    ;Params IlfProvider=kukaroboter.basistech.inlineforms.logics.wait; Time=1.0
    ;ENDFOLD
    WAIT SEC 1.0
    ;ENDFOLD
    RET=EKI_Close("SendParsing")
    RET=EKI_Clear("SendParsing")
    ENDLOOP
    END


    Can you help me to give me suggestion or knowledge or method for read data pose robot and power consumsion?

    Thanks before

  • Fubini June 7, 2024 at 4:48 AM

    Approved the thread.
  • panic mode
    Reactions Received
    1,263
    Trophies
    11
    Posts
    13,030
    • June 7, 2024 at 2:28 PM
    • #2

    Check spelling ..


    There is no system variable $POST_ACT... Ut is $POS_ACT

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • panic mode
    Reactions Received
    1,263
    Trophies
    11
    Posts
    13,030
    • June 7, 2024 at 2:35 PM
    • #3

    Also cartesian values only exist when tool an base are initialized. Your code has no coping mechanism for this so it will crash when tool or base are not set

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

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

Tags

  • KUKA Robot
  • Ethernet KRL
  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