548,476 active members*
2,431 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1

    Join Date
    May 2020
    Posts
    11

    Safety enclosure & Emergency Stop

    Hello,

    I am currently designing a safety enclosure for a small CNC machine that needs to have one main feature: if the doors are open, the user shouldn't be able to start a G-code or turn on the spindle. The machine should also go into E-stop mode if the door is opened during a job. I would like nonetheless the machine to be able to perform certain actions when the doors are open for ergonomic reasons, i.e. manual jog allowed, or using a tool measure length probe.

    I have two ideas in mind, both with advantages and drawbacks:

    1. Place a switch on the door frame, wired in series with the main e-stop switch. The advantage is that it will be reliable and work for the scenarios mentioned above, except that I won't be able to control the machine manually with an open door.

    2. Place a reed switch or a sensor on the door frame, wired to an input of the Mk3/4 controller. I modified the OnStart and M3 scripts to check the state of that pin before starting a job or turning on the spindle and it works well, but the issue here is: how to stop the program while it's running if the door is suddenly opened?

    Lastly, am I missing another possibility to achieve this?

    If someone already tried something similar or has ideas to give me, I'd greatly appreciate it!

  2. #2
    Moderator
    Join Date
    Mar 2017
    Posts
    904

    Re: Safety enclosure & Emergency Stop

    Use "Expr.txt" to monitor input pin.
    Then in global loop trigger e-stop is machine is running and input is triggered and in #OnStart event return NAN to abort,

  3. #3

    Join Date
    May 2020
    Posts
    11

    Re: Safety enclosure & Emergency Stop

    Nice, thanks a lot for the fast and helpful reply!

    Another question though: how can I force the e-stop when the input changes? I mean with which syntax? I saw the variable _hw_estop in the documentation but it's read-only.

  4. #4

    Join Date
    May 2020
    Posts
    11

    Re: Safety enclosure & Emergency Stop

    Ok so I solved it by using: exec(cmd('Machine.Emergency_Stop'))

    One last thing, could you show me what is the syntax to return a Nan value from the script? I couldn't find it in the documentation.

  5. #5
    Moderator
    Join Date
    Mar 2017
    Posts
    904

    Re: Safety enclosure & Emergency Stop

    Here is one solution using Expr.txt:
    Code:
    if(_hw_stop==0 && and(_hw_input,64), exec(print('Alarm!!!'), cmd('Machine.Emergency_Stop')));
    
    
    #OnStart
    if(and(_hw_input,64), exec(print('Alarm!!!'), nan()));
    In main loop, if machine is moving (_hw_stop==0) and inpit 7 is triggered and(_hw_input,64) we execute two things - print alarm and cmd for estop
    On on start event we check if input 7 is triggered. We also print alarm but we return nan and start is aborted if it is.

Similar Threads

  1. Emergency Stop.
    By MrEmo in forum PlanetCNC
    Replies: 21
    Last Post: 10-20-2021, 05:26 AM
  2. Problems with Emergency Stop/Stop function.
    By MrEmo in forum PlanetCNC
    Replies: 12
    Last Post: 10-19-2021, 10:47 AM
  3. emergency stop condition after E stop
    By Cosmin90 in forum Fadal
    Replies: 3
    Last Post: 01-14-2020, 01:30 AM
  4. Making a safety enclosure - ideas for door mechanism?
    By Transition in forum Linear and Rotary Motion
    Replies: 4
    Last Post: 05-14-2012, 02:52 PM
  5. Generic Emergency Stop (E-Stop) Design Concepts?
    By zipzit in forum General CNC Machine Related Electronics
    Replies: 8
    Last Post: 06-09-2011, 12:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •