logo

Connecting multiple input signals that can cause emergency stop

Tuesday, 09 March 2021

Sometimes a need arises that, besides ESTOP input, some additional inputs are used to cause ESTOP condition and stopping the work process. These can be for example error signals from servo drives or similar.

Mach3 does not directly support additional ESTOP input signals, but there are several ways to still realize this function.

First, there is a possible hardware solution that involves summing all the additional input signals using logic "OR" circuit and along with real ESTOP signal connecting summed output to the existing ESTOP input.

However, if when error appear we need information and distinguish which exactly error signal is activated, then it is still necessary to connect all these signals to a multiple different inputs on the motion controller.

One possible way to achieve this function in software is using Macro Pump macro (script) in Mach3 software.

Namely, Mach3 supports continual background execution of MacroPump.m1s script so it is possible in this script to check additional inputs and undertake necessary actions when active signal is detected.

MacroPump.m1s

'Macro to check OemTrigger 1-3 input signals and if any is activated
'then activate ESTOP and display error message in the status line.
'OEMTrig#1,#2, #3 should be setup in Ports&Pins\InputSignals
'Macro pump should be enabled in General config so that this macro
'is executed continuously in the background

 

If(IsActive(OEMtrig1))Then
   If IsEstop()=0 Then DoOemButton(1021) endif
   Message "Error with servo motor 1!"
end if

If(IsActive(OEMtrig2))Then
   If IsEstop()=0 Then DoOemButton(1021) endif
   Message "Error with servo motor 2!"
end if

If(IsActive(OEMtrig3))Then
   If IsEstop()=0 Then DoOemButton(1021) endif
   Message "Error with servo motor 3!"
end if

In the following script example three inputs are monitored, OemTrigger #1-#3, and if any of the input signals is detected, ESTOP mode is activated. Also in the Mach3 status line the corresponding error that caused the interruption is shown.

For this to work properly it is required to:

  • copy script MacroPump.m1s to the folder Mach3/macros/XMLprofileName,
  • setup in Ports&Pins/InputSignals port and pins for signals OemTrig 1-3, and
  • in General config settings turn on the option Run Macro Pump and restart Mach3 software.

Off course, it is possible to change number of additional signals that are monitored. As already mentioned, in the shown example MacroPump.m1s three signals are monitored.

Also it is possible to change text message that is shown upon activation of any of the inputs. This is achieved by altering the text in the command:
...
Message "Processing stopped due to error..."
...

The suggested way of detecting multiple input signals that can cause ESTOP condition is possible to use with all Audioms Automatika doo motion controllers.

Now you have means to easily detect which error caused your machine to stop.

Audioms Automatika doo Support team

logo footer

Develop and produce motion controllers, stepper and DC servo motors drives.

Follow us:

Facebook Twitter Youtube

Contact & Ordering

AUDIOMS AUTOMATIKA DOO
Ibarskih rudara str. 3/8, 34000 Kragujevac
Serbia, EUROPE

Web: www.audiohms.com
E-mail: prodaja@audiohms.com

Technical support
E-mail: office@audiohms.com