Kuka KRC4 IO mapping for HMI

Started by nar0909, February 05, 2018, 12:10:14 AM

Previous topic - Next topic

nar0909

Hi all,
I'm wondering if anyone could provide some advice/guidance on how can I use some KRC4 IO to manually connect to a HMI that does not have a GSDML file? So i could manually connect my HMI to an external IO module to communicate with my Kuka Welding Robot?
The idea is just to avoid using the SmartPad (Teach Pendant) as not many floor workers are aware on how to run the robot in AUT.
Please shed some light on how we could access the KRC4 IO and what IO addresses are needed for this task?
We have ProfiNET as our fieldbus option.
Any help is appreciated.
Thanks
nar

Johannes @ Robots in Architecture

#1
Hello,

The quick and easy way to do that is to place the logic in the sps.sub, where the IOs get cyclically queried. Still I'm not sure if that is the best idea and if you will be able to do everything you want to do from there.
Also your panel does not seem to have any special IOs, just regular serial and Ethernet ports. So to communicate with the panel, you would probably also need the Ethernet.KRL package, as KRC4 does not have serial ports anymore.
In my opinion, a cleaner solution may be to go with KUKA UserTech to make your own smartPad controls, and there is also an official link between Copa-Data ZENON HMI and KUKA robots (https://www.copadata.com/en/).
ZENON has got a some predefined controls, but more importantly allows you to use WPF controls. We once actually integrated our entire KUKA|prc environment to ZENON, with 3D visualization etc.
None of these options are exactly easy or free, though.

Best,
Johannes

nar0909

Hi Johannes,
Thanks for your response to my query.

So we were thinking about using some standard IO modules and control the robot controller IO with it.
The HMI would be sending and receiving data through the IO modules communicating with the robot controller.
So in your experience what would be a very reliable and cost effective way to approach this problem?
We are just aimed at offering the HMi to be used for the workers instead of the SmartPad.
And we only want to start/stop the robot operation using the hmi button, where start should start the robot program (only one program used at this stage) and stop should simply bring the robot to home position.

Can we use any intermediate gateway converters between HMi and the robot controller so it might have the gsdml file to support profinet?

Could we use the SRC skeleton file in the wvs to support serial comma by the HMI?

Pls comment on what could be done with this setup.

Cheers
N

Johannes @ Robots in Architecture

Hello,

If it's only a single program, just define a digital input as a "wait for" at the beginning, and then as an interrupt that resets the program (e.g. via a goto).
Not sure what you are referring to as intermediate converters and SRC skeleton files, but if you simply need to send a digital signal from your HMI there are many ways, from sending data via Ethernet to a Raspberry Pi, to more professional IO couplers like from NI (http://www.ni.com/en-us/shop/select/digital-io-device?modelId=124945) and countless industrial solutions.
I'm not an expert on Profinet, so I cannot really help there.
My suggestion would be to start with a physical button connected directly to the IOs and then "scale it up" once it's needed.

Best,
Johannes

nar0909

Hi,

I apologise if I'm being a noob
But could you pls be able to provide any more sample code or setup with what you were explaining before in regards to the wait for and goto statements?

Any help greatly appreciated.
Regards
N

Johannes @ Robots in Architecture

Hello,

Basically the Expert Programming guide and KRL Reference are very useful, you can find them easily via Google.
I didn't know that guide before, looks useful and contains the info you are looking for: http://www.wtech.com.tw/public/download/manual/kuka/krc4/KUKA%20KRL-Syntax%208.x.pdf

You declare an interrupt like that...
INTERRUPT DECL 11 WHEN $IN[SENSORIN]==TRUE DO MEASURECALC(TOCALIBRATE, REFTOOL)
INTERRUPT ON 11


Goto works like that:
GOTO Marker
...
Marker:


And waitfor:
WAIT FOR $IN[5]

Best,
Johannes

nar0909

Thanks for the info Johannes very useful.
I will start going through the KRL syntax and keep you posted so you could advice me if I'm going in the right direction.
Regards
Nar

nar0909

Hi Johannes,
Based on our conversation I have come this far.
So I modified the CELL.SRC and calling the case number from the HMI to run my desired program.
Please have a look and let me know if this sounds valid or any changes required.

&ACCESS  RVP
&COMMENT HANDLER on external automatic
DEF  CELL ( )
  EXT Jig1()
  EXT Jig1_2225()
  EXT Jig2()
  EXT Jig2_2225()
  EXT down()
 
  DECL CHAR DMY[3]
  DMY[]="---"
 
  GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
  ;GLOBAL INTERRUPT DECL 3 WHEN $IN[2018]==TRUE DO IR_STOPM ( )
  INTERRUPT ON 3
  BAS (#INITMOV,0 )
 
  $H_POS=XHOME
  IF CHECK_HOME==TRUE THEN
    P00 (#CHK_HOME,#PGNO_GET,DMY[],0 ) ;Testing Home-Position
  ENDIF
 
  $H_POS=XHOME
  PDAT_ACT=PDEFAULT
  BAS (#PTP_DAT )
  FDAT_ACT=FHOME
  BAS (#FRAMES )
  BAS (#VEL_PTP,100 )
  PTP  XHOME
 
  P00 (#INIT_EXT,#PGNO_GET,DMY[],0 ) ; Initialize extern mode
 
  LOOP
    P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 )
    SWITCH  $IN[3000]

    CASE 1
      P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
      Jig1()

    CASE 2
      P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
      Jig1_2225()
     
    CASE 3
      P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
      Jig2()
     
    CASE 4
      P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
      Jig2_2225()

    CASE 5
      P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
      down()
     
    DEFAULT
      P00 (#EXT_PGNO,#PGNO_FAULT,DMY[],0 )
    ENDSWITCH
  ENDLOOP
END










Thanks :)

Johannes @ Robots in Architecture

Hello,

Sorry, you will just have to try it out, something quick I noticed while skipping over the code: Make sure that your $IN can contain values other than TRUE and FALSE (1 and 0).
And is there a particular reason for using the cell.src? I believe it's mostly for EXT mode.

Best,
Johannes

nar0909

Yes Johannes,
I want to test the EXT automatic where I can use a generic hmi to select a program from the switch case statement.
And the $IN[3000] is an INT (integer) coming from the hmi to the controller.
So do you suggest I'm going in the right direction.? :)
Thanks
N

Johannes @ Robots in Architecture

Then you know what you are doing - give it a try!