December 16, 2018, 01:07:26 PM
Robotforum | Industrial Robots Community

 Programming a signal interrupt


Author Topic:  Programming a signal interrupt  (Read 376 times)

0 Members and 1 Guest are viewing this topic.

August 10, 2018, 07:24:05 AM
Read 376 times
Offline

alpadolmeri


Hello guys !
I need your help. I am working on a Kawasaki D-Series and I need to enable and disable an interrupt on my source code.
In fact, I need to monitor signal of a vaccum after I pick the piece. Until I disable the interrupt, if I have the piece on the arm I need to stop immediately the working if I loose the vacuum signal and call an escape routine. I was not able to find an example how to do it with AS.
Can you help me ?

Thanks to all.

Aldo

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

Today at 01:07:26 PM
Reply #1

Advertisement

Guest

August 10, 2018, 07:46:05 AM
Reply #1
Offline

Alexandru


Hello,

you can do something like this:

.PROGRAM autostart.pc ()
begin:
  IF (flagobiect==1 AND SIG(-1037)) THEN
    SIGNAL 2036
  END
  IF SIG(2036) THEN
      MC HOLD
      TWAIT 1
      MC ZPOWER OFF
      $msg7 = "Object lost."
      flagobiect = 0
  END
TWAIT 0.1
GOTO begin
END

.PROGRAM motion ()

instructions
pick the object
flagobiect = 1
....
....
instructions
....
....
place the object
flagobiect = 0

.END

replace signal 1037 with your own signal number. If the robot dropped the object is up to you how you want to continue.

August 10, 2018, 07:55:39 AM
Reply #2
Offline

alpadolmeri


Thank you very much for your suggestion. I will try it on monday .
Thanks ! :icon_wink:

August 10, 2018, 08:12:26 AM
Reply #3
Offline

Kawaguy


You are looking for the ONI function.

  ONI signalnr CALL subprogram

or

  ONI signalnr GOTO label

Cancel the interrupt with:
 
  IGNORE ABS(signalnr)


Be careful when using ÓNI .. CALL ..

When the subprogram is completed, the program returns from the step where the interrupt came, which is most of the times not desired, especially if there are motion commands in the subprogram.

Personnaly I only use the ONI .. GOTO .. or I use the method from Alexandru, with a pc-program.





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

xx
KRC1 how to interrupt the motion from discrete signal?

Started by Masimka on KUKA Robot Forum

1 Replies
1348 Views
Last post May 05, 2016, 01:12:59 PM
by RS
xx
Interrupt Programming

Started by PJonHar on KUKA Robot Forum

2 Replies
2585 Views
Last post April 19, 2016, 12:03:27 PM
by SkyeFire
xx
Interrupt Programming Issue

Started by PJonHar on KUKA Robot Forum

25 Replies
6685 Views
Last post August 12, 2016, 12:35:03 PM
by panic mode
question
to interrupt or not to interrupt, that is the question

Started by zeev on KUKA Robot Forum

5 Replies
1980 Views
Last post October 31, 2014, 09:15:58 AM
by zeev