Hello dear Robot Forum users, I am an engineering student and my thesis is to make a kuka 15/2 robot with KRC1 work with a PC. The plan is to control the position and even the speed of each axis if possible. I have made my search and found out that it is possible through the serial RS232 if i understand everyting correctly. I have no prior experience and what i have come to think is that on the robot's side it must be configured with a program (KRL) to open the port and read the variable of the target position and from the PC to send the data accoriding to the protocol 3964r? this is the easiest way to control the robot?
KRC1 How to get it to work with a PC
-
Angelos Stathis -
February 28, 2017 at 6:15 PM -
Thread is marked as Resolved.
-
-
You don't mention your KSS version or any other details of your KRC1 (see the READ FIRST sticky topic), so it's hard to say if you have any other alternatives, but most likely the method you describe is your best option. Any of the alternative methods would require additional hardware and/or software that you probably do not have.
So, yes, this would require a "client" program running on the robot, and a "server" program running on the master PC. When the robot is ready to accept a command, it would send a request to the server, and receive a response with parameters for what the robot would execute next.
Keep in mind, this will not be realtime control in any sense. An RS-232 connection simply can't handle that. But for simple Move/Command/Move stepwise control, this will serve. I have an old bare-bones serial-comms example at kuka.skyefire.org that may help a bit. For the server-side program... well, it depends on what programming language you use, but example applications that listen to a COM port and receive/send formatted strings over that port abound on the internet. I've found this book to be useful on the subject in the past: https://amzn.to/2ZONKGb
-
So the details are (under the info):
KRC1 V2.3.24 SP07GUI VERSION V2.3.33
KERNEL SYSTEM VERSION KS V2.76_23
ROBOT TYPE #KR15_1 floor ZH01R1 Mada V14.4.0/KUKA 2.3
Why isnt a realtime control possible? Is it because of the baud rate? I mean the preset for KRC1 is 9600, but cant that be changed to 115200?
-
Baud rate isn't really the issue. It's the buffering and the effect of opening/closing ports. Basically, the serial drivers were never written to support that kind of thing. RS232 also isn't a guaranteed hard-realtime timebase. The KRC's Function Generator, and later RSI/FTC, were written to work over FieldBus communications, and later TCP/IP (using a special realtime Ethernet card added to the KRC2-series controllers). I don't think any of those, beyond the FG, are available in KRC1s.
The other issue is that only RSI (and, to a lesser extenet, the FG) can perform realtime control of robot motion, and neither one ever supported RS232. With an RS-232 control setup, once you issue the robot a motion command, that motion will complete before the robot can look for another command (barring very tricky uses of Interrupts, but you can't get continuous motion with Interrupts -- at best, you halt the robot, cancel the active motion, and begin a different motion)
Basically, with RS232, you can move, stop, communicate, move, stop, communicate, etc. Eliminating the stop&go motion... isn't impossible, but could be very tricky. I only know of one person who ever got something close to realtime communication out of an RS232 connection, but he wasn't using it for control. That was decades ago and I never saw the actual code.
If you really need to avoid stop&go, you can try using communication subroutines buried in TRIGGER commands (probably also turning $ADVANCE down to 1), or possibly run all your communications from the SPS. But staying far enough ahead of the motion pointer will be the trick.
-
A few years a go i tried to do an application to move the robot via RS232, to send data i use the software "RealTerm: Serial/TCP Terminal" , but i have troubles to configure the KRC maybe the RealTerm: Serial/TCP Terminal was useful to you
BR
-
Full ack to SkyeFires annotations.
As far as I know, with this old version of KSS You will have to use 3964R protocol, this already is a pain in the ass to realize if You have to do it from scratch. I have done this many years ago.May be it is simpler (but more expensive) to use a fieldbus adapter (DeviceNet Slave) in the PC to communicate via fieldbus. On the robot side this will be much simpler to realize and easier to get a bit of realtime feeling than with the serial interface.
I have done this also many years ago and it felt near realtime. It was a hand guided robot with a Spacemouse, used in real life for many years, may be it is used still now for programming paths.