completata revisione indice canali 1/2 (corrispondono nei segnali...)
This commit is contained in:
@@ -2630,7 +2630,7 @@ namespace MTC_Adapter
|
||||
// converto! e aggiungo allarmi sollevati al corretto controller allarmi...
|
||||
if (STRB_DW3.HasFlag((StFlag32)Math.Pow(2, i)))
|
||||
{
|
||||
SubMode += string.Format(" [P{0:00}_{1}]", idxPath, elencoSubMode[i.ToString()]);
|
||||
SubMode += string.Format(" [P{0:00}_{1}]", idxPath + 1, elencoSubMode[i.ToString()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2721,7 +2721,7 @@ namespace MTC_Adapter
|
||||
// converto! e aggiungo allarmi sollevati al corretto controller allarmi...
|
||||
if (STRB_DW4.HasFlag((StFlag32)Math.Pow(2, i)))
|
||||
{
|
||||
SubMode += string.Format(" [P{0:00}_{1}]", idxPath, elencoSubMode[i.ToString()]);
|
||||
SubMode += string.Format(" [P{0:00}_{1}]", idxPath + 1, elencoSubMode[i.ToString()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2838,13 +2838,13 @@ namespace MTC_Adapter
|
||||
// AREA strobe USER ACTION
|
||||
// chiamato Start...
|
||||
bitNum = 4;
|
||||
gestStrobeUserAction(bitNum, ref currACK_DW, ref UserAction, string.Format(" (P{0:00} START) ", idxPath));
|
||||
gestStrobeUserAction(bitNum, ref currACK_DW, ref UserAction, string.Format(" (P{0:00} START) ", idxPath + 1));
|
||||
// chiamato Stop...
|
||||
bitNum = 5;
|
||||
gestStrobeUserAction(bitNum, ref currACK_DW, ref UserAction, string.Format(" (P{0:00} STOP) ", idxPath));
|
||||
gestStrobeUserAction(bitNum, ref currACK_DW, ref UserAction, string.Format(" (P{0:00} STOP) ", idxPath + 1));
|
||||
// chiamato Reset...
|
||||
bitNum = 6;
|
||||
gestStrobeUserAction(bitNum, ref currACK_DW, ref UserAction, string.Format(" (P{0:00} RESET) ", idxPath));
|
||||
gestStrobeUserAction(bitNum, ref currACK_DW, ref UserAction, string.Format(" (P{0:00} RESET) ", idxPath + 1));
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
@@ -442,7 +442,7 @@ namespace MTC_Adapter
|
||||
if (maintData.Length > 0)
|
||||
{
|
||||
// recupero i dati di manutenzione dall'area di memoria IN BLOCCO
|
||||
int memIndex = 822;
|
||||
int memIndex = 524;
|
||||
uint[] tabDatiMtz = new uint[maintData.Length];
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_DWord(R, baseMemDb, memIndex, ref tabDatiMtz);
|
||||
@@ -453,24 +453,6 @@ namespace MTC_Adapter
|
||||
checkSavePersDataLayer();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gestione lettura dati analogici
|
||||
/// </summary>
|
||||
private void getAnalogDataFromPlc()
|
||||
{
|
||||
if (analogData.Length > 0)
|
||||
{
|
||||
// recupero i dati di manutenzione dall'area di memoria IN BLOCCO
|
||||
int memIndex = 1350;
|
||||
uint[] tabDatiAnalog = new uint[analogData.Length];
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_DWord(R, baseMemDb, memIndex, ref tabDatiAnalog);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalog.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processAnalogData(tabDatiAnalog, analogData);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gestione lettura dati status da PLC
|
||||
/// </summary>
|
||||
@@ -479,7 +461,7 @@ namespace MTC_Adapter
|
||||
if (statusData.Length > 0)
|
||||
{
|
||||
// recupero i dati di manutenzione dall'area di memoria IN BLOCCO
|
||||
int memIndex = 1334;
|
||||
int memIndex = 1036;
|
||||
int numByte = 1 + (statusData.Length / 8);
|
||||
byte[] tabDatiStatus = new byte[numByte];
|
||||
inizio = DateTime.Now;
|
||||
@@ -490,6 +472,23 @@ namespace MTC_Adapter
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gestione lettura dati analogici
|
||||
/// </summary>
|
||||
private void getAnalogDataFromPlc()
|
||||
{
|
||||
if (analogData.Length > 0)
|
||||
{
|
||||
// recupero i dati di manutenzione dall'area di memoria IN BLOCCO
|
||||
int memIndex = 1052;
|
||||
uint[] tabDatiAnalog = new uint[analogData.Length];
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_DWord(R, baseMemDb, memIndex, ref tabDatiAnalog);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalog.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processAnalogData(tabDatiAnalog, analogData);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Leggo dati globali comuni (x path, assi...)
|
||||
/// </summary>
|
||||
public override void getGlobalData()
|
||||
@@ -646,7 +645,7 @@ namespace MTC_Adapter
|
||||
public override void getUnOp()
|
||||
{
|
||||
// leggo in blocco tutte le speed da memoria...
|
||||
int memIndex = 3140;
|
||||
int memIndex = 140;
|
||||
// buffer memoria 60 byte... speed (16bit 2 * 20) + load (8bit 1 * 20) visto che sono 20 teste max
|
||||
byte[] unOpSpeedMem = new byte[60];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user