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?
Posts by Varun Kumar
-
-
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
-
-
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 -
-
-
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
-
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 belowComponent 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
Display Morefrom 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))
As far as I checked it seems like KukaSIM does not support OnRun() function? I may be wrong.Could anyone help out?
-
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 selectedHoping 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