Content Preview
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Purpose
Guidance on how to add door safety switch input logic to a CNC machine tool
These safety functions are provided as a convenience for the DIY user and are typical for use with milling
machines lathes routers plasma and laser machine tools It is the users responsibility to setup test verify
instruct operators and routinely test the safety functionality of any machine tool on a maintenance schedule
Centroid CNC software contains pre programmed safety door configurations Centroid CNC software safety
features can also be completely customized by the user/integrator to achieve the desired safety features for a
particular machine tool configuration
Adding Safety Door Interlock to Acorn/AcornSix/Hickory
Included free with Acorn/AcornSix/Hickory CNC software are pre programmed safety inputs and the
corresponding safety logic for typical established industrial door interlock functionality
There are two main approaches for setting up safety devices on an Acorn/AcornSix/Hickory equipped CNC
machine tool
1 Use the Centroid Pre Programmed Door Interclock logic with a typical door safety device The two of
the most common door interlock methods are outlined below which are supported with the pre
programmed logic
2 User/Integrator creates there own Safety Logic This is done by customizing the CNC control machine
tool PLC program to meet the safety requirements Centroidβs PLC programming api is free and open
source so unlimited customization options are possible door switches light curtains hand and foot
switches and many other types of safety mechanisms can be supported with Centroid PLC logic In
this case it is up to you to configure the PLC logic to meet the CNC machine tool safety requirements
Input Requirements
β’ One unused input for SafetyDoorSwitchClosed Method 1 and 2
β’ One unused input for SafetyDoorLockConfirmed when using Method 2
β’ Two unused outputs for NoFaultOut and SafetyDoorLockOpen when using Method 2
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 1
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Using the Acorn Wizard to setup safety devices with pre programmed safety functions
The Acorn Wizard is used to define which inputs and outputs are used for safety devices and the integrator
chooses which type of typical safety logic to employ There are two pre programmed methods to setup a safety
door switch using the Acorn Wizard
β’ Door Safety Method 1 Simple switch on the door or guard of the machine that triggers when the door is
open This uses a single input and triggers the door safety switch PLC logic
β’ Door Safety Method 2 Use a combination of door safety switch and interlock this wonβt allow the door
to open while the machine is in operation such as this unit
https //www mscdirect com/product/details/49794548
Method 1
Installation of a simple door safety switch and activation of Door Safety Logic
Wire the switch according to the Acorn schematic #S15079 and use the Wizard input menu to define that input
location Note Any unused input on the Acorn AcornSix Hickory or input expansion boards can be used just
be sure the Wizard input definition for the door closed switch matches the physical wired input on the
controller in the Acorn example below that would be input 7
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 2
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Test the switch by observing the input using the CNC12 PLC diagnostic screen Alt+i More information on
how to use the PLC diagnostic menu can be found here
https //www centroidcnc com/centroid_diy/downloads/acorn_documentation/cnc12_PLC_diagnostic_screen pdf
Then choose the type of safety logic desired defined by Parameter 985 To navigate to the parameters menu
follow this menu selection sequence Setup F1 Config F3 enter password 137 Parms F3 Next Table
F8 until you reach P900 999 Set Parameter 985 to 1 to allow slow jogging while the door is open or 2 for
complete system stop while door is open More information about P985 can be found on Page 7
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 3
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Method 2
Install a combination door safety switch and door interlock such as the Telemecanique XCSTE5312
https //www mscdirect com/product/details/49794548
Wire according to schematic #S15078 or #15011 Ether1616 example Just like Method 1 any free input and
output can be employed Just be sure to define them using the Wizard to match the physical wiring
D
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 4
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Define the inputs and outputs using the Wizard
Inputs for Method 2
Outputs for Method 2
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 5
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Test the switch by observing the input s using the CNC12 PLC diagnostic screen Alt+i More information on
how to use the PLC diagnostic menu can be found here
https //www centroidcnc com/centroid_diy/downloads/acorn_documentation/
cnc12_PLC_diagnostic_screen pdf
Now that the switch es have been wired configured and tested choose which style of safety logic is required
as defined by Parameter 985
To navigate to the parameters menu follow this menu selection sequence Setup F1 Config F3 enter
password 137 Parms F3 Next Table F8 until you reach P900 999
Set Parameter 985 to 1 to allow slow jogging while the door is open
or 2 for complete system stop while door is open
More information about P985 can be found on Page 7
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 6
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
P985 = 0 Disables Safety Door Logic
Door open condition with P985 = 1 Action
While running G Code program Shuts off spindle stops all motion enters into Feed
Hold mode issues message βDoor Open close the
door and press Cycle Start to continue β When the
door closes issues message βDoor Closed press
Cycle Start to continue β
While NOT running a G Code program Spindle will not turn on issues message to close the
door if the user attempts to turn on the spindle in
manual or auto mode βDoor Open close the door to
run the spindle β
Starting a G Code program No automatic movement before door is closed βDoor
Open close the door and press Cycle Start to
continue β When door closes issues message βDoor
Closed press Cycle Start to continue β
Jogging Allows Slow Jogging will not allow user to select Fast
Jog on VCP or MPG Issues message βDoor Open
slow jogging only β
When Method 2 is used When exiting from a program or Feed Hold with
Spindle Stop the door is unlocked after 3 seconds
When the door is closed and the program starts
SafetyDoorLockOpen is turned off and checks for
DoorLockConfirmed
Will fault the system if DoorLockConfirmed is not seen
within 2 seconds and issues message β9087 Door
Lock Fault!β
Door open condition with P985 = 2 Action
While running G Code program Shuts off spindle stops all motion enters into Estop
condition issues message βDoor Open close the
door and press Cycle Start to continue β When the
door closes issues message βDoor Closed press
Cycle Start to continue
While NOT running a G Code program Spindle will not turn on issues message to close the
door if the user attempts to turn on the spindle in
manual or auto mode βDoor Open close the door to
run the spindle β
Starting a G Code program No automatic movement before door is closed βDoor
Open close the door and press Cycle Start to
continue β When door closes issues message βDoor
Closed press Cycle Start to continue β
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 7
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Jogging Does not allow Jogging will not allow user to jog the
machine with VCP or MPG Issues message βDoor
Open close door and cycle Reset to continueβ
When Method 2 is used When exiting from a program or Feed Hold with
Spindle Stop the door is unlocked after 3 seconds
When the door is closed and the program starts
SafetyDoorLockOpen is turned off and checks for
DoorLockConfirmed
Will fault the system if DoorLockConfirmed is not seen
within 2 seconds and issues message β9087 Door
Lock Fault!β
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 8
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Custom Safety Device Configuration
Centroid CNC controls can be installed on a wide variety of automated equipment that require different safety
devices and functionality than that of the Centroid provided pre programmed door safety logic Centroid has
made freely available the ability to accommodate an equally wide variety of safety devices and functionality
The Centroid CNC PLC system is flexible and can be made to meet most any special requirements for safety
When the machine tool safety functionality is desired to be different than the standard Centroid provided pre
programmed logic the integrator has several choices
β’ Edit the machine PLC program to meet their requirements
β’ Have a 3 rd
party edit the machine CNC Machine PLC program to meet the requirements
β’ Hire Centroid to create a custom CNC Machine PLC program at the going engineering hourly rate
With all these options a clear definition of the machine tool safety requirements is necessary before any work
begins
Centroidβs PLC programming language tools documentation and how to videos are provided free and are
available on our website Free tech PLC programming and safety related support is also available on the
Centroid Community Forum
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 9
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Example of adding simple Safety Door Logic to an Oak/AllinOneDC/MPU11 system
Basic safety switch logic can be added to an existing PLC program The code will cause any active G
Code to stop if the door safety switch is opened β but will allow new G Code to run afterwards β and will
disallow the use of the spindle so long as the door remains open
Adding the Logic
To begin with open the desired PLC β srcβ program Once
open scroll down to where the constants are defined At this point
the messages are going to be defined for the message window in the
CNC software Either go to the end of the section or find a gap in the
messages for two numbers These can be found by looking in the
comments to see how the number after βISβ has been calculated
Figure 1 right shows how the numbers display on constant
definitions For this example message numbers 55 & 56 will be used
to define the two messages needed for the door safety switch Figure
2 below shows that the variable names for the constants will be
βSAFETY_SWITCH_OPEN_MSGβ and
βSAFETY_SWITCH_SPINDLE_MSGβ Newer programs may show them as
βSAFETY_SWITCH_OPEN_MSG_Cβ and βSAFETY_SWITCH_SPINDLE_MSG_Cβ respectively
Next find the variable declarations for inputs in the program and define the door closed input Input 8
is being used in the sample program
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 10Figure 1
Figure 2
Figure 3
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
With the input declared two memory variables need to be declared βSafetySwitch_Mβ and
βSafetySwitchToolCheck_Mβ In this example memory variables 29 and 30 are being used
The last variable declaration is a stage for the safety switch logic In this example SafetySwitchInterruptStage
will be declared as STG 62
With the variable declarations completed scroll down in the PLC program to the βInitialStageβ section and add
the line β SET SafetySwitchInterruptStage β within the statement where the other stages are set
Note that there is a comma at the end of this code because it is being placed in the middle of a THEN
statement
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 11Figure 4
Figure 5
Figure 6
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Finally the code will be added for SafetySwitchInterruptStage Scroll down until reaching the end of the
MainStage and just before the start of the next stage's code add the following
Adding PLC Messages
To properly display the error messages that were added to the PLC program open the plcmsg txt file in the
same directory as the PLC's src file Scroll down to the point where the assigned message numbers would
be and add the lines Lead the lines with the message number then a number equaling the message number
+8000 and lastly the message desired to appear in the console when that error is triggered
Once all of these steps are taken save and compile then restart the machine to apply the changes
Supporting Documents and Important Links
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 12Figure 7
Figure 8
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Centroid Community Forum https //centroidcncforum com/index php
All Acorn documentation https //centroidcncforum com/viewtopic php?f=60&t=3397
PLC programming manual
https //www centroidcnc com/centroid_diy/downloads/centroid_plc_programming_manual pdf
PLC programming video series https //www youtube com/playlist?
list=PLXhs2C5No0_gFS_RmKNo7hii2WKIedQlQ
PLC detective tool https //www centroidcnc com/downloads/centroid_PLC_detective_quickstart pdf
Safety switch manufacture videos
https //youtu be/QwsTKxpTylI?si=NcLaRwpsOfA9fnpC
https //youtu be/dQh_7RiUuc8?si=dZ_EcQXV0YBCKoTt
more information
https //www globalspec com/learnmore/manufacturing_process_equipment/industrial_machine_safeguarding/
mechanical_safety_interlock_switches
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 13
TB314 Rev6 β Instructions for Adding Door Safety Switch Logic
Document History
rev1 β 05/23/2019 Document created
rev2 β 05/23/2019 Added section for βAdding PLC Messagesβ
rev3 β 05/20/2019 Added document history and location
rev4 β 06/04/2019 Changed references of βInterlockβ to βSafety Switchβ updated to streamlined code
Rev5 β 11/03/2023 Added Acorn/AcornSix/Hickory Safety Door Switch instructions
Rev6 β 11 7 23 overall improvements for clarity km
Location 192 168 0 199/public/tech/technical bulletins/TB314/TB314_rev6 odt
Z \tech\Technical bulletins\TB314\TB314_rev6 odt 14