This commit is contained in:
Samuele Locatelli
2020-07-17 14:53:32 +02:00
2 changed files with 10 additions and 9 deletions
+3 -3
View File
@@ -110,12 +110,12 @@ namespace CMS_CORE_Library.Osai
HttpBinding.MaxReceivedMessageSize = int.MaxValue;
HttpBinding.MaxBufferPoolSize = int.MaxValue;
//Open the connection
OpenNC = new OPENcontrolPortTypeClient(HttpBinding, endPointAddress);
//Try to get information
try
{
//Open the connection
OpenNC = new OPENcontrolPortTypeClient(HttpBinding, endPointAddress);
//Try to retireve the NC-Status
nReturn = OpenNC.BootPhaseEnquiry(out CNCPhase, out uint errorClass, out uint errorNum);
+7 -6
View File
@@ -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];
@@ -2720,7 +2721,7 @@ namespace CMS_CORE_Library.Siemens
DataSvc svcData = new DataSvc();
bool[] axesAreVisible = new bool[MAX_AXES_FOR_PROCESS];
// Read from Nc
// Setup data to be readed
for (int i = 1; i <= MAX_AXES_FOR_PROCESS; i++)
{
// Set the path to read on which process is the axis
@@ -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)
{