This commit is contained in:
Lucio Maranta
2018-02-27 11:03:49 +00:00
parent 97da821de6
commit ada191e3ca
3 changed files with 9 additions and 20 deletions
+5 -17
View File
@@ -82,7 +82,7 @@ namespace CMS_CORE_Application
N.NC_RProcessesNum(ref procnum);
N.NC_RMachineNumber(ref MachNumber);
bool error = false;
string serial = "";
while (true)
{
cmsError = N.PROC_RMode(1, ref mode);
@@ -121,29 +121,16 @@ namespace CMS_CORE_Application
error = true;
SetError(Lines, cmsError);
}
sw.Stop();
cmsError = N.NC_RDateTime(ref NcTime);
if (cmsError.IsError())
{
error = true;
SetError(Lines, cmsError);
}
List<FunctionalityModel> a = null;
cmsError = N.PLC_RFunctionAccess(ref a);
PreAndPostPowerOnModel preAndPostPowerOnModel = new PreAndPostPowerOnModel();
N.PLC_RAxesResetData(ref axisResetDataModel);
cmsError = N.PLC_RPowerOnData(ref preAndPostPowerOnModel);
if (cmsError.IsError())
{
error = true;
SetError(Lines, cmsError);
}
cmsError = N.PLC_RMachineCounters(ref counters);
cmsError = N.NC_RSerialNumber(ref serial);
sw.Stop();
if (!this.IsDisposed && this.InvokeRequired)
{
this.Invoke((ThreadStart)delegate ()
@@ -301,6 +288,7 @@ namespace CMS_CORE_Application
});
}
}
private Nc SetNcByType()
{
if (NCType == "Siemens")
-1
View File
@@ -92,7 +92,6 @@ namespace CMS_CORE_Library
{
AxisReset = new PowerOnDataModel();
WaterjetPump = new PowerOnDataModel();
}
public override bool Equals(object obj)
+4 -2
View File
@@ -141,7 +141,7 @@ namespace CMS_CORE.Fanuc
return cmsError;
SN = Cnc_SeriesNum;
return NO_ERROR;
}
@@ -1713,6 +1713,7 @@ namespace CMS_CORE.Fanuc
short nReturn1, nReturn2;
Focas1.ODBSYS node = new Focas1.ODBSYS();
Focas1.ODBSYS tmpNode = new Focas1.ODBSYS();
Focas1.ODBSYSEX nodeex = new Focas1.ODBSYSEX();
ulong SerialNumber = 0;
@@ -1725,7 +1726,8 @@ namespace CMS_CORE.Fanuc
return cmsError;
//Execute the method
nReturn1 = Focas1.cnc_sysinfo(nLibHandle[0], node);
nReturn1 = Focas1.cnc_sysinfo(nLibHandle[0], tmpNode);
node = tmpNode;
nReturn2 = Focas1.cnc_rdcncid(nLibHandle[0], out SerialNumber);
//Throw Exception if there's an error