fix error for thermo params collision
This commit is contained in:
@@ -2038,7 +2038,13 @@ namespace CMS_CORE_Library.S7Net
|
||||
}
|
||||
else
|
||||
{
|
||||
ThermoParamList.Add(currParam.Id, new ThermoModels.RecipeParam() { Id = currParam.Id, Enabled = currParam.Enabled, HasError = currParam.HasError, Visible = currParam.Visible, ValueAct = currParam.ValueAct });
|
||||
try
|
||||
{
|
||||
ThermoParamList.Add(currParam.Id, new ThermoModels.RecipeParam() { Id = currParam.Id, Enabled = currParam.Enabled, HasError = currParam.HasError, Visible = currParam.Visible, ValueAct = currParam.ValueAct });
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2213,15 +2219,20 @@ namespace CMS_CORE_Library.S7Net
|
||||
}
|
||||
else
|
||||
{
|
||||
ThermoModuleList.Add(currModBlock.Id, new ThermoModels.ModuleBlock()
|
||||
try
|
||||
{
|
||||
Id = currModBlock.Id,
|
||||
ActualDuration = currModBlock.ActualDuration,
|
||||
ActualDelay = currModBlock.ActualDelay,
|
||||
Visible = currModBlock.Visible,
|
||||
Running = currModBlock.Running,
|
||||
HasError = currModBlock.HasError
|
||||
});
|
||||
ThermoModuleList.Add(currModBlock.Id, new ThermoModels.ModuleBlock()
|
||||
{
|
||||
Id = currModBlock.Id,
|
||||
ActualDuration = currModBlock.ActualDuration,
|
||||
ActualDelay = currModBlock.ActualDelay,
|
||||
Visible = currModBlock.Visible,
|
||||
Running = currModBlock.Running,
|
||||
HasError = currModBlock.HasError
|
||||
});
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2689,7 +2700,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
// update only given data...
|
||||
foreach (var item in newData)
|
||||
{
|
||||
newMem[item.Key - 1] = item.Value;
|
||||
newMem[item.Key] = item.Value;
|
||||
}
|
||||
// return as list...
|
||||
ListValue = newMem.ToList();
|
||||
@@ -2721,7 +2732,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
// update only given data...
|
||||
foreach (var item in newData)
|
||||
{
|
||||
newMem[item.Key - 1] = (byte)item.Value;
|
||||
newMem[item.Key] = (byte)item.Value;
|
||||
}
|
||||
// return as list...
|
||||
currMem = newMem.ToList();
|
||||
@@ -3166,11 +3177,11 @@ namespace CMS_CORE_Library.S7Net
|
||||
List<ushort> ListValue = new List<ushort>() { Value };
|
||||
|
||||
//uses the List method with one-element list
|
||||
CmsError cmsError = MEM_RWWordList(bWrite, Process, MemType, MemTable, MemIndex, 1, ref ListValue);
|
||||
CmsError cmsError = MEM_RWWordList(bWrite, Process, MemType, MemTable, MemIndex, 2, ref ListValue);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
Value = ListValue.First();
|
||||
if(ListValue.Count>0)
|
||||
Value = ListValue.First();
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
@@ -4734,7 +4745,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
internal static MEMORY_CELL MODULE_RT_DATA = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 603, 12, 1536);
|
||||
|
||||
// riscaldi
|
||||
internal static MEMORY_CELL RISC_VU_MIN = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 513, 0, 1);
|
||||
internal static MEMORY_CELL RISC_VU_MIN = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 513, 0, 2);
|
||||
internal static MEMORY_CELL RISC_OCC_DATA = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 514, 64, 64);
|
||||
internal static MEMORY_CELL RISC_CHP_DATA = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 614, 0, 1024);
|
||||
internal static MEMORY_CELL RISC_CFI_DATA = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 514, 2176, 1024);
|
||||
|
||||
Reference in New Issue
Block a user