aggiunta gestione strobe non riconosciuti (bit 7..29)
This commit is contained in:
@@ -12,7 +12,10 @@
|
||||
<DataItem category="SAMPLE" id="POWER" type="WATTAGE"/>
|
||||
<DataItem category="EVENT" id="OperatorId" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="FUNCT_MODE" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="UserAction" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="USER_ACTION" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="TESTING_DATA" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="UNK_STATUS" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="UNK_STROBE" type="MESSAGE"/>
|
||||
<DataItem category="CONDITION" id="CNC" type="SYSTEM"/>
|
||||
<DataItem category="CONDITION" id="PLC" type="LOGIC"/>
|
||||
</DataItems>
|
||||
|
||||
Binary file not shown.
@@ -151,6 +151,7 @@ namespace MTC_Sim
|
||||
// inizializzo userAction
|
||||
string UserAction = "";
|
||||
string TestingData = "";
|
||||
string UnkStrobe = "";
|
||||
// controllo TUTTI i flag: se ce ne sono di alzati DEVO processare...
|
||||
if (STRB_DW1 != StFlag32.NONE)
|
||||
{
|
||||
@@ -197,6 +198,11 @@ namespace MTC_Sim
|
||||
bitNum = 6;
|
||||
gestStrobeUserAction(bitNum, ref retACK_DW1, ref UserAction, "# RESET # ");
|
||||
|
||||
// processo tutti gli strobe x i BIT 7-29 NON gestiti in modo da dare comunque ACK e event...
|
||||
for (int i = 7; i < 30; i++)
|
||||
{
|
||||
gestStrobeUserAction(i, ref retACK_DW1, ref UnkStrobe, string.Format("# STROBE_{0:00} # ", i));
|
||||
}
|
||||
|
||||
// AREA strobe x TEST
|
||||
// INIZIO TEST...
|
||||
@@ -233,6 +239,9 @@ namespace MTC_Sim
|
||||
// INVIO COMUNQUE vettore azioni (0 o +)...
|
||||
mUserAction.Value = UserAction.Trim();
|
||||
|
||||
// Invio comunque strobe non riconosciuti
|
||||
mUnkStrobe.Value = UnkStrobe.Trim();
|
||||
|
||||
// INVIO COMUNQUE stato test...
|
||||
mTestingData.Value = TestingData.Trim();
|
||||
|
||||
@@ -325,6 +334,23 @@ namespace MTC_Sim
|
||||
{
|
||||
// !!!FARE!!! da definire cosa ci sarà e come leggerlo...
|
||||
}
|
||||
/// <summary>
|
||||
/// Gestione strobe UserAction: salva dati e gestione ACK
|
||||
/// </summary>
|
||||
/// <param name="bitNum"></param>
|
||||
/// <param name="retACK_DW1"></param>
|
||||
/// <param name="UserAction"></param>
|
||||
/// <param name="azione"></param>
|
||||
private void gestStrobeUnknown(int bitNum, ref byte[] retACK_DW1, ref string UserAction, string azione)
|
||||
{
|
||||
if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
|
||||
{
|
||||
// salvo evento UserAction in variabile...
|
||||
UserAction += azione;
|
||||
// memorizzo allarme nel vettore ack....
|
||||
retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gestione strobe UserAction: salva dati e gestione ACK
|
||||
|
||||
@@ -690,12 +690,19 @@ namespace MTC_Sim
|
||||
/// <summary>
|
||||
/// Azioni operatore (Start/Stop/reset)
|
||||
/// </summary>
|
||||
public Event mUserAction = new Event("UserAction");
|
||||
public Event mUserAction = new Event("USER_ACTION");
|
||||
/// <summary>
|
||||
/// Testing macchina
|
||||
/// </summary>
|
||||
public Event mTestingData = new Event("TestingData");
|
||||
|
||||
public Event mTestingData = new Event("TESTING_DATA");
|
||||
/// <summary>
|
||||
/// Strobe rilevati ma non qualificati
|
||||
/// </summary>
|
||||
public Event mUnkStrobe = new Event("UNK_STROBE");
|
||||
/// <summary>
|
||||
/// Status rilevati ma non qualificati
|
||||
/// </summary>
|
||||
public Event mUnkStatus = new Event("UNK_STATUS");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -770,6 +777,10 @@ namespace MTC_Sim
|
||||
// testing e autodiagnostica
|
||||
mAdapter.AddDataItem(mTestingData);
|
||||
|
||||
// strobe/status non riconosciuti
|
||||
mAdapter.AddDataItem(mUnkStatus);
|
||||
mAdapter.AddDataItem(mUnkStrobe);
|
||||
|
||||
// Pompe vuoto
|
||||
vettVacPump = new VacuumPomp[adpConf.nVacuumPump];
|
||||
for (int i = 0; i < adpConf.nVacuumPump; i++)
|
||||
|
||||
Reference in New Issue
Block a user