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

Sending Position From PC to Robot via RSI

  • JM212
  • August 18, 2021 at 2:15 AM
  • Thread is Unresolved
  • JM212
    Reactions Received
    1
    Trophies
    2
    Posts
    43
    • August 18, 2021 at 2:15 AM
    • #1

    KRC v8.3.8165

    RSI v3.3.3

    I am trying to send data from an external motion controller in real-time via the RSI option. I have set-up the RSI as per the manual and tried using the Example server application. It is very inconsistent for me. I have got communication between the two, sometimes I am able to use the example application - and only move it a few mm before it errors:

    But most of the time I am receiving this error:

    KSS29002

    Signal flow(running): Object ETHERNET1 returns error RSITimeout.

    I'm not too sure why it is timing out, or the solution to fix this issue.

    My next question is, how do I send the motion controllers data from a C program I have written to the robot ( I get that I need to put it in some sort of XML file, but where does the RSI read that data?). I dont understand how the RSI Visual gets external data from the example application into the Ethernet1 object, and then I don't know how I could read that data sent from the PC on the robot to then make it move to that position. First time trying to use RSI, so my knowledge and understanding on it is very basic, minimal. Let me know if you need any more info.

  • panic mode
    Reactions Received
    1,296
    Trophies
    11
    Posts
    13,136
    • August 18, 2021 at 3:51 AM
    • #2

    The corrections need to be small or they will quickly wind up or exceed the correction limit.

    RSI expects solid connection and messages every few milliseconds. If the external system acting as server cannot keep up, you will get timeout and everything stops....

    You can use wireshark to monitor connection. Each message gets timestamp...

    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

  • JM212
    Reactions Received
    1
    Trophies
    2
    Posts
    43
    • August 18, 2021 at 4:52 AM
    • #3

    okay thanks, So what if I have a motion controller that is sending poses that it would like the robot to mimic. ie tracking a hand, am I able to send real-time xyzabc pose?

  • robonovak
    Reactions Received
    7
    Trophies
    3
    Posts
    47
    • August 20, 2021 at 1:11 AM
    • #4

    JM212 it sounds like you have two problems:

    1. Your RSI connection is timing out

    Quote from JM212

    Signal flow(running): Object ETHERNET1 returns error RSITimeout.

    RSI, when running over an ethernet TCP connection and not in IPO_FAST mode, sends a query to your server every 12ms, and expects a reply within 8ms (if I recal). If the response from the server is received outside of that window, the packet is marked as "delayed", and the Delay counter in the next query packet is incremented by 1. When that delay counter reaches the configured maximum count of delayed packets, the link will break.

    Workstation PCs are NOT realtime systems, and while they can usually run quite fast, any given process is not protected from being sidelined by the OS task scheduler in favor of a higher priority process. An example of a high priority OS process is a video/audio player, as these tolerate very little delay.

    Fixes for this are multiple. You can make your RSI link code faster, or get a faster PC. You can increase the priority of the processes managing the link, or move that component of your system onto a Realtime system.

    2. Your Correction Limits are Too Low

    Once you manage to get your server to run fast enough to support an RSI link, your corrections are exceeding the correction limits. I know that when using RSI with KRC2s, the solution is a simple ST_SETPARAM() call targeting a ST_PATHCORR object. with KRC4, you're probably gonna have to RTFM to figure out how to increase the correction limits.

    Note that increasing the correction limits puts you at risk for horrendous, robot-destroying crashes if you f up. We've implemented our own full trajectory management and build volume monitoring processes for our RSI application, and it wasn't a small amount of work. You have been warned.

  • robonovak
    Reactions Received
    7
    Trophies
    3
    Posts
    47
    • August 20, 2021 at 1:20 AM
    • #5

    This thread (and my response in it) is relevant to you:

    self-developed UDP server can receive xml file from robot but cannot send xml su

  • JM212
    Reactions Received
    1
    Trophies
    2
    Posts
    43
    • August 20, 2021 at 4:06 AM
    • #6

    Thanks Robonovak, and what is the format to send a packet via udp.

    "b'<Sen Type=\"ImFree\"><EStr>Message from RSI Control Server - PPG !</EStr><AxisCorr A1=\"" + x_str + "\" A2=\"" + z_str + "\" A3=\"" + y_str + "\" A4=\"" + "0" + "\" A5=\"" + "0" + "\" A6=\"" + "0\"" + "/><RKorr X=\"0.00001\" Y=\"0.0000\" Z=\"0.0000\" A=\"0.0000\" B=\"0.0000\" C=\"0.0000\" /><IPOC>" + test2.c_str() + "</IPOC></Sen>\n'";

    Or do I need to send it closer to this:

    <root><Axis1>0.0</Axis1><Axis2>0.2</Axis2><Axis3>0.0</Axis3><Axis4>0.0</Axis4><Axis5>0.0</Axis5><Axis6>0.0</Axis6><Direction>1</Direction></root>

    but filled in correctly

    Edit:

    This is what Im receiving and sending from PC side

    Edited once, last by JM212 (August 20, 2021 at 5:26 AM).

  • JM212
    Reactions Received
    1
    Trophies
    2
    Posts
    43
    • August 20, 2021 at 8:58 AM
    • #7

    I know it doesnt show PosCorr, but what values should I be sending for that. It seems anything above 1 is too fast for the robot atleast in T1 Mode

  • SkyeFire
    Reactions Received
    1,060
    Trophies
    12
    Posts
    9,456
    • August 20, 2021 at 2:52 PM
    • #8
    Quote from JM212

    I know it doesnt show PosCorr, but what values should I be sending for that. It seems anything above 1 is too fast for the robot atleast in T1 Mode

    RSI operates on a 12ms clock cycle. POSCORR objects accept inputs in millimeters. This means that sending a POSCORR object a value of 1.0 is ordering the robot to move 1.0mm in 12ms, or 83mm/s.

    While this is a velocity the robot should be able to attain, RSI operates "below" many of the robot's normal path-smoothing features. So switching a POSCORR input from 0.0 to 1.0 is equivalent to ordering the robot to accelerate from 0mm/s to 83mm/s in 12ms, an acceleration of nearly 7 meters/S^2. In normal KRL motions, the robot would simply accelerate as best it can and attempt to reach the target velocity, but RSI bypasses these protections. If you give the POSCORR input values (or changes to those inputs) that command impossible velocities or accelerations, the motion planner will simply fault.

    Using RSI requires the person programming the RSI container to create their own PID algorithm to shape the POSCORR inputs such that the robot is not given motion commands that violate the motion envelope limits.

  • robonovak
    Reactions Received
    7
    Trophies
    3
    Posts
    47
    • August 20, 2021 at 9:42 PM
    • #9

    JM212

    Quote from JM212

    "b'<Sen Type=\"ImFree\"><EStr>Message from RSI Control Server - PPG !</EStr><AxisCorr A1=\"" + x_str + "\" A2=\"" + z_str + "\" A3=\"" + y_str + "\" A4=\"" + "0" + "\" A5=\"" + "0" + "\" A6=\"" + "0\"" + "/><RKorr X=\"0.00001\" Y=\"0.0000\" Z=\"0.0000\" A=\"0.0000\" B=\"0.0000\" C=\"0.0000\" /><IPOC>" + test2.c_str() + "</IPOC></Sen>\n'";

    This is not correct, but is closer than the other packet you pitched.

    WIth regards to packet format, the format is mostly determined by which ***_CORR blocks you are using in your KRL program. If you have AXISCORR, then you will need the <AKorr ...> subtag. If you have POSECORR, then you will need the <RKorr ...> subtag.


    Note: the above is not STRICTLY true - depending on your program, you can structure the corrections within the XML in whichever way you want. This might be easier for you to get rolling, though.

    Note: You don't have to supply both cartesian correction and axis corrections. Indeed, I'm not sure what happens if you try to use both at the same time. Nothing good, I expect. The only time I've done this was when I was driving a 7-axis robot - we drove the robot position through POSECORR, and the external rail through AXISCORR.


    The IPOC must be an integer that matches the IPOC entry of the packet you just received. Otherwise the link gets unhappy. That might be what you're doing with the test2.c_str() entry, but I can't be sure.

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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  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