Tolta scrittura continua da watchdog su AT2001
This commit is contained in:
Binary file not shown.
+2
-18
@@ -116,7 +116,7 @@ namespace IOB_WIN
|
||||
/// <param name="MemBlock">Blocco memoria come byte[] dove scrivere</param>
|
||||
/// <param name="stringValue">Valore scrivere</param>
|
||||
/// <param name="startPos">Posizione inizio scrittura</param>
|
||||
public void saveIntOnMemBlock(ref byte[] MemBlock, string stringValue, int startPos)//, int totLen)
|
||||
public void saveIntOnMemBlock(ref byte[] MemBlock, string stringValue, int startPos)
|
||||
{
|
||||
if (currProdData.ContainsKey(stringValue))
|
||||
{
|
||||
@@ -143,7 +143,7 @@ namespace IOB_WIN
|
||||
/// <param name="MemBlock">Blocco memoria come byte[] dove scrivere</param>
|
||||
/// <param name="stringValue">Valore scrivere</param>
|
||||
/// <param name="startPos">Posizione inizio scrittura</param>
|
||||
public void saveRealOnMemBlock(ref byte[] MemBlock, string stringValue, int startPos)//, int totLen)
|
||||
public void saveRealOnMemBlock(ref byte[] MemBlock, string stringValue, int startPos)
|
||||
{
|
||||
if (currProdData.ContainsKey(stringValue))
|
||||
{
|
||||
@@ -229,22 +229,6 @@ namespace IOB_WIN
|
||||
/// <returns></returns>
|
||||
public bool S7WriteBB(ref byte[] Value)
|
||||
{
|
||||
#if false
|
||||
bool answ = false;
|
||||
sw.Restart();
|
||||
if (testCncConn())
|
||||
{
|
||||
// decodifico memoria...
|
||||
memAreaSiemens memoria = new memAreaSiemens(parametri.memAddrWrite);
|
||||
int numByte = Value.Length;
|
||||
var errorCode = currPLC.WriteBytes(DataType.DataBlock, memoria.DbNum, memoria.indiceMem, Value);
|
||||
|
||||
answ = true;
|
||||
}
|
||||
sw.Stop();
|
||||
//tslRTime.Text = string.Format("{0}", sw.Elapsed);
|
||||
return answ;
|
||||
#endif
|
||||
return S7WriteBB(ref Value, parametri.memAddrWrite);
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
+33
-71
@@ -73,62 +73,7 @@ namespace IOB_WIN
|
||||
public override void processOverride()
|
||||
{
|
||||
}
|
||||
|
||||
public override void processWhatchDog()
|
||||
{
|
||||
//NON SERVE!!!!
|
||||
#if false
|
||||
// scrivo 1 volta al secondo il contatore incrementale su area apposita
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (adesso.Subtract(lastPLCWatchDog).TotalSeconds > 1)
|
||||
{
|
||||
// incremento
|
||||
counterMes2Plc++;
|
||||
// salvo su DB
|
||||
Dictionary<string, string> task2exe = new Dictionary<string, string>();
|
||||
Dictionary<string, string> taskDone = new Dictionary<string, string>();
|
||||
task2exe.Add("sendWatchDogMes2Plc", counterMes2Plc.ToString());
|
||||
taskDone = executeTasks(task2exe);
|
||||
// salvo watchdog PLC
|
||||
lastPLCWatchDog = adesso;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool taskOk = false;
|
||||
// inizio VUOTO
|
||||
byte[] MemBlock = new byte[parametri.memSizeWrite];
|
||||
|
||||
// !!!FIXME!!! rendere parametrico
|
||||
// SE HO un valore ART scrivo...
|
||||
if (currProdData.ContainsKey("setArt"))
|
||||
{
|
||||
if (currProdData["setArt"] != "")
|
||||
{
|
||||
// imposto i valori...
|
||||
upsertKey("kgParz", "1234");
|
||||
saveIntOnMemBlock(ref MemBlock, "kgParz", 66);
|
||||
upsertKey("set_th", "601");
|
||||
saveIntOnMemBlock(ref MemBlock, "set_th", 72);
|
||||
upsertKey("set_c", "101");
|
||||
saveRealOnMemBlock(ref MemBlock, "set_c", 74);
|
||||
upsertKey("aria_1", "1801");
|
||||
saveIntOnMemBlock(ref MemBlock, "aria_1", 78);
|
||||
upsertKey("aria_2", "1851");
|
||||
saveIntOnMemBlock(ref MemBlock, "aria_2", 80);
|
||||
upsertKey("setMmH20", "9");
|
||||
saveRealOnMemBlock(ref MemBlock, "setMmH20", 82);
|
||||
upsertKey("rpmci", "101");
|
||||
saveIntOnMemBlock(ref MemBlock, "rpmci", 86);
|
||||
}
|
||||
}
|
||||
|
||||
// fare un controllo x forzare update...
|
||||
|
||||
// scrivo comunque!
|
||||
taskOk = S7WriteBB(ref MemBlock);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Processo i task richiesti e li elimino dalla coda 1:1
|
||||
/// </summary>
|
||||
@@ -198,21 +143,38 @@ namespace IOB_WIN
|
||||
saveStringOnMemBlock(ref MemBlock, "setProg", 44, 20, false);
|
||||
|
||||
|
||||
// imposto i valori...
|
||||
upsertKey("kgParz", "1234");
|
||||
saveIntOnMemBlock(ref MemBlock, "kgParz", 66);
|
||||
upsertKey("set_th", "601");
|
||||
saveIntOnMemBlock(ref MemBlock, "set_th", 72);
|
||||
upsertKey("set_c", "101");
|
||||
saveRealOnMemBlock(ref MemBlock, "set_c", 74);
|
||||
upsertKey("aria_1", "1801");
|
||||
saveIntOnMemBlock(ref MemBlock, "aria_1", 78);
|
||||
upsertKey("aria_2", "1851");
|
||||
saveIntOnMemBlock(ref MemBlock, "aria_2", 80);
|
||||
upsertKey("setMmH20", "9");
|
||||
saveRealOnMemBlock(ref MemBlock, "setMmH20", 82);
|
||||
upsertKey("rpmci", "101");
|
||||
saveIntOnMemBlock(ref MemBlock, "rpmci", 86);
|
||||
|
||||
// !!!FIXME!!! rendere parametrico
|
||||
// SE HO un valore ART scrivo...
|
||||
if (currProdData.ContainsKey("setArt"))
|
||||
{
|
||||
if (currProdData["setArt"] != "")
|
||||
{
|
||||
// imposto i valori...
|
||||
upsertKey("kgParz", "1234");
|
||||
saveIntOnMemBlock(ref MemBlock, "kgParz", 66);
|
||||
upsertKey("set_th", "601");
|
||||
saveIntOnMemBlock(ref MemBlock, "set_th", 72);
|
||||
upsertKey("set_c", "101");
|
||||
saveRealOnMemBlock(ref MemBlock, "set_c", 74);
|
||||
upsertKey("aria_1", "1801");
|
||||
saveIntOnMemBlock(ref MemBlock, "aria_1", 78);
|
||||
upsertKey("aria_2", "1851");
|
||||
saveIntOnMemBlock(ref MemBlock, "aria_2", 80);
|
||||
upsertKey("setMmH20", "9");
|
||||
saveRealOnMemBlock(ref MemBlock, "setMmH20", 82);
|
||||
upsertKey("rpmci", "101");
|
||||
saveIntOnMemBlock(ref MemBlock, "rpmci", 86);
|
||||
}
|
||||
}
|
||||
|
||||
// fare un controllo x forzare update...
|
||||
|
||||
// scrivo comunque!
|
||||
taskOk = S7WriteBB(ref MemBlock);
|
||||
|
||||
|
||||
|
||||
|
||||
return taskDone;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=466']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=467']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '2.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '2.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'MAPO-IOB-WIN'
|
||||
|
||||
Reference in New Issue
Block a user