pulizia varia...

This commit is contained in:
Samuele E. Locatelli
2016-05-09 17:21:04 +02:00
parent 600d86e2fb
commit c3a2a47a67
4 changed files with 38 additions and 42 deletions
Binary file not shown.
+5
View File
@@ -77,6 +77,11 @@ namespace MTC_Sim
}
}
public override void getConfigParam()
{
base.getConfigParam();
}
protected void addSystemAlarm(int numAllarme)
{
+29 -9
View File
@@ -11,9 +11,11 @@ namespace MTC_Sim
{
protected FANUC FANUC_ref;
#if false
protected StatusBitMap CurrStatus;
protected StFlag8 Status8;
protected StFlag32 Status32;
protected StFlag32 Status32;
#endif
/// <summary>
/// estende l'init della classe base...
@@ -42,7 +44,9 @@ namespace MTC_Sim
// hard coded: leggo le 16 word standard dello strobe... R10516--> R10532
FANUC_ref.F_RW_Byte(R, FANUC.MemType.R, 10516, ref Strobes);
}
/// <summary>
/// leggo i byte di ACK...
/// </summary>
public override void getAckStatus()
{
base.getAckStatus();
@@ -351,18 +355,28 @@ namespace MTC_Sim
#endif
}
public override void getConfigParam()
{
base.getConfigParam();
}
public override void getCurrProgramData()
{
// serve?!?
base.getCurrProgramData();
}
public override void getUnOp()
{
base.getUnOp();
}
public override void getPath()
{
base.getPath();
// ciclo sui PATH!!! FARE!!!!
#if false
// byte x lettura memoria... 8byte --> 64 bit!
byte[] status = new byte[8];
// variabili che utilizzerò...
@@ -374,7 +388,8 @@ namespace MTC_Sim
if (!FANUC_ref.Connected) return;
// hard coded: leggo 8 word (byte) dalla memoria 3450--> 3457
FANUC_ref.F_RW_Byte(R, FANUC.MemType.D, 3450, ref status);
FANUC_ref.F_RW_Byte(R, FANUC.MemType.D, 3450, ref status);
#endif
#if false
// imposto RUN mode
@@ -394,11 +409,10 @@ namespace MTC_Sim
vettPath[PtData.PathSel].mPathPosActK.Value = PtData.PathPosAct.k;
#endif
#if false
// HARD CODE: forzo path 1 (indice 0...)
int idxPath = 0;
// IPOTESI DA VERIFICARE!!!
// leggo primo byte, i cui bit indicano run mode (3450.0 --> 3450.7)
RunStatus = (StFlag8)status[0];
@@ -462,7 +476,8 @@ namespace MTC_Sim
break;
default:
break;
}
}
#endif
#if false
// check bit 0... SE è presente
@@ -476,5 +491,10 @@ namespace MTC_Sim
#endif
}
public override void getAxis()
{
base.getAxis();
}
}
}
+4 -33
View File
@@ -923,6 +923,7 @@ namespace MTC_Sim
// parte che eseguo SEMPRE: RECUPERO stato di tutti gli strobe/status e degli ack attualmente noti
getStrobeStatus();
// !!!FARE!!! verifica, forse inutile rileggere ACK...
getAckStatus();
// acquisizione degli status
@@ -947,8 +948,6 @@ namespace MTC_Sim
{
// leggo parametri da config file
getConfigParam();
// bassa freq leggo altri valori...
getProduzione();
///acquisisco dati su programma in esecuzione e dati generali (stato, orologio, power...)
getCurrProgramData();
}
@@ -983,12 +982,7 @@ namespace MTC_Sim
{
}
private void getProduzione()
{
// SE presente recupero dati produzione
checkProd();
}
/// <summary>
/// verifica gli status attivi
@@ -1015,7 +1009,7 @@ namespace MTC_Sim
/// <summary>
/// metodo di recupero dei dati di identificativo macchina - DA CONF!!!
/// </summary>
public void getConfigParam()
public virtual void getConfigParam()
{
}
@@ -1133,30 +1127,7 @@ namespace MTC_Sim
return answ;
}
}
public void checkProd()
{
// non usiamo strobe x produzione...b
#if false
if (utils.IsSetAny(STROBE_PLC, Strobe.PZ_OK | Strobe.PZ_KO))
{
// leggo i valori pezzi OK / KO e li salvo (insieme a tot...)
mPz_Ok.Value = getNumPzOk;
mPz_Ko.Value = getNumPzKo;
mPz_Tot.Value = getNumPzOk + getNumPzKo;
// alzo flag lettura...
if (utils.IsSetAll(STROBE_PLC, Strobe.PZ_OK)) STROBE_ADP = STROBE_ADP | Strobe.PZ_OK;
if (utils.IsSetAll(STROBE_PLC, Strobe.PZ_KO)) STROBE_ADP = STROBE_ADP | Strobe.PZ_KO;
}
else
{
// resetto eventuali flag di lettura...
if (utils.IsSetAll(STROBE_ADP, Strobe.PZ_OK)) STROBE_ADP -= Strobe.PZ_OK;
if (utils.IsSetAll(STROBE_ADP, Strobe.PZ_KO)) STROBE_ADP -= Strobe.PZ_KO;
}
#endif
}
/// <summary>
/// recupera pezzi OK (fare override!)
/// </summary>