Gestione sincronismo siemens
This commit is contained in:
@@ -4627,6 +4627,28 @@ namespace CMS_CORE_Library.Siemens
|
||||
return ManageException(ex);
|
||||
}
|
||||
|
||||
Thread.Sleep(100);
|
||||
int response = -1;
|
||||
|
||||
try
|
||||
{
|
||||
//Devo verificare che funzioni correttamente
|
||||
DataSvc dataSvc = new DataSvc();
|
||||
//Read Machine status
|
||||
Item itemToRead = new Item("/Channel/State/aTcStatus[u1, 1]");
|
||||
dataSvc.Read(itemToRead);
|
||||
response = Convert.ToInt32(itemToRead.Value);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ManageException(ex);
|
||||
}
|
||||
// 1 OK 3 ABORTED
|
||||
if (response != 1 && response != 0)
|
||||
{
|
||||
return MAGAZINE_BUSY_ERROR;
|
||||
}
|
||||
|
||||
// Mount temporarily till the Siemens notification arrives
|
||||
MoveToolInMagazineList(newMagazineTool.ToolId, magazineId, newMagazineTool.PositionId);
|
||||
|
||||
@@ -4679,6 +4701,28 @@ namespace CMS_CORE_Library.Siemens
|
||||
return ManageException(ex);
|
||||
}
|
||||
|
||||
Thread.Sleep(100);
|
||||
int response = -1;
|
||||
|
||||
try
|
||||
{
|
||||
//Devo verificare che funzioni correttamente
|
||||
DataSvc dataSvc = new DataSvc();
|
||||
//Read Machine status
|
||||
Item itemToRead = new Item("/Channel/State/aTcStatus[u1, 1]");
|
||||
dataSvc.Read(itemToRead);
|
||||
response = Convert.ToInt32(itemToRead.Value);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
return ManageException(ex);
|
||||
}
|
||||
// 1 OK 3 ABORTED
|
||||
if(response != 1 && response != 0)
|
||||
{
|
||||
return MAGAZINE_BUSY_ERROR;
|
||||
}
|
||||
|
||||
//// Smount temporarily till the Siemens notification arrives
|
||||
int magPosIndex = MagazineMountedTools.FindIndex(x => x.MagazineId == magazineId && x.PositionId == positionId);
|
||||
if (magPosIndex >= 0)
|
||||
|
||||
Reference in New Issue
Block a user