Shop OBEX P1 Docs P2 Docs Learn Events
Emergency Stop and BS2p40 — Parallax Forums

Emergency Stop and BS2p40

lee_hanclee_hanc Posts: 4
edited 2010-12-13 05:21 in BASIC Stamp
Hi,

I have a problem, I make a control system and has an emergency stop button.As I know, STAMP doesn't have an interrupt system, so do I need to check this button in every sequence? or is there any other function that I can use like interrupt system? And the other problem is, I use bs2p40 that has auxiliary IO. If I check this button every time, then it means I should change the state MAINIO or AUXIO everytime I check it? or any other way to always watch this button?

Comments

  • $WMc%$WMc% Posts: 1,884
    edited 2010-12-07 19:06
    lee_hanc wrote: »
    Hi,

    I have a problem, I make a control system and has an emergency stop button.As I know, STAMP doesn't have an interrupt system, so do I need to check this button in every sequence? or is there any other function that I can use like interrupt system? And the other problem is, I use bs2p40 that has auxiliary IO. If I check this button every time, then it means I should change the state MAINIO or AUXIO everytime I check it? or any other way to always watch this button?
    '
    An operators hand is not going to out run the BS2. Just check on it often.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2010-12-07 19:17
    For an emergency stop you may want to setup a circuit outside of the Stamp to handle that. What do you want the emergency stop to do? Will it remove power? This is just my opinon but I think it would be a good idea to keep the emergency stop circuit as simple as possible and a separate circuit. After all that will help if there is an unforsee issue with the program which make you want to hit the emergency stop. Even of the Stamp had Interrupts I wouldn't use that alone to watch for an emergency stop button.
  • lee_hanclee_hanc Posts: 4
    edited 2010-12-07 21:57
    For an emergency stop you may want to setup a circuit outside of the Stamp to handle that. What do you want the emergency stop to do? Will it remove power? This is just my opinon but I think it would be a good idea to keep the emergency stop circuit as simple as possible and a separate circuit. After all that will help if there is an unforsee issue with the program which make you want to hit the emergency stop. Even of the Stamp had Interrupts I wouldn't use that alone to watch for an emergency stop button.

    Thanks for the reply. Yes, I make a circuit outside to cut off all the actuator's power, but off course I can't cut the controller power (STAMP), I still need to maintain all the parameter inside my controller. So, for my controller, what I need is just jump to a subroutine and looping as long as the E-Stop hit and go back to the start after it released, that's why I want to have an interrupt function
  • stamptrolstamptrol Posts: 1,731
    edited 2010-12-08 05:21
    You can simulate the interupt function by having a short subroutine that gets called repeatedly in the different sections of your main program. The challenge is to make sure no part of the program can get stuck in a loop and fail to call the critical subroutine.

    Having said that, you should never call anything an e-stop that is dependent on code running. An e-stop has to be able to stop the machine regardless of the code. As pointed out previously, the e-stop function should directly cut power to the outputs by dropping out a main power relay or equivalent.

    There's nothing wrong with the processor sensing that an e-stop button has been activated and have the program halt or go to a recovery routine, but the action of stopping the machine should always be hard-wired. This is how most Dept. of Labour and Health and Safety folks enforce the law.
  • coldspringscoldsprings Posts: 14
    edited 2010-12-13 05:21
    I made an industrial machine with the basic stamp. I installed a "NC" push button wired directly into the machines input power. I had the emergency function designed around the concept of restarting the cycle from the beginning, so resetting the stamp along with the A/C components work for me.
Sign In or Register to comment.