Safety enclosure & Emergency Stop

Results 1 to 5 of 5

Thread: Safety enclosure & Emergency Stop

  1. #1
    Member mgravet's Avatar
    Join Date
    May 2020
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default 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!

    Similar Threads:


  2. #2
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1311
    Downloads
    0
    Uploads
    0

    Default 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
    Member mgravet's Avatar
    Join Date
    May 2020
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default 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
    Member mgravet's Avatar
    Join Date
    May 2020
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default 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
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1311
    Downloads
    0
    Uploads
    0

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




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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Safety enclosure & Emergency Stop

Safety enclosure & Emergency Stop