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

how diagnose serial program?communicate kuka robot and PC via COM

  • namkocao
  • February 23, 2009 at 7:06 AM
  • Thread is Resolved
  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,429
    • February 26, 2009 at 2:42 PM
    • #21

    Judging from the Telnet messages you saw, you're at least halfway there. You are opening the port and transmitting data.

    If you're trying to loop the data back into the KRC2, simply connecting the Rx and Tx lines on the RS-232 port may not be enough. Check this link:

    http://www.airborn.com.au/rs232.html

    Partway down the page, there is a diagram for a DB9 "Loopback Test Plug". This wires the handshaking lines together as well as the Tx and Rx lines. I've found in the past with some RS232 setups that you need those lines wired in order to get the port to work properly.

    I've never used the Loopback plug on a KRC, but since the KRC serial ports are the same as a PC serial port, this should work.

    The other thing you can try is to create a full 9-pin "Null Modem" cable, as shown on that web page, and connect your KRC to another PC. Using Hyperterminal on the other PC, if the settings are correct, you should see what the KRC sends, and should be able to type in text and see it received in the Telnet window on the KRC.

  • lindepauli
    Guest
    • February 26, 2009 at 3:00 PM
    • #22

    answers in order of questions

    -- you see nothing :hmmm:

    -- 3 sec is your timeout, you haven't receive any character
    the R goes red after the CREAD ?
    do you get the error 1422 "invalid value J"
    if yes, thanks for your information about it

    -- wrong cable ? I'm not a clairvoyan

    -- no

    please follow the advices from SkyeFire

    SkyeFire
    thanks for your advices - my patience is almost gone

  • namkocao
    Guest
    • February 26, 2009 at 4:02 PM
    • #23

    hi
    when I check the variable of I ,I do not see the value of I
    yes, I got the error 1422 "J valid value"
    I will follow the advices from SkyeFire
    I will check my cable
    thanks a lot everyone! :merci:

    Edited once, last by namkocao (February 26, 2009 at 4:37 PM).

  • namkocao
    Guest
    • February 27, 2009 at 9:40 AM
    • #24

    hi
    I communicated kuka robot and my PC.It was successful ! :applaus:

    But I still have some problem.hi :icon_smile:
    after My program had run,on the my PC ,I received a lot characters.I do not undestand these characters
    I attempt to send value 123 from kuka robot to Pc.On the Pc,I receive 3f 3f cc 3f 33(hex)

    I already read this link https://www.robot-forum.com/robotforum/kuk…eq-t1433.0.html

    I think 3f 3f is a start character??!!

    hence,when I want to send data from pc to kuka robot, what kind of data type must I send ?

    My purpose:
    I will write a program in order to (from my pc) control kuka robot which move programming path

    I already have file move.src.I want to run this file from my PC

  • lindepauli
    Guest
    • February 27, 2009 at 10:57 AM
    • #25

    3f 3f are not start characters. I guess, they are spoiled character because of wrong baudrate or parity on your PC. Please control your serial setup (on PC and KRC).

    You have to know what kind of data you want to send

  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,429
    • February 27, 2009 at 5:54 PM
    • #26

    If what you see in your Telnet window doesn't match what the PC receives, the most likely suspect is baud rate and/or protocol. Make sure *all* of the Hyperterminal settings on your PC match what the KRC is set up for.

  • namkocao
    Guest
    • March 1, 2009 at 3:17 PM
    • #27

    hi
    On KRC,there is Xon/Xoff protocol.Thus,I use Xon/Xoff protocol
    [COM3]

    BAUD=9600
    CHAR_LEN=8 ; 7,8
    STOP_BIT=1 ; 1,2 at time not changeable
    PARITY=0 ; EVEN=2, ODD=1, NONE=0

    PROC=4 ; 3964R=1, SRVT=2, WTC=3, XONXOFF=4

    I use a cable which have 2 female connector
    I connected pins(I attached picture)
    But I do not know whether it is right????!!!

  • jaraviensis
    Trophies
    3
    Posts
    14
    • March 1, 2009 at 11:59 PM
    • #28

    Maybe the problem is cable too long. RS-232 is not recommended for electrically noisy environments (servos, motors, welding equipment, power cables, ...).

    I suggest using a *shorter* cable. Put the PC closer to the robot cabinet, I bet you'll end receiving ASCII garbage.

    Another idea would be to insert RS-232 to RS-485 converters in each end of the cable (robot side and PC side).

    RS-485 is much better, it uses balanced/differential signals and succeeds where RS-232 fails.

    Good luck,
    V.

  • lindepauli
    Guest
    • March 2, 2009 at 12:09 PM
    • #29

    - cable is ok
    - please make a "cold start" and try again
    - switch off XON/XOFF on PC and KRC2 (serial.ini)
    [XONXOFF]
    CHAR_TIMEOUT=50 ; msec Timeout after last received character
    :
    XON_VAL=[glow=red,2,300]0[/glow] ; 0..255 XON character (decimal)
    XOFF_VAL=[glow=red,2,300]0[/glow] ; 0..255 XOFF character (decimal)
    ; if XON_VAL=0 and XOFF_VAL=0 then XON/XOFF protocol
    ; is disabled (pure serial communication)
    DSR_LINE=0 ; 0 = DSR line not connected, 1 = DSR line must be high

  • namkocao
    Guest
    • March 2, 2009 at 5:04 PM
    • #30

    hi
    Yes,I will switch off XON/XOFF
    My software on my pc maybe fail.I found other software.It is very cool
    I am reading how to write program by VC++

    Edited once, last by namkocao (March 2, 2009 at 6:38 PM).

  • namkocao
    Guest
    • March 3, 2009 at 4:01 PM
    • #31

    hi all,
    I wrote a program,but I can not check it on the kuka robot(because kuka robot has hardware error) :icon_frown:

    Content:
    On my PC,I will send a string "RUN" to controller of kuka robot
    On KCP,I will write a program.It receive string "RUN" and run the program MOVE.SRC
    the program MOVE.SRC consist of motion instruction (PTP.CIR,LIN)

    In the TEXT.dat,I write A declaration

    DECL STATE_T SR_T, SW_T, SC_T
    DECL MODUS_T MR_T, MW_T

    REAL TIMEOUT
    INT HANDLE,OFFSET
    CHAR I,J
    INT COUNTER

    In the TEXT.src,I write A program

    MW_T=#SYNC
    MR_T=#ABS
    TIMEOUT=3.0
    OFFSET=0
    I="START"
    COUNTER=0

    COPEN(:SER_3,HANDLE)
    IF HANDLE==0 THEN
    HALT
    ENDIF

    CWRITE(HANDLE,SW_T,MW_T,“%c”,I)
    IF (SW_T.RET1<>#CMD_OK) THEN
    HALT
    ENDIF

    WHILE (COUNTER<10) AND (SR_T.RET1==#DATA_END)
    CREAD(HANDLE,SR_T,MR_T,TIMEOUT,OFFSET,”%c”,J)
    COUNTER=COUNTER+1
    ENDWHILE

    IF (J=="RUN") THEN
    CWRITE($CMD,STAT,MODE,”RUN /R1/MOVE()”);I am not sure it is right.I read in manual
    ENDIF

    CCLOSE(HANDLE,SC_T)

    please,Give me some advice about my program!
    thanks!

    Edited once, last by namkocao (March 4, 2009 at 3:37 AM).

  • namkocao
    Guest
    • March 4, 2009 at 3:14 AM
    • #32

    hi
    On KCP,I selected a program MOVE.SRC
    Now,I want to run this progam from my PC
    On my PC,I need to send variable via COM in order to run this program

    First,from my pc I send "variable" to turn on DRIVERS
    Second,send variable to start the program MOVE.SRC

    Hence,what is that variable?I do not find it in manual CREAD_CWRITE
    thanks

    Edited once, last by namkocao (March 4, 2009 at 3:18 AM).

  • lindepauli
    Guest
    • March 4, 2009 at 11:32 AM
    • #33

    you want to turn on DRIVERS ? what that ?
    -----------------
    In your program there are character variables I, J.
    You can not do IF (J=="RUN") THEN or I="START"
    -----------------
    CWRITE(HANDLE,SW_T,MW_T,“%c”,I)
    IF (SW_T.RET1<>#CMD_OK) THEN
    HALT
    ENDIF

    WHILE (COUNTER<10) AND (SR_T.RET1==#DATA_END)
    CREAD(HANDLE,SR_T,MR_T,TIMEOUT,OFFSET,”%c”,J)
    COUNTER=COUNTER+1
    ENDWHILE

    the program never runs through the WHILE loop (SR_T.RET1 is #CMD_OK) !!
    You have to use the REPEAT construct
    Why do you use CREAD in a WHILE loop ?
    ???

  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,429
    • March 4, 2009 at 1:43 PM
    • #34

    KRL does not have "string" type variables. Instead, it uses character array variables.

    So:

    DECL CHAR J[3] ; J can hold up to 3 characters
    DECL CHAR I[5] ; I can hold up to 5 characters
    .....
    IF I[]=="START" THEN...
    .....
    IF J[]=="RUN" THEN...

  • Vyastrebov
    Trophies
    4
    Posts
    17
    • October 6, 2014 at 9:45 PM
    • #35

    Hi all
    I have a question. I set up a com port as it is written in this topic, but the data from the KUKA robot on your PC is not transmitted.
    I looked in the Telnet, when developing team CWRITE, I see that the data is transmitted to the port you want me to, but the PC did not come.
    Although Windows KUKA robot and Windows PC without any problems transmitting data through Hiperterminal.
    What could be the problem ???
    Version KRC 5.5.12.
    :help:

  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,429
    • October 7, 2014 at 2:11 AM
    • #36

    KUKA Windows and KUKA KSS use different physical COM ports. KSS has to use COM3, for what I suspect your generation of KRC2 is.

    Also check your HW.INF settings.

  • Vyastrebov
    Trophies
    4
    Posts
    17
    • October 10, 2014 at 3:52 PM
    • #37

    Thanks for the help! In fact, I used the wrong port...

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
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • 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
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • 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