December 16, 2018, 06:19:18 AM
Robotforum | Industrial Robots Community

 Robot Signals Help?


Author Topic:  Robot Signals Help?  (Read 881 times)

0 Members and 1 Guest are viewing this topic.

March 18, 2018, 09:16:23 PM
Read 881 times
Offline

nar0909


Hi all,
Controller: KRC4 Compact. (8.3.28)

1. So I am wondering if someone could verify the correct sequence for the EXT mode.

DriveOff to true,
MoveEnable to true,
DriveON to true,
ConfirmMess to true,
check peri_rdy,
ext_start to true,
check pro_act, pro_req,
send PGNO,
send PGNO_Validity ??

so what about the parity and fbit?


2. Based on the below link, is it necessary to send $PGNO_PARITY, $PGNO_FBIT from PLC to controller?
    https://www.robot-forum.com/robotforum/kuka-robot-forum/automatic-external-configuration/msg90805/#msg90805




3. Also I don't have the below signals in my KRC/STEU/MADA/machine.dat so is it okay if I declare them myself? or will it stop the project activation as I changed the machine.dat file?

Code: [Select]
SIGNAL $PGNO_PARITY $IN[2033]


SIGNAL $PGNO_VALID $IN[2097]


SIGNAL $PGNO_REQ $OUT[2001];REQUEST PROGRAM NUMBER SIGNAL



4. Below is my cell.src, will the IF (PGNOLOCAL) statement work here? or should I declare it somewhere else?




Code: [Select]
&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 )
 
 
  ;CHECK THE PROGRAM NUMBER FROM THE HMI
 
  $PGNO2 = PGNOLOCAL
  IF PGNOLOCAL == 1 THEN
  PGNO = 1
  ENDIF
  IF PGNOLOCAL == 2 THEN
  PGNO = 2
  ENDIF
  IF PGNOLOCAL == 3 THEN
  PGNO = 3
  ENDIF
  IF PGNOLOCAL == 4 THEN
  PGNO = 4
  ENDIF
  IF PGNOLOCAL == 5 THEN
  PGNO = 5
  ENDIF

 
 
 
 
 
  $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  PGNO   

    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


5. This is where I send the 16 bit signal from PLC to controller,

Code: [Select]
SIGNAL $PGNO2 $IN[2080] TO $IN[2095]

in STEU/config.dat


And here's where I created the local variable PGNOLOCAL in KRC/R1/SYSTEM/config.dat

Code: [Select]
INT PGNO=0;copy of ext. pgno
INT PGNOLOCAL=0;PGNO LOCAL VARIABLE

And simple check the incoming signal and assign pgno to the local cell.src?

Any help/advice/suggestions appreciated.

Many Thanks



Linkback: https://www.robot-forum.com/robotforum/index.php?topic=26190.0

Today at 06:19:18 AM
Reply #1

Advertisement

Guest

March 19, 2018, 12:57:13 AM
Reply #1
Offline

panic mode

Global Moderator

why don't you check kuka manual? it tells everything you ask and need to know...


1. The sequence is
   a) power up drives (unless already on)
   b) confirm messages (if needed)
   c) start program CELL.SRC (if needed)
   d) transmit program number.
   
   this means presenting PGNO and parity BEFORE telling robot to read them. parity is simplest (and weakest) check if PGNO is transmitted correctly because it can only detect SINGLE bit fault. this may be reasonable when signals are exchanged through wired I/O and wiring or I/O are limited. it makes no sense at all when using fieldbus - it is MUCH better to use reflecting PGNO back to PLC.


2. you really REALLY need to read the manual... PLC does NOT send $PGNO_FBIT.. it sends GROUP of bits that START with that first input bit. you need to specify how large the group is (1-16 but) and what type of representation is used.


3. all of the signals are already defined. you are not supposed to add or remove anything from $machine.dat - just edit values!!!


4. don't do that... read the manual and just adapt CELL. you are not supposed to write any code in CELL, only call your subprograms.


5. you are still making mess and duplicating something that already exists. don't do that. just read the manual. CELL and P00 take care of all handshaking.
   
   
   
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

March 19, 2018, 01:41:16 AM
Reply #2
Offline

nar0909


Thanks panic mode,
So based on the manual I have made the following changes, and put the $machine.dat back to its default signals. I have removed the signals I declared and assigned them as below,

Under KRC/R1/System/config.dat

