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. Yaskawa Motoman 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

Interrupt or other mechanism to reset program

  • krzych
  • February 15, 2014 at 9:26 AM
  • Thread is Resolved
  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 15, 2014 at 9:26 AM
    • #1

    I have two programs running concurrently. I want to achieve functionality like described below:

    Prog1:

    Code
    NOP
    WHILE TRUE
    'do something
    ENDWHILE
    END

    Prog2:

    Code
    IF B000=1 THEN
       'reset main program
       'set robot in hold state
    ENDIF
    
    
    IF B001=1 THEN
       'only hold main program
    ENDIF

    Program1 runs main robot program (movements) etc.
    Program2 monitors some variables and when they get specified values there are two options:
    first: reset main program to first line and hold programs execution
    second: hold programs execution

    How can I achieve it in INFORMIII?

    //I have found ABORT instruction but it requires reselecting job in job select window and it will be inconvenient

    Will PAUSE instruction work for stopping jobs as described? Will it stop all jobs execution until start is pressed?

    Edited once, last by krzych (February 15, 2014 at 10:21 AM).

  • potis
    Reactions Received
    1
    Trophies
    3
    Posts
    245
    • February 15, 2014 at 9:01 PM
    • #2

    you need to work with interrupts. for the hold it is a very easy. for resseting the program inside the interrupt you will have a JUMP to your main job. in the first line of your main job you must add CLEAR STACK.
    very easy!!

  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 16, 2014 at 9:21 AM
    • #3

    OK potis thanks for that, especially for clue that I should also clear stack.

    But how can I trigger interrupt with BVariable as in my code sample? I see that interrupts can be trigerred only with inputs of robot. Is it possible to set input in program? Or is there something like variable signal numbers?

  • potis
    Reactions Received
    1
    Trophies
    3
    Posts
    245
    • February 16, 2014 at 7:41 PM
    • #4

    interrupts are only triggered with inputs. if you want to use variables you must intercontect them by using DIN instuction in another job that will run si,utaneously. for this you can make a system job that will run on the backround always

  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 16, 2014 at 11:31 PM
    • #5

    DIN stores physical input on/off status in byte. I don't want to have physical signal, i want to trigger interrupt with changing variable.

    No physical input.

    Prog1 (main)

    Code
    NOP
    MOVE ..
    MOVE ..
    MOVE ..
    END

    Prog2 (background)

    Code
    NOP
    IF condition THEN
    SET B000
    ENDIF
    END

    And B000 should trigger interrupt.

  • potis
    Reactions Received
    1
    Trophies
    3
    Posts
    245
    • February 17, 2014 at 8:47 AM
    • #6

    then in the backround program connect the variable to an output :

    if B000=1 then
    DOUT #(1)=ON
    endif

    and connect through the ladder the output with an input that you can monitor in trigger.

  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 20, 2014 at 10:02 PM
    • #7

    OK I have done things like you adviced:

    I have:

    Prog1

    Code
    NOP
    EIN LEVEL=1
    PSTART PROG_MOVE SUB1
    PSTART PROG_MONIT SUB2
    END

    PROG_MOVE

    Code
    NOP
    ...
    MOVEJ
    MOVEJ
    ...
    END

    PROG_MONIT

    Code
    WHILE ALWAYS_TRUE 
    IF B001 = 1 THEN
       DOUT(57)
    ENDIF
    ENDWHILE

    INTERRUPT_JOB

    Code
    NOP
    SET UALM
    JUMP JOB:Prog1
    END

    Interrupt is triggered alarm is set but I've get also parallel instruction error so I think it is not correct way at all.

    Another problem is when i call function from PROG_MOVE. Interrupts during function execution does not work.

    Could someone post an example of described functionality in INFORM??

    Edited once, last by krzych (February 20, 2014 at 10:05 PM).

  • potis
    Reactions Received
    1
    Trophies
    3
    Posts
    245
    • February 21, 2014 at 9:30 AM
    • #8

    the parallel instruction error is because you have 2 same programs (with same Robot control) in the main and in sub1.
    make your monitor a backroung Logic and your moving program execute it in the main. why do you want to use variable for triggering the output? using the same variables in multiple programs is not good because sometimes the program will freeze (bug)

  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 21, 2014 at 5:34 PM
    • #9

    What do you mean by making as a background logic? Can you give some simple example how to achieve functionality I've described?

    I'm using variables as flags, I can also use some outputs connected in ladder to inputs if it is problem using variables in multiple progs.

    Could someone provide manual of using concurrent jobs on Motoman robots?

    Edited once, last by krzych (February 22, 2014 at 2:57 PM).

  • potis
    Reactions Received
    1
    Trophies
    3
    Posts
    245
    • February 24, 2014 at 2:19 PM
    • #10

    for the backround Logic please search the yaskawa forum for system job. and yes please do not use flags but i/o. when multiple programs are using the same variable you could end up that the program is Frozen and everyhting is ok (green lights, no alarm). this is a bug that i have found

  • scotty
    Reactions Received
    43
    Trophies
    5
    Posts
    497
    • February 25, 2014 at 7:46 AM
    • #11

    sorry for stupid question, but how u run parallel job:?

  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 25, 2014 at 8:05 PM
    • #12

    With PSTART instruction.

  • jejbr84
    Trophies
    3
    Posts
    24
    • February 25, 2014 at 11:26 PM
    • #13

    We have also encountered the same freeze bug Potis. Reported it to Motoman, but it does not look like they will fix it. Seems like a multi threading issue to me. We also solved it by using I/O.

    And to setup a background job: create a new job and configure it as 'concurrent'.

  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 26, 2014 at 10:28 AM
    • #14

    jejbr84

    Both jobs should be defined as concurrent?

    How to restart jobs from one of them (see my question about resetting and not resetting main program)?

  • alex6885
    Trophies
    3
    Posts
    62
    • February 26, 2014 at 8:10 PM
    • #15

    I hope you helpful ......

    --------------------------------------------------------
    'MAIN PROGRAM !
    ---------------
    NOP
    DOUT OT#(57) OFF
    CLEAR STACK
    *LABEL
    CALL JOB:MOVE
    JUMP *LABEL
    END
    --------------------------------------------------------
    ' MOVE PROGRAM !
    -----------------
    NOP
    MOVL C00000
    EI
    MOVL C00001
    MOVE C00002
    MOVE C00003
    DI
    END
    --------------------------------------------------------
    ' INTERRUPT JOB: !
    ------------------
    NOP
    SET UALM ....
    IMOV P0150 V=1500.0
    CALL JOB:CYCLE
    END
    ------------------------------------------------------
    'SYSTEM PROGRAM !
    ---------------
    NOP
    *BEGIN
    IF B001 = 1 THEN
    'ENABLE INTERRUP
    DOUT OT#(57) ON
    ENDIF
    DELAY 100
    JUMP *BEGIN
    END
    --------------------------------------------------------

  • krzych
    Reactions Received
    2
    Trophies
    3
    Posts
    90
    • February 28, 2014 at 10:00 AM
    • #16

    Alessandro: You shown how to restart job when it is started with CALL instruction.

    How to reset it when I've started it with PSTART (for example I have controller with two arms)

    Let's say that in main program instead of CALL JOB:MOVE it is PSTART JOB:MOVEARM1; PSTART JOB:MOVEARM2

    How to abort subtask execution??

  • jejbr84
    Trophies
    3
    Posts
    24
    • February 28, 2014 at 12:44 PM
    • #17

    You can restart everything with the 'master job call' input (SIN#0049). Just couple it to an output in the CIO and set the output from your job if you want to reset.
    Then clear the stack. What I use is this at the top of the master job:

    DI
    CWAIT
    SFTOF
    CLEAR STACK

    The answer to your question about concurrent jobs:
    There can be only one robot job (per robot), because otherwise two jobs could move the robot at the same time which is obviously not desired. All the other jobs should be concurrent. For example a concurrent master job that calls/pstarts a robot job and another concurrent job.

  • Jacopo Dinicoli
    Trophies
    1
    Posts
    6
    • May 12, 2023 at 5:21 PM
    • #18

    Hi,

    I have a YRC1000 yaskawa controller.

    I'm having trouble with my Interrupt job function: it worked a couple of times, but then it doesn't work anymore and it ignores the interrupt function.

    Here's the code:

    NOP

    EI

    SFTON P010 RF

    MOVL V=6000 PL=0 UNTIL IN#(7)=ON

    MOVL V=6000 PL=0

    MOVL V=6000 PL=0

    SFTOF

    DOUT OT#(7) OFF

    DI

    END


    Thank you in advance!

  • 95devils
    Reactions Received
    234
    Trophies
    8
    Posts
    1,947
    • May 13, 2023 at 2:51 PM
    • #19
    Quote from Jacopo Dinicoli

    Hi,

    I have a YRC1000 yaskawa controller.

    I'm having trouble with my Interrupt job function: it worked a couple of times, but then it doesn't work anymore and it ignores the interrupt function.

    Here's the code:

    NOP

    EI

    SFTON P010 RF

    MOVL V=6000 PL=0 UNTIL IN#(7)=ON

    MOVL V=6000 PL=0

    MOVL V=6000 PL=0

    SFTOF

    DOUT OT#(7) OFF

    DI

    END


    Thank you in advance!

    Display More

    What does the job look like that will run when the interrupt occurs?

    The would be the highest job on the interrupt list. Is the General Purpose input that you assigned to the interrupt changing from OFF to ON?

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • Jacopo Dinicoli
    Trophies
    1
    Posts
    6
    • May 15, 2023 at 9:59 AM
    • #20

    Hi, sorry for my late reply
    this is the interrupt job:

    NOP

    GETS PX011 $PX006

    CNVRT PX011 PX011 BF TL#(3)

    MOVJ P011 VJ=15.00

    RET

    END

    Also I'm simulating manually the input to get the interrupt to work but the output that I assigned to verify that the interrupt is working isn't changing from OFF to ON.

    It's weird because I've tried with the real robot and with motosim, and both times it worked like once or twice (at random moments, not even in sequence, without changing anything) and then no more

    Edited once, last by Jacopo Dinicoli (May 15, 2023 at 10:10 AM).

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