Fixed Osai-Messages Reading
This commit is contained in:
@@ -104,15 +104,13 @@ namespace CMS_CORE.Fanuc
|
||||
public override void NC_Disconnect()
|
||||
{
|
||||
short nReturn;
|
||||
|
||||
//Check if the NC is Connected
|
||||
CheckConnection();
|
||||
|
||||
//If is connected -> Disconncet
|
||||
foreach (ushort handle in nLibHandle)
|
||||
{
|
||||
nReturn = Focas1.cnc_freelibhndl(handle);
|
||||
}
|
||||
|
||||
if(Connected)
|
||||
//If is connected -> Disconncet
|
||||
foreach (ushort handle in nLibHandle)
|
||||
{
|
||||
nReturn = Focas1.cnc_freelibhndl(handle);
|
||||
}
|
||||
|
||||
//Setup the "Connected" value to FALSE
|
||||
Connected = false;
|
||||
|
||||
+10
-5
@@ -1163,23 +1163,28 @@ namespace CMS_CORE
|
||||
public readonly MEMORY_Type MemType;
|
||||
public readonly int Address;
|
||||
public readonly int SubAddress; //Only for Siemens
|
||||
public readonly int Size;
|
||||
|
||||
public MEMORY_Cell(MEMORY_Type MType, int Addr, int SubAddr)
|
||||
public MEMORY_Cell(MEMORY_Type MType, int Addr, int SubAddr,int Sz)
|
||||
{
|
||||
MemType = MType;
|
||||
Address = Addr;
|
||||
SubAddress = SubAddr;
|
||||
Size = Sz;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Lingua CN
|
||||
internal MEMORY_Cell PARAM_LING_FANUC = new MEMORY_Cell(MEMORY_Type.Null, 3281, 0);
|
||||
internal MEMORY_Cell PARAM_LING_FANUC = new MEMORY_Cell(MEMORY_Type.Null, 3281, 0, 1);
|
||||
|
||||
//Matricola Macchina
|
||||
internal MEMORY_Cell MATR_MACCH_OSAI = new MEMORY_Cell(MEMORY_Type.Osai_MW , 3403, 0);
|
||||
internal MEMORY_Cell MATR_MACCH_FANUC = new MEMORY_Cell(MEMORY_Type.Fanuc_D , 4018, 0);
|
||||
internal MEMORY_Cell MATR_MACCH_SIEMENS = new MEMORY_Cell(MEMORY_Type.Siemens_DB, 255 , 0);
|
||||
internal MEMORY_Cell MATR_MACCH_OSAI = new MEMORY_Cell(MEMORY_Type.Osai_MW , 3403, 0, 1);
|
||||
internal MEMORY_Cell MATR_MACCH_FANUC = new MEMORY_Cell(MEMORY_Type.Fanuc_D , 4018, 0, 1);
|
||||
internal MEMORY_Cell MATR_MACCH_SIEMENS = new MEMORY_Cell(MEMORY_Type.Siemens_DB, 255 , 0, 1);
|
||||
|
||||
//Messaggi PLC
|
||||
internal MEMORY_Cell PLC_MESS_OSAI = new MEMORY_Cell(MEMORY_Type.Osai_MW, 12000, 0, 64);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace CMS_CORE.Osai
|
||||
CheckConnection();
|
||||
|
||||
//Execute the method
|
||||
MEM_RWWordList(R, 0, MEMORY_Type.Osai_MW, 12000, 47, ref lista);
|
||||
MEM_RWWordList(R, 0, PLC_MESS_OSAI.MemType, PLC_MESS_OSAI.Address, PLC_MESS_OSAI.Size, ref lista);
|
||||
|
||||
//Elaborates the Messages
|
||||
for (int i=0; i<lista.Count;i++)
|
||||
@@ -1396,8 +1396,8 @@ namespace CMS_CORE.Osai
|
||||
HttpBinding.Name = "OPENcontrol";
|
||||
HttpBinding.CloseTimeout = TimeSpan.Parse("00:00:10");
|
||||
HttpBinding.OpenTimeout = TimeSpan.Parse("00:00:10");
|
||||
HttpBinding.ReceiveTimeout = new TimeSpan(TimeSpan.TicksPerSecond * timeOutConn);
|
||||
HttpBinding.SendTimeout = new TimeSpan(TimeSpan.TicksPerSecond * timeOutConn);
|
||||
HttpBinding.ReceiveTimeout = new TimeSpan(TimeSpan.TicksPerMillisecond * timeOutConn);
|
||||
HttpBinding.SendTimeout = new TimeSpan(TimeSpan.TicksPerMillisecond * timeOutConn);
|
||||
HttpBinding.AllowCookies = false;
|
||||
HttpBinding.BypassProxyOnLocal = true;
|
||||
HttpBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
|
||||
|
||||
@@ -381,7 +381,7 @@ namespace CMS_CORE.Siemens
|
||||
//Get a dictionary with the Actual position of the axes in Process
|
||||
public override void AXES_RInterpPosition(ushort ProcNumber, ref Dictionary<string, double> Axes)
|
||||
{
|
||||
throw new Nc_Exception("CMS-Core-Error: Function not allowed for this type of NC");
|
||||
Axes.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace CMS_CORE.Siemens
|
||||
//Get a dictionary with the Machine position of the axes in Process
|
||||
public override void AXES_RMachinePosition(ushort ProcNumber, ref Dictionary<string, double> Axes)
|
||||
{
|
||||
throw new Nc_Exception("CMS-Core-Error: Function not allowed for this type of NC");
|
||||
Axes.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ namespace CMS_CORE.Siemens
|
||||
//Get a dictionary with the Programmed position of the axes in Process
|
||||
public override void AXES_RProgrPosition(ushort ProcNumber, ref Dictionary<string, double> Axes)
|
||||
{
|
||||
throw new Nc_Exception("CMS-Core-Error: Function not allowed for this type of NC");
|
||||
Axes.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@ namespace CMS_CORE.Siemens
|
||||
//Get a dictionary with the Following Error of the axes in Process
|
||||
public override void AXES_RFollowingError(ushort ProcNumber, ref Dictionary<string, double> Axes)
|
||||
{
|
||||
throw new Nc_Exception("CMS-Core-Error: Function not allowed for this type of NC");
|
||||
Axes.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ namespace CMS_CORE.Siemens
|
||||
//Get a dictionary with the Distance To Go of the axes in Process
|
||||
public override void AXES_RDistanceToGo(ushort ProcNumber, ref Dictionary<string, double> Axes)
|
||||
{
|
||||
throw new Nc_Exception("CMS-Core-Error: Function not allowed for this type of NC");
|
||||
Axes.Clear();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user