Fix siemens multiprocess
This commit is contained in:
@@ -279,7 +279,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
{
|
||||
// Clean listener
|
||||
AxesSvc.UnSubscribe(ManageAxes);
|
||||
|
||||
//AxesData = new List<AxisModel>();
|
||||
if (SelectedProcess > 0)
|
||||
{
|
||||
List<AxisModel> axesConf = new List<AxisModel>();
|
||||
@@ -2305,7 +2305,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
|
||||
int readValue = 0;
|
||||
// Read processes status from memory
|
||||
cmsError = MEM_RWInteger(R, 0, PROCESS_STATUS.MemType, PROCESS_STATUS.Address, PROCESS_STATUS.SubAddress + ((procNumber - 1) * 2), ref readValue);
|
||||
cmsError = MEM_RWInteger(R, 0, PROCESS_STATUS.MemType, PROCESS_STATUS.Address, PROCESS_STATUS.SubAddress + ((procNumber - 1) * 4), ref readValue);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
@@ -2378,7 +2378,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
return INCORRECT_PARAMETERS_ERROR;
|
||||
|
||||
// Write process number
|
||||
cmsError = MEM_RWByte(W, 0, SELECT_PROCESS.MemType, SELECT_PROCESS.Address, SELECT_PROCESS.SubAddress, ref processNum);
|
||||
cmsError = MEM_RWByte(W, 0, SELECT_PROCESS.MemType, SELECT_PROCESS.Address, SELECT_PROCESS.SubAddress + 1, 0, ref processNum);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
@@ -2693,6 +2693,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
CmsError cmsError = CheckConnection();
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
List<AxisModel> configuredAxes = new List<AxisModel>();
|
||||
|
||||
Item[] ncAxes = new Item[MAX_AXES_FOR_PROCESS * 3];
|
||||
@@ -2758,7 +2759,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
return cmsError;
|
||||
|
||||
// Remove not visible axes
|
||||
axesData = axesData.Where(x => ids.Contains((byte)x.Id)).ToList();
|
||||
axesData = AxesData.Where(x => ids.Contains((byte)x.Id)).ToList();
|
||||
|
||||
// Set to true (old compatibility)
|
||||
foreach (var axis in axesData)
|
||||
@@ -2778,7 +2779,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
// }
|
||||
//}
|
||||
|
||||
axesData = AxesData;
|
||||
//axesData = AxesData;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user