Fix reset counters
This commit is contained in:
@@ -892,9 +892,11 @@ namespace CMS_CORE_Library.Fanuc
|
||||
bool bitValue = true;
|
||||
int nTry = 0;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i <= 4; i++)
|
||||
{
|
||||
//Scrivo il bit
|
||||
bitValue = true;
|
||||
nTry = 0;
|
||||
cmsError = MEM_RWBoolean(W, 0, MACHINE_RESET_WORKED_TIME.MemType, MACHINE_RESET_WORKED_TIME.Address, 0, ref bitValue);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
@@ -908,7 +910,7 @@ namespace CMS_CORE_Library.Fanuc
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
} while (!bitValue || nTry > 10);
|
||||
} while (bitValue && nTry <= 10);
|
||||
|
||||
//se il valore è rimasto a 1 il plc non l'ha preso in carico, e abortisco
|
||||
if (bitValue)
|
||||
|
||||
@@ -861,9 +861,11 @@ namespace CMS_CORE_Library.Osai
|
||||
bool bitValue = true;
|
||||
int nTry = 0;
|
||||
|
||||
for (int i = 0; i<4; i++)
|
||||
for (int i = 0; i<=4; i++)
|
||||
{
|
||||
//Scrivo il bit
|
||||
bitValue = true;
|
||||
nTry = 0;
|
||||
cmsError = MEM_RWBoolean(W, 0, MACHINE_RESET_WORKED_TIME.MemType, MACHINE_RESET_WORKED_TIME.Address,0, ref bitValue);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
@@ -877,7 +879,7 @@ namespace CMS_CORE_Library.Osai
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
} while (!bitValue || nTry > 10);
|
||||
} while (bitValue && nTry <= 10);
|
||||
|
||||
//se il valore è rimasto a 1 il plc non l'ha preso in carico, e abortisco
|
||||
if (bitValue)
|
||||
|
||||
@@ -1094,9 +1094,11 @@ namespace CMS_CORE_Library.Siemens
|
||||
bool bitValue = true;
|
||||
int nTry = 0;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i <= 4; i++)
|
||||
{
|
||||
//Scrivo il bit
|
||||
bitValue = true;
|
||||
nTry = 0;
|
||||
cmsError = MEM_RWBoolean(W, 0, MACHINE_RESET_WORKED_TIME.MemType, MACHINE_RESET_WORKED_TIME.Address, MACHINE_RESET_WORKED_TIME.SubAddress, 0, ref bitValue);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
@@ -1110,7 +1112,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
} while (!bitValue || nTry > 10);
|
||||
} while (bitValue && nTry <= 10);
|
||||
|
||||
//se il valore è rimasto a 1 il plc non l'ha preso in carico, e abortisco
|
||||
if (bitValue)
|
||||
|
||||
Reference in New Issue
Block a user