need help with KRC2 !!

  • Is there any one who knows how to read an input variable coming from a PLC and use it in my robot's program ?? It's really very urgent :wallbash:!!
    Thanks!! :merci:

  • Hello. Search for the $config.dat in the R1/SYSTEM, open the USER GLOBALS fold and write your signal: SIGNAL MY_INPUT $IN[1], or if you have BYTE variable: SIGNAL MY_INPUT_BYTE $IN[9] TO $IN[16], same goes for the outputs.


    I'm assuming that you already have the connection to the PLC configured in iosys.ini.


    Declared signal in $config.dat you can use in robot program "my_program.src":


    for example:

    Edited once, last by DannyDJ ().

  • what do you mean by "read it"?


    you can display variable (Display>Monitor>Variable>Single...)
    what kind of variable? what KSS?

    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

  • my KSS version is "V4.0.18/KUKA4.1". And by "read it" i mean that the operator will enter the value of this variable using the PLC and which will be a point of the robot's new trajectory ie: this point of the trajectory is variable and its values is given by the operator using the PLC that's why i want to know how to read the value of this variable so i can be able to use it after that in my program!! Thank you for your help i've been looking for the solution for a month and i didn't found it yet!!
    :merci:

  • only a month..? I am not surprised, its all clear as mud... we don't know what you have there, if you need help, you need to be much more specific.


    what do you mean operator is entering variable, using plc etc? that is something PLC programmer would do, not operator.


    do you mean that operator is entering value using HMI connected to PLC, and PLC then sends this value to robot?
    or do you mean that value somehow computed by PLC and presented on HMI is something that operator needs to punch in on robot teach pendant?


    if the data is sent by PLC to robot, how are the two connected (what type of interface or fieldbus)? is I/O mapping carried out? can you see bits change value on one end (such as robot) when you toggle bits on the other side (PLC)? how about the other way?


    once you are able to send bits back and forth, you may combine them into integer which can be scaled/converted to real, which can be used to produce offset.

    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

  • yes by operator i mean the PLC programmer. That's what i want to do like you said the programmer is entering value using HMI connected to PLC and PLC then sends it to robot. The robot and the PLc are connected by PROFIBUS. So until now my problem is how to manipulate/use the value coming from the PLC with the KCP of the robot!

  • if you have:
    a) profibus working correctly and
    b) I/O are mapped correctly


    then you have working connection. In other words toggling bit on one node shows up on the other.


    In that case you need to pass that value to a variable. common way is to use SIGNAL.
    you can declare it in the $CONFIG.DAT, for example


    Code
    Signal myOffset $IN[101] to $IN[132] ; assuming it is a 32-bit value


    Then in your code you use it any way you like, for example


    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

    Edited once, last by panic mode ().

  • Thank you for your help!! I will try it as soon as possible and i hope it works!!

    Edited once, last by bigboss ().

  • if robot is configured as profibus slave, everything is done in PFMBS.INI file, and IOSYS.INI.


    i/o mapping is done in IOSYS.INI. this was discussed many times.

    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

Advertising from our partners