Fix shanks

Osai: on startup check directory
This commit is contained in:
Lucio Maranta
2019-04-29 16:52:17 +02:00
parent 3d68ac9b26
commit 202e4352d4
9 changed files with 334 additions and 196 deletions
+9 -6
View File
@@ -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;