pulizia codice: eliminato commenti inutili tipo #if false residui
This commit is contained in:
@@ -125,11 +125,6 @@ namespace MTC_Adapter
|
||||
vettPath[PtData.PathSel].mPathType.Value = PtData.PathType;
|
||||
vettPath[PtData.PathSel].mPathPartId.Value = PtData.PartId;
|
||||
vettPath[PtData.PathSel].mPathPartCount.Value = PtData.pzTot;
|
||||
#if false
|
||||
vettPath[PtData.PathSel].mPathCodM.Value = PtData.co;
|
||||
vettPath[PtData.PathSel].mPathCodS.Value = PtData.PathType;
|
||||
vettPath[PtData.PathSel].mPathCodT.Value = PtData.PathType;
|
||||
#endif
|
||||
vettPath[PtData.PathSel].mPathRunMode.Value = PtData.RunMode;
|
||||
vettPath[PtData.PathSel].mPathExeMode.Value = PtData.ExeMode;
|
||||
vettPath[PtData.PathSel].mPathCurrProg.Value = PtData.ProgramName;
|
||||
|
||||
@@ -1294,14 +1294,7 @@ namespace MTC_Adapter
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref unOpSpeedMem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
|
||||
// NON VA: RICHIEDE OPZIONE... The extended driver/library function is necessary.
|
||||
#if false
|
||||
// recupero vettore load spindle...
|
||||
inizio = DateTime.Now;
|
||||
CMSCncLib.Focas1.ODBSPN spindleVect = FANUC_ref.getSpindleLoad();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-SpindleLoad", DateTime.Now.Subtract(inizio).Ticks);
|
||||
#endif
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
int numUnOp = currAdpConf.nUnOp;
|
||||
|
||||
@@ -28,26 +28,6 @@ namespace MTC_Adapter
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Get bit from byte
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="bitNum"></param>
|
||||
/// <returns></returns>
|
||||
public static bool getBit<T>(this System.Enum type, int bitNum)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (((Byte)(object)type & (1 << bitNum - 1)) != 0);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// checks if the value is only the provided type
|
||||
|
||||
@@ -544,11 +544,6 @@ namespace MTC_Adapter
|
||||
advProgBar();
|
||||
if (agObj.connectionOk)
|
||||
{
|
||||
#if false
|
||||
// eseguo eventuali simulazioni x dati/flags SE RICHIESTO
|
||||
simulateData();
|
||||
#endif
|
||||
|
||||
// check esecuzione FastTask
|
||||
checkFastTask();
|
||||
|
||||
@@ -704,12 +699,6 @@ namespace MTC_Adapter
|
||||
|
||||
private void message_Leave(object sender, EventArgs e)
|
||||
{
|
||||
#if false
|
||||
agObj.mMessage.Code = messageCode.Text;
|
||||
agObj.mMessage.Value = messageText.Text;
|
||||
agObj.mMessage.ForceChanged();
|
||||
agObj.mAdapter.SendChanged();
|
||||
#endif
|
||||
}
|
||||
|
||||
// apro eseguibile dump
|
||||
@@ -1540,10 +1529,6 @@ namespace MTC_Adapter
|
||||
|
||||
private void xPosition_Scroll(object sender, ScrollEventArgs e)
|
||||
{
|
||||
#if false
|
||||
agObj.mPosition.Value = xPosition.Value;
|
||||
agObj.mAdapter.SendChanged();
|
||||
#endif
|
||||
|
||||
AxPositionValue.Text = AxPosition.Value.ToString();
|
||||
}
|
||||
@@ -1555,10 +1540,6 @@ namespace MTC_Adapter
|
||||
|
||||
private void cSpeed_Scroll(object sender, ScrollEventArgs e)
|
||||
{
|
||||
#if false
|
||||
agObj.mSpeed.Value = cSpeed.Value;
|
||||
agObj.mAdapter.SendChanged();
|
||||
#endif
|
||||
AxFeedOverValue.Text = AxFeedOver.Value.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@ IOT_AreaAddressByte=IOT.BYTE
|
||||
IOT_AreaAddressWord=IOT.WORD
|
||||
IOT_AreaAddressDWord=IOT.DWORD
|
||||
IOT_AreaAddressStringA=IOT.ProgramNameAreaA
|
||||
IOT_AreaAddressStringB=IOT.ProgramNameAreaB
|
||||
IOT_AreaAddressStringC=IOT.ProgramNameAreaC
|
||||
IOT_AreaAddressStringD=IOT.ProgramNameAreaD
|
||||
|
||||
[XILOG]
|
||||
Enable=1
|
||||
|
||||
@@ -161,17 +161,6 @@ namespace MTC_Adapter
|
||||
byte mask = (byte)(bitVal << bitInByteIndex);
|
||||
// imposto!
|
||||
answ[byteIndex] |= mask;
|
||||
#if false
|
||||
byte mask = (byte)(1 << bitInByteIndex);
|
||||
bool isSet = (bytes[byteIndex] & mask) != 0;
|
||||
// set to 1
|
||||
bytes[byteIndex] |= mask;
|
||||
// Set to zero
|
||||
bytes[byteIndex] &= ~mask;
|
||||
// Toggle
|
||||
bytes[byteIndex] ^= mask;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
|
||||
@@ -42,12 +42,6 @@ namespace SCMCncLib
|
||||
private UInt16 IOT_WordAreaByteSize;
|
||||
private UInt16 IOT_DWordAreaByteSize;
|
||||
private UInt16 IOT_String_AreaByteSize;
|
||||
#if false
|
||||
private UInt16 IOT_StringA_AreaByteSize;
|
||||
private UInt16 IOT_StringB_AreaByteSize;
|
||||
private UInt16 IOT_StringC_AreaByteSize;
|
||||
private UInt16 IOT_StringD_AreaByteSize;
|
||||
#endif
|
||||
|
||||
|
||||
private string SysLink = "";
|
||||
@@ -158,40 +152,6 @@ namespace SCMCncLib
|
||||
/// memorie a 1 byte (8 bit) x area IOT.String (singoli caratteri...)
|
||||
/// </summary>
|
||||
public Byte[,] PLC_MemoryAreaIOT_String;
|
||||
#if false
|
||||
/// <summary>
|
||||
/// memorie TEMP x area IOT.StringA
|
||||
/// </summary>
|
||||
public UInt32[] PLC_MemoryAreaIOT_StringA_tmp;
|
||||
/// <summary>
|
||||
/// memorie a 1 byte (8 bit) x area IOT.StringA (singoli caratteri...)
|
||||
/// </summary>
|
||||
public Byte[] PLC_MemoryAreaIOT_StringA;
|
||||
/// <summary>
|
||||
/// memorie TEMP x area IOT.StringB
|
||||
/// </summary>
|
||||
public UInt32[] PLC_MemoryAreaIOT_StringB_tmp;
|
||||
/// <summary>
|
||||
/// memorie a 1 byte (8 bit) x area IOT.StringB (singoli caratteri...)
|
||||
/// </summary>
|
||||
public Byte[] PLC_MemoryAreaIOT_StringB;
|
||||
/// <summary>
|
||||
/// memorie TEMP x area IOT.StringC
|
||||
/// </summary>
|
||||
public UInt32[] PLC_MemoryAreaIOT_StringC_tmp;
|
||||
/// <summary>
|
||||
/// memorie a 1 byte (8 bit) x area IOT.StringC (singoli caratteri...)
|
||||
/// </summary>
|
||||
public Byte[] PLC_MemoryAreaIOT_StringC;
|
||||
/// <summary>
|
||||
/// memorie TEMP x area IOT.StringD
|
||||
/// </summary>
|
||||
public UInt32[] PLC_MemoryAreaIOT_StringD_tmp;
|
||||
/// <summary>
|
||||
/// memorie a 1 byte (8 bit) x area IOT.StringD (singoli caratteri...)
|
||||
/// </summary>
|
||||
public Byte[] PLC_MemoryAreaIOT_StringD;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -284,13 +244,6 @@ namespace SCMCncLib
|
||||
IOT_WordAreaByteSize = Convert.ToUInt16(IAS_Word);
|
||||
IOT_DWordAreaByteSize = Convert.ToUInt16(IAS_DWord);
|
||||
IOT_String_AreaByteSize = Convert.ToUInt16(IAS_String);
|
||||
#if false
|
||||
IOT_StringA_AreaByteSize = Convert.ToUInt16(IAS_String);
|
||||
IOT_StringB_AreaByteSize = Convert.ToUInt16(IAS_String);
|
||||
IOT_StringC_AreaByteSize = Convert.ToUInt16(IAS_String);
|
||||
IOT_StringD_AreaByteSize = Convert.ToUInt16(IAS_String);
|
||||
#endif
|
||||
|
||||
|
||||
CommandsAddressName = fIni.ReadString("NC", "CommandsAddress", "SIMREAD[0]");
|
||||
EOKAreaAddressName = fIni.ReadString("NC", "EOKAreaAddress", "EOK");
|
||||
@@ -303,10 +256,10 @@ namespace SCMCncLib
|
||||
IOT_ByteAreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressByte", "IOT.BYTE");
|
||||
IOT_WordAreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressWord", "IOT.WORD");
|
||||
IOT_DWordAreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressDWord", "IOT.DWORD");
|
||||
IOT_StringA_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressString", "IOT.ProgramNameAreaA");
|
||||
IOT_StringB_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressString", "IOT.ProgramNameAreaB");
|
||||
IOT_StringC_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressString", "IOT.ProgramNameAreaC");
|
||||
IOT_StringD_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressString", "IOT.ProgramNameAreaD");
|
||||
IOT_StringA_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressStringA", "IOT.ProgramNameAreaA");
|
||||
IOT_StringB_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressStringB", "IOT.ProgramNameAreaB");
|
||||
IOT_StringC_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressStringC", "IOT.ProgramNameAreaC");
|
||||
IOT_StringD_AreaAddressName = fIni.ReadString("NC", "IOT_AreaAddressStringD", "IOT.ProgramNameAreaD");
|
||||
|
||||
/**************************************************
|
||||
* Creazione buffers letture memoria
|
||||
@@ -337,18 +290,8 @@ namespace SCMCncLib
|
||||
PLC_MemoryAreaIOT_Word = new UInt16[IOT_WordAreaByteSize];
|
||||
PLC_MemoryAreaIOT_DWord = new UInt32[IOT_DWordAreaByteSize];
|
||||
PLC_MemoryAreaIOT_String_tmp = new UInt32[(int)Math.Ceiling((decimal)IOT_String_AreaByteSize / 4)];
|
||||
PLC_MemoryAreaIOT_String_row = new Byte[IOT_String_AreaByteSize * 4]; // HARD CODED 4 aree in riga...
|
||||
PLC_MemoryAreaIOT_String = new Byte[4, IOT_String_AreaByteSize]; // HARD CODED 4 aree...
|
||||
#if false
|
||||
PLC_MemoryAreaIOT_StringA_tmp = new UInt32[(int)Math.Ceiling((decimal)IOT_StringA_AreaByteSize / 4)];
|
||||
PLC_MemoryAreaIOT_StringA = new Byte[IOT_StringA_AreaByteSize];
|
||||
PLC_MemoryAreaIOT_StringB_tmp = new UInt32[(int)Math.Ceiling((decimal)IOT_StringB_AreaByteSize / 4)];
|
||||
PLC_MemoryAreaIOT_StringB = new Byte[IOT_StringB_AreaByteSize];
|
||||
PLC_MemoryAreaIOT_StringC_tmp = new UInt32[(int)Math.Ceiling((decimal)IOT_StringC_AreaByteSize / 4)];
|
||||
PLC_MemoryAreaIOT_StringC = new Byte[IOT_StringC_AreaByteSize];
|
||||
PLC_MemoryAreaIOT_StringD_tmp = new UInt32[(int)Math.Ceiling((decimal)IOT_StringD_AreaByteSize / 4)];
|
||||
PLC_MemoryAreaIOT_StringD = new Byte[IOT_StringD_AreaByteSize];
|
||||
#endif
|
||||
PLC_MemoryAreaIOT_String_row = new Byte[IOT_String_AreaByteSize * 4]; // HARD CODED 4 aree consecutive in riga...
|
||||
PLC_MemoryAreaIOT_String = new Byte[4, IOT_String_AreaByteSize]; // HARD CODED 4 aree su vettore di 4 righe...
|
||||
|
||||
if (!Connect())
|
||||
Disconnect();
|
||||
|
||||
Reference in New Issue
Block a user