Code: [Select]
;INT PGNO=0;copy of ext. pgno

SIGNAL PGNO $IN[2080] TO $IN[2095];PGNO LOCAL VARIABLE

INT PGNO_ERROR=0;transmission error
INT PGNO_TYPE=1;coding type of ext. pgno
INT REFLECT_PROG_NR=0; enable mirroring of program number inputs (1=enabled, 0=disabled)

; Variables for External
; Communication: I/O-Interface
;----------------------------------
INT PGNO_FBIT=2080;first bit of ext. pgno input $IN[]
INT PGNO_FBIT_REFL=999;first bit of ext. pgno reflection output $OUT[]
INT PGNO_LENGTH=16;length of ext. pgno (max. 16)

SIGNAL PGNO_PARITY $IN[2033];parity bit of ext. pgno
SIGNAL PGNO_REQ $OUT[2001] ;request ext. pgno input
SIGNAL PGNO_VALID $IN[2097];validate ext. pgno input


I assumed from the manual that fbit is the first bit start address and since my 16 bit word is from $IN[2080] to $IN[2095]
i have declared fbit as 2080 and pgno_length as 16.

Now is this a valid declaration? or should i also declare INT PGNO=0 under the signal declaration above?

Please advice.

Thanks

March 19, 2018, 04:17:27 AM
Reply #3
Offline

panic mode

Global Moderator

well.... i wish i could remember how many times i had to intervene and fix situations like this because users decided to ignore manual and try tweaking this interface and making Frankenstein - without understanding how the existing interface works and what it is built from. i think i have seen it all, declared signals, added interrupts, custom own logic etc. some succeeded (with luck or not) but most of times this was a failure... changes are generally done by those who are least familiar with the system.

i repeat - why not stick with tried and proven interface? there is a reason this is created as a canned solution and offered as a standard feature: wrong program call can cause collision. why are you re-declaring PGNO as a signal? PGNO is a sampled value (read at the moment PGNO_Valid becomes true). SIGNAL on the other hand can change ANY TIME...that could be dangerous...

if you only have 5 programs to call, there is no need for 16-bit PGNO, three bits are enough, other 13 bits will never change... (unless you plan to add well over 32000 more cases).








March 19, 2018, 04:53:18 AM
Reply #4
Offline

nar0909


Thanks for your response panic mode.
I might fix this and keep the post updated.  :top:

Apologies for the hassle.

But appreciate your time .

Cheers

Today at 06:19:18 AM
Reply #5

Advertisement

Guest

March 20, 2018, 02:43:53 AM
Reply #5
Offline

nar0909


Hi again,
Please find the below pictures from the Configuration --> Auto External

So based on the images, can someone suggest why it does not allow the cell.src to run?

The manual does not provide info on how this is done but only tells what is needed.  :wallbash:  :merci:   :help:

The rest of the signals are BOOL so it was easy but PGNO, PGNO_VALID, PGNO_PARITY are INT.
And i have used the sequence based on the signal diagram 6.10.4 from Kuka System Software 8.2.
All my signals are 16 bit word incoming, so is there a way i could type case the words to INT in workvisual.

Regards

March 20, 2018, 03:40:43 AM
Reply #6
Offline

nar0909


Okay the problem seems to be selecting the program into submit interpreter.
And it works like a charm.

March 20, 2018, 03:43:39 AM
Reply #7
Offline

nar0909


A personal thank you to all the senior members of the robot forum community for sharing such amazing posts and help solve complex problems.

Thanks to panic mode, fluke, SkyeFire, Massula, and all the senior members who supported me and my posts and providing quick responses.  :respect:


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

xx
Jogging the robot using i/o signals

Started by Kroket on ABB Robot Forum

4 Replies
2338 Views
Last post August 31, 2013, 03:40:52 PM
by eureka
xx
VKRC robot signals.

Started by Forgottenz on SEF & VW Robot Forum

0 Replies
970 Views
Last post July 18, 2017, 12:13:52 PM
by Forgottenz
xx
Output Signals from robot by TCP/IP

Started by gonzer2005 on Fanuc Robot Forum

6 Replies
515 Views
Last post November 07, 2018, 02:58:18 PM
by Azermath
xx
KUKA ROBOT OUTPUT SIGNALS

Started by semirk on KUKA Robot Forum

4 Replies
4222 Views
Last post December 27, 2014, 06:06:59 PM
by panic mode