Update metodo calcolo durata chiamate + conf dimensione area G
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
<!--conf x testing FANUC-->
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
<add key="MemAreaReadAll" value="false"/>
|
||||
<add key="byteAreaG" value="48"/>
|
||||
</appSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
|
||||
+21
-16
@@ -21,7 +21,7 @@ namespace IOB_WIN
|
||||
/// </summary>
|
||||
protected Int32 lastCount;
|
||||
protected byte[] MemBlockF = new byte[2];
|
||||
protected byte[] MemBlockG = new byte[48]; // provo ad allungare vediamo che recupera...
|
||||
protected byte[] MemBlockG = new byte[utils.CRI("byteAreaG")]; // provo ad allungare vediamo che recupera...
|
||||
protected byte[] MemBlockF_pre = new byte[2];
|
||||
/// <summary>
|
||||
/// wrapper chiamata lettura/scrittura SINGOLO BYTE...
|
||||
@@ -226,46 +226,54 @@ namespace IOB_WIN
|
||||
{
|
||||
// Red: Y8.4 | Yellow: Y8.5 | Green Y8.6 | WrkZone Y8.7 | All DoorsClosed: Y10.5
|
||||
int memIndex = 8;
|
||||
inizio = DateTime.Now;
|
||||
#if false
|
||||
inizio = DateTime.Now;
|
||||
#endif
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.Y, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
#if false
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
#endif
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, 0, RawInput, 0, 4);
|
||||
// ora mi leggo 2 byte in area X... HARD CODED, rendere parametrico...
|
||||
MemBlock = new byte[2];
|
||||
// GESTIONE memoria endcycle
|
||||
// la variabile X7.0 (da 1 a 0) oppure la X7.1 (da 0 a 1) indica il CONTAPEZZI --> copio 2 byte!
|
||||
inizio = DateTime.Now;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.X, 6, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-X", MemBlockF.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-X", MemBlockF.Length), stopwatch.ElapsedTicks);
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, 0, RawInput, 4, 2);
|
||||
// log
|
||||
if (verboseLog) lg.Info(string.Format("RawInput: {0}", utils.binaryForm((int)RawInput[0])));
|
||||
stopwatch.Stop();
|
||||
}
|
||||
else if (currIobConf.vendor == "CMZ" && currIobConf.model == "TA20")// caso CMZ
|
||||
{
|
||||
MemBlock = new byte[16];
|
||||
// Red: Y3.7 | Yellow: Y3.6 | Green Y3.5 | All DoorsClosed: Y4.0 (X5.1) | ..........WrkZone Y8.7
|
||||
int memIndex = 3;
|
||||
inizio = DateTime.Now;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.Y, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, 0, RawInput, 0, 4);
|
||||
#if false
|
||||
// ora mi leggo 2 byte in area X... HARD CODED, rendere parametrico...
|
||||
MemBlock = new byte[2];
|
||||
// GESTIONE memoria PORTA CHIUSA (X5.1 = porta chiusa, X5.0 = porta aperta) --> copio 2 byte!
|
||||
inizio = DateTime.Now;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.X, 5, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-X", MemBlockF.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-X", MemBlockF.Length), stopwatch.ElapsedTicks);
|
||||
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, 0, RawInput, 4, 2);
|
||||
#endif
|
||||
// log
|
||||
if (verboseLog) lg.Info(string.Format("RawInput: {0}", utils.binaryForm((int)RawInput[0])));
|
||||
stopwatch.Stop();
|
||||
}
|
||||
// salvo il solo BYTE dell'input decifrando il semaforo...
|
||||
decodeToBitmap();
|
||||
@@ -501,16 +509,14 @@ namespace IOB_WIN
|
||||
{
|
||||
try
|
||||
{
|
||||
inizio = DateTime.Now;
|
||||
stopwatch.Restart();
|
||||
// leggo tutto da 0 a 43...
|
||||
int memIndex = 0;
|
||||
// controllo modalità lettura memoria
|
||||
if (utils.CRB("MemAreaReadAll"))
|
||||
{
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlockG);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlockG.Length), stopwatch.ElapsedTicks);
|
||||
//if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlockG.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -520,24 +526,23 @@ namespace IOB_WIN
|
||||
memIndex = 8;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, memIndex, MemBlockG, memIndex, 1);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
|
||||
memIndex = 24;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, memIndex, MemBlockG, memIndex, 1);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
|
||||
memIndex = 40;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, memIndex, MemBlockG, memIndex, 1);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
//if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G-AREA", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
stopwatch.Stop();
|
||||
// verifico modo con valore corrente, se cambia aggiorno...
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=216']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=217']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.17.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.17.${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