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

Universal Robotics Register access through RoboDK

#1
Is there a way to access the UR integer, bit, or float registers in RoboDK? The scripting language on the robot uses the form read_input__register(<# of register>). I haven't found anyway to do this inside RoboDK.

Maybe I'm going a bout this the wrong way. Let me explain the project and the methodology I've used and see if there is a better way.

我已经创建了一个模拟在python中,the robot through all of the motions it will need; however, in the real world application a lot of the logic that is currently being handled the python script will be pushed to the robot register via Ethernet/IP. Therefore, my Robot program really just needs to be a loop that looks for a lane to pick a part from (integer register). Once the part is picked it would be placed in 1 of 4 bins. These bins are identical and I have created all of the targets for one bin. Then used a reference frame to translate the bin targets to the appropriate bin (yeah basically rewrote the palletizing routine just so I could understand the software better). These targets are shown in the Layout image attached to help give you an idea of what the setup is.

Now what I'm unsure of, is can I write the program in RoboDK such that it looks at the registers to make it's decisions. In this manner the PLC can keep track of what lane needs to be picked, and which bin the pick part should be placed into. The alternative would be writing the loop on the robot pendant, but I'd really rather do it on the computer as it's more user friendly.

我觉得最大的问题是,am I going about this the wrong way?


Attached Files Thumbnail(s)

#2
Hi MickeyTen,

If I understanded your question correctly, you would like to access the registers like the attachment;

unfortunately, The Ethernet/IP Stack of UR cobot did not imeplement the class 3 server/client communcation.
https://www.universal-robots.com/article...-ip-guide/

If you decided to like to use Ethernet/ip ,
You may build an Ethernet/IP Scanner with input only/Listen only connection in RoboDK.
Here is some ethenret/ip library can help you to build an Scanner:
http://eeip-library.de/

But you need to take care about the RPI.

If you are OK to change to use Modbus TCP,
you can use ModbusTCP Client Library to access some register.

You can also build a socket by using REAL-TIME DATA EXCHANGE (RTDE)

https://www.universal-robots.com/article...tde-guide/
https://github.com/UniversalRobots/RTDE_...nt_Library


I hope it can help you.
#3
Hi Chris,

Thank you for the reply! I'm afraid I may have not been clear enough with my question.

The PLC and UR10e can communicate via Ethernet/IP with no issue. What I'm looking for is a way to program the robot via ROBODK and use the register values in the robot for decision making purposes.

For example, if I wanted to do the same thing, but use Digital Inputs I would have a program such as this...



What I am asking is; is there a way in ROBODK to query robot register values, such that I can make decisions based on their value. The reason I want to do this, is the PLC will be pushing values to the Robot's register. Basically, eliminating a lot of IO wiring.

The IO options for the wait above(shown below):



Only have options for querying the Digital or Analog I/O.
#4
This can be done using the API and the getDI function. When you are connected to the real robot, RoboDK will retrieve digital inputs from the real robot.

Example:
Code:
robot.Connect() # Connect to the real robot (not required if you use simulation)
if robot.getDI(5) > 0:
print("Do something")

elif robot.getDI(6) > 0:
print("Do something else")
#5
Yes. I understand that.. but that doesn't access the integer registers... it access the digital inputs.

To further clarify...

when `robot.getDI(5)` is translated by the post processor the resultant script file reads
Code:
while (get_standard_digital_in(5) != True):
sync()
end


This means the getDI function in the API is translated via the post_processor to get_standard_digital_in.

I need the same functionality from the API, but I need it to translate to read_input_integer_register. Does that exist?
#6
Note that waitDI and getDI have a different behavior. The first one blocks until the Digital Input reaches a specific state, the second one is only available through the API and returns the value.

Using the option read_input_integer_register is currently not possible but you can send us a support request throughHelp-Request supportin RoboDK to add this feature through the API and we can implement it by mapping an input ID range to integer registers.

For example, from id 100 and above we could read read_input_integer_register.

Code:
integer_register_6 = robot.getDI(106) # would return read_input_integer_register(6)

Would a solution like this work?
#7
Yes, that would work. Honestly, that's way I would have went about adding the function.

Also.. you've answered my question. What I want to do currently isn't possible. In the meantime, I will see if I can just get a program "close enough" through robodk then just edit the script file to add the functionality I need.

I'll put in a help-support ticket, also. Thanks for the feedback!




Users browsing this thread:
1 Guest(s)