Fix siemens strobe

This commit is contained in:
Lucio Maranta
2019-05-17 11:09:52 +00:00
parent 86cb2c6fa9
commit 75c5b298e3
2 changed files with 16 additions and 3 deletions
+5 -3
View File
@@ -53,7 +53,7 @@ namespace CMS_CORE_Library.Osai
private static List<string> EXT_IMG = new List<string>() { "PNG", "JPG", "JPEG" };
private const uint MAX_ROWS_FILE_PREVIEW = 10; // massimo 10 righe
private const string TOOL_MANAGER_BACKUP_DIRECTORY_PATH = @"\\";
private const string TOOL_MANAGER_BACKUP_DIRECTORY_PATH = @"C:\CMS\Active\TMP\";
private const string FAMILIES_FILE_NAME = @"Families";
private const string FAM_SIZE_FILE_NAME = @"Fam_Sizes";
@@ -3775,8 +3775,10 @@ namespace CMS_CORE_Library.Osai
ShankId = ushort.Parse(x[0]),
Balluf = ushort.Parse(x[1]),
MagazineId = byte.Parse(x[2]),
PositionId = byte.Parse(x[3]),
MagazinePositionType = byte.Parse(x[4])
PositionId = ushort.Parse(x[3]),
MagazinePositionType = byte.Parse(x[4]),
OriginMagazineId = byte.Parse(x[5]),
OriginPositionId = ushort.Parse(x[6])
}).ToList();
}
+11
View File
@@ -1478,6 +1478,8 @@ namespace CMS_CORE_Library.Siemens
int n = 600;
bool readValue = false;
bool writeValue = false;
bool ok = false;
CmsError cmsError;
do
{
@@ -1495,6 +1497,7 @@ namespace CMS_CORE_Library.Siemens
return cmsError;
// Exit from cycle
n = 0;
ok = true;
}
else
{
@@ -1505,6 +1508,14 @@ namespace CMS_CORE_Library.Siemens
}
} while (n > 0);
if (!ok)
{
// Reset strobe
cmsError = MEM_RWBoolean(W, 0, memType, strobeByte, bitId, ref writeValue);
if (cmsError.IsError())
return cmsError;
}
return cmsError;
}