completo gestione dump memoria area Y come D (da testare)
This commit is contained in:
+54
-80
@@ -752,9 +752,9 @@ namespace IOB_WIN
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Dump PERIODICO area D della memoria in directory campionamento
|
||||
/// Dump area D della memoria
|
||||
/// </summary>
|
||||
/// <param name="tipo">tipo di DUMP: START (sovrascrivendo precedente) / SAMPLE (salva in directory tanti campioni indipendenti)</param>
|
||||
/// <param name="tipo">tipo di DUMP: START (sovrascrivendo) / SAMPLE (salva tanti campionamenti)</param>
|
||||
/// <param name="memIndex">area memoria di partenza</param>
|
||||
/// <param name="memSizeByte">dimensione memoria</param>
|
||||
private void dump_MemAreaD(dumpType tipo, int memIndex, int memSizeByte)
|
||||
@@ -777,16 +777,16 @@ namespace IOB_WIN
|
||||
// seconda del tipo di lettura definisco i nomi delle variabili...
|
||||
if (tipo == dumpType.SAMPLE)
|
||||
{
|
||||
nomeFileB = string.Format(@"{0}\SAMPLES\MemDump_D_Byte_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
nomeFileW = string.Format(@"{0}\SAMPLES\MemDump_D_W_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
nomeFileDW = string.Format(@"{0}\SAMPLES\MemDump_D_DW_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
nomeFileB = string.Format(@"{0}\SAMPLES\MemDumpD_Byte_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
nomeFileW = string.Format(@"{0}\SAMPLES\MemDumpD_W_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
nomeFileDW = string.Format(@"{0}\SAMPLES\MemDumpD_DW_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
}
|
||||
else
|
||||
{
|
||||
// salvo in file i dati letti come BYTE
|
||||
nomeFileB = string.Format(@"{0}\MemDump_D_Byte.dat", utils.dataDatDir);
|
||||
nomeFileW = string.Format(@"{0}\MemDump_D_W.dat", utils.dataDatDir);
|
||||
nomeFileDW = string.Format(@"{0}\MemDump_D_DW.dat", utils.dataDatDir);
|
||||
nomeFileB = string.Format(@"{0}\MemDumpD_Byte.dat", utils.dataDatDir);
|
||||
nomeFileW = string.Format(@"{0}\MemDumpD_W.dat", utils.dataDatDir);
|
||||
nomeFileDW = string.Format(@"{0}\MemDumpD_DW.dat", utils.dataDatDir);
|
||||
}
|
||||
|
||||
// salvo in file i dati letti come BYTE
|
||||
@@ -813,93 +813,67 @@ namespace IOB_WIN
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFileDW);
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Dump area D della memoria (sovrascrivo eventuali precedenti)
|
||||
/// </summary>
|
||||
private void dump_MemAreaD()
|
||||
{
|
||||
// faccio chaimate e salvo in file dump...
|
||||
int memIndex = 0;
|
||||
// leggo TUTTI i 9999 byte della memoria D...
|
||||
byte[] MemBlockD = new byte[9999];
|
||||
if (verboseLog) lgInfo("START MemDump AreaD");
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref MemBlockD);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(currIobConf.codIOB, string.Format("R{0}-MemDumpD", MemBlockD.Length), stopwatch.ElapsedTicks);
|
||||
if (verboseLog) lgInfo("END MemDump AreaD");
|
||||
//
|
||||
string nomeFile = "";
|
||||
// salvo in file i dati letti come BYTE
|
||||
nomeFile = string.Format(@"{0}\MemDump_D_Byte.dat", utils.dataDatDir);
|
||||
Dictionary<string, string> mappaValori = new Dictionary<string, string>();
|
||||
for (int i = 0; i < MemBlockD.Length; i++)
|
||||
{
|
||||
mappaValori.Add(i.ToString("0000"), MemBlockD[i].ToString());
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFile);
|
||||
|
||||
// salvo in file i dati letti come DWord (4byte)
|
||||
nomeFile = string.Format(@"{0}\MemDump_D_DW.dat", utils.dataDatDir);
|
||||
mappaValori = new Dictionary<string, string>();
|
||||
for (int i = 0; i < MemBlockD.Length / 4; i++)
|
||||
{
|
||||
mappaValori.Add(i.ToString("0000"), BitConverter.ToUInt32(MemBlockD, i * 4).ToString());
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFile);
|
||||
|
||||
// salvo in file i dati letti come DWord (4byte)
|
||||
nomeFile = string.Format(@"{0}\MemDump_D_W.dat", utils.dataDatDir);
|
||||
mappaValori = new Dictionary<string, string>();
|
||||
for (int i = 0; i < MemBlockD.Length / 2; i++)
|
||||
{
|
||||
mappaValori.Add(i.ToString("0000"), BitConverter.ToUInt16(MemBlockD, i * 2).ToString());
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFile);
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Dump area Y della memoria
|
||||
/// </summary>
|
||||
private void dump_MemAreaY()
|
||||
/// <param name="tipo">tipo di DUMP: START (sovrascrivendo precedente) / SAMPLE (salva in directory tanti campioni indipendenti)</param>
|
||||
/// <param name="memIndex">area memoria di partenza</param>
|
||||
/// <param name="memSizeByte">dimensione memoria</param>
|
||||
private void dump_MemAreaY(dumpType tipo, int memIndex, int memSizeByte)
|
||||
{
|
||||
// faccio chaimate e salvo in file dump...
|
||||
int memIndex = 0;
|
||||
// leggo TUTTI i 9999 byte della memoria Y...
|
||||
byte[] MemBlockY = new byte[10];
|
||||
stopwatch.Restart();
|
||||
if (verboseLog) lgInfo("START MemDump AreaY");
|
||||
FanucMemRW(R, FANUC.MemType.Y, memIndex, ref MemBlockY);
|
||||
if (verboseLog) lgInfo("END MemDump AreaY");
|
||||
if (utils.CRB("recTime")) TimingData.addResult(currIobConf.codIOB, string.Format("R{0}-MemDumpY", MemBlockY.Length), stopwatch.ElapsedTicks);
|
||||
//
|
||||
string nomeFile = "";
|
||||
// salvo in file i dati letti come BYTE
|
||||
nomeFile = string.Format(@"{0}\MemDump_Y_Byte.dat", utils.dataDatDir);
|
||||
DateTime adesso = DateTime.Now;
|
||||
string nomeFileB = "";
|
||||
string nomeFileW = "";
|
||||
string nomeFileDW = "";
|
||||
Dictionary<string, string> mappaValori = new Dictionary<string, string>();
|
||||
// per sicurezza verifico < 9999 byte
|
||||
if (memSizeByte > 9999) memSizeByte = 9999;
|
||||
// leggo TUTTI i (MAX 9999) byte della memoria Y...
|
||||
byte[] MemBlockY = new byte[memSizeByte];
|
||||
if (verboseLog) lgInfo("START MemDump AreaY");
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.Y, memIndex, ref MemBlockY);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(currIobConf.codIOB, string.Format("R{0}-MemDumpY", MemBlockY.Length), stopwatch.ElapsedTicks);
|
||||
if (verboseLog) lgInfo("END MemDump AreaY");
|
||||
|
||||
// seconda del tipo di lettura definisco i nomi delle variabili...
|
||||
if (tipo == dumpType.SAMPLE)
|
||||
{
|
||||
nomeFileB = string.Format(@"{0}\SAMPLES\MemDumpD_Byte_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
nomeFileW = string.Format(@"{0}\SAMPLES\MemDumpY_W_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
nomeFileDW = string.Format(@"{0}\SAMPLES\MemDumpY_DW_{1:yyyyMMdd_HHmmss}.dat", utils.dataDatDir, adesso);
|
||||
}
|
||||
else
|
||||
{
|
||||
// salvo in file i dati letti come BYTE
|
||||
nomeFileB = string.Format(@"{0}\MemDumpY_Byte.dat", utils.dataDatDir);
|
||||
nomeFileW = string.Format(@"{0}\MemDumpY_W.dat", utils.dataDatDir);
|
||||
nomeFileDW = string.Format(@"{0}\MemDumpY_DW.dat", utils.dataDatDir);
|
||||
}
|
||||
|
||||
// salvo in file i dati letti come BYTE
|
||||
mappaValori = new Dictionary<string, string>();
|
||||
for (int i = 0; i < MemBlockY.Length; i++)
|
||||
{
|
||||
mappaValori.Add(i.ToString("0000"), MemBlockY[i].ToString());
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFile);
|
||||
utils.WritePlain(mappaValori, nomeFileB);
|
||||
|
||||
// salvo in file i dati letti come DWord (4byte)
|
||||
nomeFile = string.Format(@"{0}\MemDump_Y_DW.dat", utils.dataDatDir);
|
||||
mappaValori = new Dictionary<string, string>();
|
||||
for (int i = 0; i < MemBlockY.Length / 4; i++)
|
||||
{
|
||||
mappaValori.Add(i.ToString("0000"), BitConverter.ToUInt32(MemBlockY, i * 4).ToString());
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFile);
|
||||
|
||||
// salvo in file i dati letti come DWord (4byte)
|
||||
nomeFile = string.Format(@"{0}\MemDump_Y_W.dat", utils.dataDatDir);
|
||||
// salvo in file i dati letti come Word (2byte)
|
||||
mappaValori = new Dictionary<string, string>();
|
||||
for (int i = 0; i < MemBlockY.Length / 2; i++)
|
||||
{
|
||||
mappaValori.Add(i.ToString("0000"), BitConverter.ToUInt16(MemBlockY, i * 2).ToString());
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFile);
|
||||
utils.WritePlain(mappaValori, nomeFileW);
|
||||
|
||||
// salvo in file i dati letti come DWord (4byte)
|
||||
mappaValori = new Dictionary<string, string>();
|
||||
for (int i = 0; i < MemBlockY.Length / 4; i++)
|
||||
{
|
||||
mappaValori.Add(i.ToString("0000"), BitConverter.ToUInt32(MemBlockY, i * 4).ToString());
|
||||
}
|
||||
utils.WritePlain(mappaValori, nomeFileDW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=246']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=247']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.18.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.18.${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