Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

KUKA KRC4 I/O management and mapping

#1
   
hello. I am currently working on a project using RoboDK and Kuka Robot's KRC4 controller.
However, although I am confident that I have studied a lot about RoboDK's various functions, I am having a lot of difficulties controlling the I/O of the robot controller with RoboDK's program.
When I use RoboDK as it is set at the beginning, I can see that IO_1 and IO_2 are properly outputting the digital output of the C4 controller, but IO_3 and IO_4 are not outputting. (As you can see in the attachment)
Currently, it is difficult to learn how to map the digital input/output of the robot controller with RoboDK because it is difficult to find an accurate manual or training video. I would appreciate it if you could provide a solution quickly.
#2
Could you please upload the attachment you mentioned?
What postprocessor or driver were you using when you experienced these difficulties?
#3
(05-22-2024, 08:12 AM)Sergei Wrote: Could you please upload the attachment you mentioned?
What postprocessor or driver were you using when you experienced these difficulties?

Thank you RoboDK for your quick response.
I have solved the problem.
The cause was that I had connected another robot that I animated, not the Kuka robot, to a program that had 3 or 4 different I/Os.
I changed the robot in the program and the I/O is working properly.
I'm sure I'll have many more questions and frustrating blockages in the future, so thank you for your quick response. Thank you.

Currently, I am trying to control Digital Input/Output using Kuka C4 controller.
I want to read the digital input 4 bit from the parent controller, move to the target of that number, and echo the movement completion signal to the digital output. Can you give me an example of a flow control program in Python or command tree?
#4
First, you can enable flow control statements by clicking on a station and selecting Station parameters - Enable flow control statements.
This will allow you to add custom variables such as state flags and implement state machine logic.

You can then assign various state-related actions to subroutines that will be called from the main program running in Loop mode (right-click on the program and select the Loop checkbox).

I attached an example station.

   


Attached Files
.rdk   pos_signal.rdk (Size: 1.54 MB / Downloads: 63)
#5
Thanks for the example.
The problem I don't understand yet is that I only see the wait statement for the digital input, but I would appreciate if you could show me the one that reads the digital input and stores it in a variable.
#6
If you are using a KUKA robot controller you can get or set the value of any variable such as a digital input using the API and the GET/SET driver commands with the driver.

For example:
Code:
RDK.setRunMode(RUNMODE_RUN_ROBOT)
value = robot.setParam("Driver", "GET $IN[1]")
print(value)
# Then, you can optionally set it to a global variable.
robot.setParam("Driver", "SET $global_var=" + value)
#7
When I programmed by Python like below.
The digital output deos not appear, would you kindly tell me the reason?

------------------------------------------------------------------------------
from robolink import * # RoboDK API
from robodk import * # Robot toolbox
import time

RDK = Robolink()

robot = RDK.Item('KUKA KR 6 R700-2', ITEM_TYPE_ROBOT)

turn90_port_y03 = 3
robot.setDO(turn90_port_y03, True)
#8
(05-26-2024, 05:20 PM)Albert Wrote: If you are using a KUKA robot controller you can get or set the value of any variable such as a digital input using the API and the GET/SET driver commands with the driver.

For example:
Code:
RDK.setRunMode(RUNMODE_RUN_ROBOT)
value = robot.setParam("Driver", "GET $IN[1]")
print(value)
# Then, you can optionally set it to a global variable.
robot.setParam("Driver", "SET $global_var=" + value)

That's good. I can read the input of robot input.
And then, what is the output command for that.

robot.setParam("Driver", "SET $OUT[1], True")

Is it Okay?
  




Users browsing this thread:
2 Guest(s)