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. Fanuc 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

Controled stopping when fence is open

  • NovaFlatline
  • July 10, 2018 at 2:00 PM
  • Thread is Resolved
  • NovaFlatline
    Trophies
    3
    Posts
    31
    • July 10, 2018 at 2:00 PM
    • #1

    Ok, I am using a router tool, with a 5.5 HP spindle motor. When the fence opens the robot goes to a control stop. Ive wired in a timer (hardwire, not program based) to turn on my fence relay (again hardwired to trip both chanels of the fence circuit) ive got this wired in to delay the fence signal so that i may run a macro to stop the spindle (say 4 seconds) so the operator does not injure themselves. But my problem is that i cant seem to run a macro while another program is running. My macro looks like this.


    1: abort
    2: if Ro(8) = on , call Spinstp

    Im using robot output as a registry bit. I have another program turning that on. Basicly to say if the bit is spinning. Im using an integrated VFD that needs at least 2 seconds to stop spinnig from full speed.

    Is there a better way to program this, for example Cstop, or program control.

    I dont know how to write that type of code. Forgive me i am self taught. Ive come a long way with all of your help thus far. Sorry ahead of time.

  • Iprogram
    Reactions Received
    4
    Trophies
    3
    Posts
    148
    • July 10, 2018 at 4:57 PM
    • #2

    why are you doing an abort on the first line of your macro? it will not go to line 2 if it is aborted

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • July 10, 2018 at 5:32 PM
    • #3

    It doesnt have to be there. I dont know how to stop one program then start another. Thats where the problem lies. When i dont have abort in there it gives a fault saying something about unable to run macro due to another program running. How do i stop the current program and call the next.

  • vkoppelo
    Trophies
    3
    Posts
    15
    • July 10, 2018 at 6:16 PM
    • #4

    If I understand you correctly, you want to:

    1. Check for request to open fence.
    2. If yes, wait X seconds before unlocking fence/door.
    3. During this time you want the router/spindle to stop?

    Would it work with a BG logic?

    Code
    1:  IF (UO[3]=OFF AND DO[1]=ON),DO[1]=(OFF) ;


    Translation: If program not running and is spindle is on, send OFF to spindle.

    UO[3] is "Prg running" on my robot, it´s set to ON while program is executing. OFF while it isn´t.

    With this BG logic active you can never run the spindle without the program running.
    Do you check a DI/flag for "fence open requests"?

  • Fabian Munoz
    Reactions Received
    133
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • July 10, 2018 at 7:04 PM
    • #5

    Hi

    Ooops, too late, Oh well I'm posting anyway


    Are you familiar with background logic ?
    Familiar with UI/UO ?

    I can give you more details after but

    You can write a BG program where you are asking for the conditions of some UIs and the INPUT from the timer

    So basically, when the fence open you are going to lose some of the UI and 4 seconds later you'll get the input. At that time you can call Spinstp ( i dont even care if ro8=on)

    You can not call a program on background, you actually have to turn the spindle output off

    What controller do you have ?

    Retired but still helping

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • July 10, 2018 at 7:09 PM
    • #6

    I have the fence wired to a "NO" interlock as the gate latch. So when the 24Vdc goes high it goes to a "on delay" timer. Timer is wired "NO" when that closes it triggers the coil on my fence relay wired "NC". While timer is counting the same wire going to the coil is going to a "DI [7]" which has a macro program waiting for the input. When the macro is triggered it will not alow it to run as there is another program running. Basically i need the spindle to stop apon opening the fence before it faults out, haulting any program running. Robot goes to a control stop, but the spindle is still running. Driven by the third party VFD.

    Do i hold the current program, then start the new one?
    Do i stop the current program, and run the next?
    How do i program that?


    I have
    R-3iB controller.
    I am also unfamiliar with BG logic. Still very new. Self taught.

  • vkoppelo
    Trophies
    3
    Posts
    15
    • July 10, 2018 at 7:52 PM
    • #7

    Ok.
    B(ack)G(round) logic is like the name suggests. It´s programs that run in the background in parallel with your "main program".
    To create a program to be run in the background, create a new program like you normally do.
    Create your logic.
    Thereafter enable it in the "BG Logic"-menu.
    As long as it is enabled the program will run each 8 millisecond (default?).

    On my teach pendant I find "BG Logic" under "[Menu]" > "6. Setup" > "BG Logic".
    Can you find it in on yours?

    So you want to watch DI[7] for a ON-signal, then send ON/OFF to the VFD to shut it off?
    What output is the VFD wired to?

    Keep in mind that programs for BG logic does have some limitations (calls etc. just like Fabian mentioned).
    Usually it just errors when trying to enable the program under "BG Logic" if this is the case.

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • July 10, 2018 at 9:07 PM
    • #8

    Ok. I will look for that in my settings.
    Let me get this right,

    BG logic checks if conditions are made
    Example

    1: LBL[1]
    2: IF DI[07] = ON, JMP LBL [2]
    3: LBL [2]
    4: DO[?] OFF (VFD)
    5:JMP LBL[1]


    Now i only care if RO[8] is on because that states that my spindle is at speed. If i dont check for this my spindle will run in reverse. As i am at a forward spin and i turn off forward spin and force reverse on to stop. If i do not do this i would have to wait 90 seconds for the spindle to stop from free spin. Mostly for cycle time.

    So back to BG logic, this stop program that is above i would set as a BG Logic from inside my settings.
    And this should work...

  • Fabian Munoz
    Reactions Received
    133
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • July 10, 2018 at 9:30 PM
    • #9

    Couple of things

    You dont need LBL1 and JUMP LBL1 BG logic loops automatically.
    BG logic does not accept that kind of IF

    if di7 = on then
    do[?] = off
    endif

    For the record. I'm glad you posted that question because the answer will help a lot of folks in the same situation
    I know human safety is first, but when is possible, it will be nice to "slow down" the process and then stop it. Sudden stop does not help machinery

    Retired but still helping

    Edited once, last by Fabian Munoz (July 10, 2018 at 9:35 PM).

  • vkoppelo
    Trophies
    3
    Posts
    15
    • July 10, 2018 at 10:02 PM
    • #10

    You beat me to it, Fabian. :icon_mrgreen:

    There´s no need for the "JMP LBL[1]".
    The code will be repeated anyways.
    Also, if a IF-condition isn´t met, it will continue execution of the program.

    A more "correct" example would be this:

    Code
    1:  IF DI[7]=ON,JMP LBL[1] ;
       2:  JMP LBL[2] ;
       3:  LBL[1] ;
       4:  DO[10]=OFF ;
       5:  LBL[2] ;

    If DI[7] = ON, jump to LBL 1 else continue to next row. On next row jump to LBL 2 (the end).

    Fabian, do you know why I get a "syntax error" when I try to enable this on a R-J3iB controller (running V6.40)?
    I know that JMP LBLs work in BG logic on a R-30iB (running V8.30?), is it a software limitation in older units?

    Fabian's answer : As far as I know it is, same with TIMER or WAIT


    Nova,
    If I understand you correctly.
    You pulse reverse in order to stop the spindle faster? To stop the forward momentum faster vs. letting it freespin to a stop?
    If you get ON on DI[7], do you want to pulse the reverse output for a couple of seconds?
    Is forward spin and reverse spin mapped to 2 digital outputs?

    You are currently using RO[8] as a registry bit (ON/OFF?). Flags can be used for this aswell. R[ * ] are for numerical values, F[ * ] are for ON/OFF.
    :beerchug:

    Edited once, last by Fabian Munoz (July 10, 2018 at 10:22 PM).

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • July 10, 2018 at 10:29 PM
    • #11

    For the record, you don't need any jump labels for this. Instead of jumping around just do what you want to do.

    : IF (DI[7]), DO[10]=(OFF);

  • Iprogram
    Reactions Received
    4
    Trophies
    3
    Posts
    148
    • July 11, 2018 at 1:30 PM
    • #12

    I would use a condition handler to do this but like other suggest BG logic would work.

    why does the router need to stop fast is there a safety issue? if no safety issue and the work piece is getting damaged during this process in my condition handler i would do a tool offset away from the part during the deceleration of the router.

    Edited once, last by Iprogram (July 11, 2018 at 1:36 PM).

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • July 11, 2018 at 4:01 PM
    • #13

    Ok. At this shop human saftey has been pushed. The "saftey committee" tell me that if a moron opens the fence while the part is still being processed the spindle needs to stop along woth the robot.

    I cant find the BG logic in my settings. Do i need to turn this on from my variables?

    So if i can not use "if" statements how should i write this code. Confused.

  • Iprogram
    Reactions Received
    4
    Trophies
    3
    Posts
    148
    • July 11, 2018 at 4:43 PM
    • #14

    just make a condition handler, for this example call it STOP and in the main loop do a MONITOR STOP. this doesn't need called multiple times only once in the main program is fine. Like this:

    MONITOR STOP

    LBL[1]
    PROGRAM1
    PROGRAM2
    PROGRAM3
    JMP LBL[1]


    Your monitor program would look like this

    IF RO[8]=ON Call SPINSTOP

    But remember to also do a MONITOR STOP at the end of your SPINSTOP program otherwise it will only work one time or after an abort. Let me know if this makes sense

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • July 11, 2018 at 5:48 PM
    • #15

    Nothing you do with BG logic or condition handlers is safety rated. Could you instead wire a relay in with the fence circuit to bring the motor to a Category 1 stop. That would be simple and much safer.

    So I see you are already doing this with a timer, so just add one more relay to it to give the stop command to the VFD.

    Edited once, last by HawkME (July 11, 2018 at 5:51 PM).

  • Lemster68
    Reactions Received
    295
    Trophies
    9
    Posts
    2,454
    Blog Articles
    7
    • July 11, 2018 at 6:43 PM
    • #16

    I have worked on quite a few cells which incorporate a request to enter button/switch. Use a condition monitor to look for the request to enter, stop program and spindle, and only then, unlock the gate.

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • July 12, 2018 at 2:59 AM
    • #17

    I dont fully understand the condition handler, but if the logic states what im reading to be correct this is whats happening.

    "Watch this input"

    "While doing these programs"

    Loop to beginning.

    That would make sense.

    Hawk i am confused on "category 1 stop" .
    In order for me to stop my VFD i need to...
    1, turn off my forward direction
    2, reset VFD
    3, turn on reverse direction (hold on for 2 seconds)
    4, reset VFD again.

    This will stop my spindle from 20,000 rpm to a dead stop. In two seconds. Regardless of any effect it has on the VFD or brake resistor. Im only driving 300 Hz at 7 amps. Not much, but enough.

    In order for me to wire the VFD appropriately i would need three relays. One to handle forward and reverse, forward would be on a "NC" and reverse would be on "NO" with one relay handling the power to that relay coil to control which connection on the VFD is the input. And the third to reset the VFD. Im going tonhavr to think about this alot more now that i am looking at it. Kinda makes your head spin.

    A permission to enter would be nice for a closed cell, but we run 3 min cycle times and need to enter the cell after each part. I would like to use some light screens and saftey sensors, but at this time there is not a place in the budget for these things.

    Edited once, last by NovaFlatline (July 12, 2018 at 3:07 AM).

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • July 12, 2018 at 7:42 PM
    • #18

    Category 1 would be a safety rated controlled stop. But if you are already using a timer to kill the VFD then you wouldn't necessarily need to do this.

    I guess I don't understand why you need to do the revers direction thing and not just give a stop command to the VFD, which could be done by a relay or BG Logic, or Condition handler.

    What controller version are you using? BG Logic is in Menu>Setup>BG Logic.

  • Fabian Munoz
    Reactions Received
    133
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • July 12, 2018 at 10:08 PM
    • #19

    Maybe the spindle overshoots when stops (abrupt) and need to go reverse to find itself again.

    We actually use some motor controls that they are running FWD and to stop it we turn BWD on

    Retired but still helping

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