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
Everywhere
  • Everywhere
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Members
  3. Varun Kumar

Posts by Varun Kumar

  • KUKA.Sim - Read and Write to KRL variables from python script?

    • Varun Kumar
    • October 2, 2024 at 5:13 PM

    Hi MOM Could you send a link to VRC-Interface please, just so I know I am looking at the right one? have you had any experience in exposing the KRL I/Os and variables from kuka.som to "VRC-Interface" - was it straightforward to use?

  • KUKA.Sim - Read and Write to KRL variables from python script?

    • Varun Kumar
    • September 30, 2024 at 5:35 PM

    Hello

    I am currently using kuka.sim 4.3 and have a KRL project imported. The KRL programs seem to run in kuka.sim when selected and executed individually.

    There is a cell.src script which seems to look for an external controller (possibly a PLC) to give a PG.NO to run

    Question : Is it possible to expose KRL variables in a KRL program to a python script for a component and also modify it during simulation (or) connect to the signals in the config.dat and read its output in a python script.

    It would be great to be able to read and write to KRL variables from a python script. in the case below the PGNO variable inside of getting it from L83.

    Could anyone provide an example to read and write to a KRL variable in a KRL program via a python script please? or if its even possible?

    Thanks in advance

    Images

    • image.png
      • 194.65 kB
      • 558 × 488
      • 13
  • Get current tool for robot in python script - expose to OPCUA connectivity

    • Varun Kumar
    • July 16, 2024 at 6:47 PM

    Thanks for the reply, really appreciate. I see vcComponent has a findBehaviour to get the "Tool" property in the robot but how do I access the actual name of the tool mounted

    Could you give an example script that works in kuka.sim if possible?

  • Get current tool for robot in python script - expose to OPCUA connectivity

    • Varun Kumar
    • July 16, 2024 at 5:30 PM

    Hello
    I am currently using kuka.sim 4.3

    Is possible to access the name and print out the current tool mounted on the robot through the python script in the modelling tab. Could anyone please help with a demo script for it in kuka.sim - ideally to get the robot component and the current tool its mounted during the simulation running and if there is no tool attached to display None.

    Link to setupimage -
    image.png

    Ideally, Want to expose this tool as a String property in the python program and then via opcua to an external system.
    Any help will be appreciated

    Thank you

  • Importing KRL into KUKA.Sim [ Cannot find ISMESSAGESET function ]

    • Varun Kumar
    • May 10, 2024 at 1:03 AM

    Hi Chris

    Thanks for your reply


    I couldn't find a Operate.dat in the project


    The given project has a few other .dat files, tried adding the dec to those .dat EXTFCTP BOOL ISMESSAGESET(INT MESSAGENO :IN) didnt fix it.

    Image : view?usp=sharing

    FileStructure.JPG

  • Importing KRL into KUKA.Sim [ Cannot find ISMESSAGESET function ]

    • Varun Kumar
    • May 8, 2024 at 12:53 AM

    Hello

    I am trying to import an old KUKA KRL project into KUKA.Sim 4.3. I am running the simulation with a base calibration program, but get an error in the output log as below

    Code
    KR 180 R3500 ultra K (integrated): The function 'ISMESSAGESET' could not be found.

    Can anyone with either KUKA.Sim or KRL experience please share how to fix the error.

    Thanks.

  • Python Add-on to get current robot joint angles

    • Varun Kumar
    • April 19, 2024 at 4:29 PM

    Ah I see,

    Would you know of anyway of streaming the robot joint angles from kuka sim generally? Any plugins/add-ons/connection tricks etc.

    I have seen VisualComponents can have a OnRun function and much more than kuka sim but sadly there is no trial version that I can find

  • Python Add-on to get current robot joint angles

    • Varun Kumar
    • April 19, 2024 at 3:57 PM

    Hi work_BR

    Your right, I tried that and now I can get the joint angles of the robot and print it in the output pane.

    example output for code below

    Component Name: KR 120 R3900 ultra K

    A1: 11.3650071804

    A2: -87.1914081235

    A3: 116.352129322

    A4: -132.080010476

    A5: 31.0367524825

    A6: 135.643897763

    But I want the script to run (loop) constantly which the simulation is running (i.e when the robot is moving).

    Currently I have to manually execute the script each time to read the current joint angles.

    Python
    from vcHelpers.Robot2 import *
    from vcHelpers.Selection import *
    from vcCommand import *
    import time
    
    app = getApplication()
    cmd = getCommand()
    
    def OnStart():
        rou = app.TeachContext.ActiveRoutine
        if not rou:
            print('No robot selected.')
            return
        first_state()
    
    def first_state():
        comps = getSelectedComponents()
        for c in comps:
            print("Component Name: %s" % c.Name)
            for i in range(1, 7):  # Loop from A1 to A6
                node_name = 'A' + str(i)
                node = c.findNode(node_name)
                if node:
                    print("%s: %s" % (node_name, node.Dof.VALUE))
                else:
                    print("Node %s not found in component %s" % (node_name, c.Name))
    Display More


    As far as I checked it seems like KukaSIM does not support OnRun() function? I may be wrong.

    Could anyone help out?

  • Python Add-on to get current robot joint angles

    • Varun Kumar
    • April 19, 2024 at 11:27 AM

    Hello

    I am new to the VC community and KukaSim.

    I have a Kuka robot in my workspace and wanted to know how I can have a python program to get the joint angles of the robot selected.

    The joint angles are show with sliders on the robot tab on the left when robot is selected

    Hoping to output the joint angles constantly as the robot moves

    Could you help in pointing to what python methods are available and how to access it

    view?usp=sharing

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics
  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