Fanuc TT
& alarm Fixes
This commit is contained in:
+7
-2
@@ -38,7 +38,7 @@ namespace Step
|
||||
ServerControlWindow.Start();
|
||||
|
||||
// Create unhandled exception handler
|
||||
// AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionHandler);
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionHandler);
|
||||
|
||||
// Read config
|
||||
ServerConfigController.ReadStartupConfig();
|
||||
@@ -117,7 +117,12 @@ namespace Step
|
||||
private static void ExceptionHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
ncHandler.Disconnect();
|
||||
{
|
||||
if (ncHandler.numericalControl.NC_IsConnected())
|
||||
{
|
||||
ncHandler.Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
LogException((Exception)args.ExceptionObject, ERROR_LEVEL.FATAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user