July 18, 2019, 03:36:07 PM
Robotforum | Industrial Robots Community

 Serial Communication (PC -> KUKA KRC2 5.2)

normal_post Author Topic:  Serial Communication (PC -> KUKA KRC2 5.2)  (Read 319 times)

0 Members and 1 Guest are viewing this topic.

July 10, 2019, 12:47:32 PM
Read 319 times
Offline

Guedes24


Hi, Robot Forum!    :help: :help:
I'm an engineering student and still have very few experience in robotics.
I would like some help in Serial Communication between a PC (Python programming) and KUKA Robot.
I'm working with a KUKA KR 6 Arc, its controler is KRC2 and the software that comes with it is the KSS 5.2.21 version. Can somebody help me with an example code? I'll leave here a picture of my code on the PC side (Python) and on the KUKA side.
Thanks in advance for your help and support!   :icon_smile: :icon_smile:



Today at 03:36:07 PM
Reply #1

Advertisement

Guest

July 10, 2019, 02:50:13 PM
Reply #1
Offline

SkyeFire

Global Moderator
...what, specifically, do you need help with?  What happens when you test it?  Have you tested both ends independently using a terminal emulator like puTTY or MobaXterm?

July 10, 2019, 03:21:51 PM
Reply #2
Offline

Guedes24


Hi Skyefire, thanks in advance for your response.
I want to send a letter (for example "a") or a number (for example "1") from Python (PC) to KUKA. When receiving the letter or the number successfuly, it will execute a function I developed on KUKA, where the robot will move into a certain position.
I've no idea how to do it successfuly.

- When I comunicate with the Hyper Terminal of the robot, it works fine.
- I'm using COM3 on KUKA.

Can you please help me with any example of a code?

July 10, 2019, 07:59:43 PM
Reply #3
Offline

SkyeFire

Global Moderator
What code?  You just said that when you test communications with the robot using HyperTerminal, it works fine, so you must have working code in the robot already.  If you want help with the Python code, this is the wrong forum -- I suggest StackOverflow.

July 10, 2019, 09:44:46 PM
Reply #4
Offline

panic mode

Global Moderator
I guess he used terminal on controller instead of KRL program just to see if it can work and if his cable us ok.


Now he wants to do a real thing.


But this is just a guess.. .
1) http://www.robot-forum.com/robotforum/kuka-robot-forum/read-first/
2) if you want reply about robot, post it in forum
3) read 1 and 2

July 11, 2019, 02:13:14 PM
Reply #5
Offline

SkyeFire

Global Moderator
Well, I never did a lot of serial on KRC2s, and it's been at least ten years since I did any, but I dug a set of old test files out of my archives that I know worked.  I was emulating a serial console connection to a Keyence camera.

IIRC, setting COM3 to use XON/XOFF in SERIAL.INI was important -- that's the "bare bones" protocol.

Adding ASCII control characters (like CR and LF) to a string before sending requires adding them to the end of a string variable as integers.

July 11, 2019, 04:45:28 PM
Reply #6
Offline

panic mode

Global Moderator
Yup, for software handshake (XON/XOFF) only three wire cable is needed (Tx, Rx and GND).
For hardware hanshaking, control lines also must be wired.

Today at 03:36:07 PM
Reply #7

Advertisement

Guest

July 15, 2019, 06:39:55 PM
Reply #7
Offline

Guedes24


Thanks for all the help messages   :icon_smile:
I've solved my problem.
My problem was in the file $custom.dat and its parameters.

Many thanks again for the excellent support  :merci: :merci: :bravo:


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
Serial Communication Kuka and PC (KRC 2 V5.5)

Started by sfh06fsu on KUKA Robot Forum

8 Replies
1336 Views
Last post March 01, 2018, 03:06:16 PM
by panic mode
xx
Serial Communication Kuka and PC (KRC 2 V5.5) SOLUTION

Started by sfh06fsu on KUKA Robot Forum

1 Replies
588 Views
Last post March 13, 2018, 03:20:46 PM
by SkyeFire
clip
Kuka Continous Serial Communication

Started by flavyx on KUKA Robot Forum

0 Replies
789 Views
Last post April 26, 2017, 07:52:14 PM
by flavyx
clip
Serial communication problem between PC and KUKA KRC1

Started by ateknea on KUKA Robot Forum

4 Replies
2904 Views
Last post April 19, 2016, 12:53:18 PM
by kayjee