Fix shanks
Osai: on startup check directory
This commit is contained in:
@@ -964,21 +964,23 @@ public static class ThreadsFunctions
|
||||
{
|
||||
// Try reconnection
|
||||
cmsError = ncHandler.Connect();
|
||||
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND || cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING)
|
||||
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND || cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING || cmsError.errorCode == CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND)
|
||||
ManageLibraryError(cmsError);
|
||||
else if (cmsError.errorCode != CMS_ERROR_CODES.OK)
|
||||
ncHandler.Dispose();
|
||||
else
|
||||
{
|
||||
// Send status to UI
|
||||
MessageServices.Current.Publish(SEND_NC_STATUS, null, ncHandler.numericalControl.NC_IsConnected());
|
||||
|
||||
// Send status to UI
|
||||
MessageServices.Current.Publish(SEND_NC_STATUS, null, ncHandler.numericalControl.NC_IsConnected());
|
||||
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
}
|
||||
if (ServerStartupConfig.AutoOpenCmsClient)
|
||||
StartCMSClient(null);
|
||||
|
||||
|
||||
if(NcConfig.NcVendor == NC_VENDOR.FANUC || NcConfig.NcVendor == NC_VENDOR.DEMO)
|
||||
if(NcConfig.NcVendor == NC_VENDOR.FANUC || NcConfig.NcVendor == NC_VENDOR.OSAI)
|
||||
{
|
||||
using (NcToolTableHandler toolTable = new NcToolTableHandler())
|
||||
{
|
||||
@@ -1030,6 +1032,7 @@ public static class ThreadsFunctions
|
||||
break;
|
||||
|
||||
case CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND:
|
||||
case CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND:
|
||||
Manage(ERROR_LEVEL.FATAL, cmsError.localizationKey);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user