implementato contapezzi 1:1
This commit is contained in:
+1
-3
@@ -67,9 +67,7 @@
|
||||
<add key="verboseLogTOut" value="30" />
|
||||
<!--conf x testing FANUC-->
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
<add key="AreaG_Size" value="48"/>
|
||||
<add key="AreaX_Size" value="16"/>
|
||||
<add key="AreaY_Size" value="8"/>
|
||||
<add key="pzCountDelay" value="1000"/>
|
||||
</appSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
|
||||
+29
-10
@@ -33,6 +33,14 @@ namespace IOB_WIN
|
||||
/// </summary>
|
||||
protected byte[] MemBlockY = new byte[2];
|
||||
/// <summary>
|
||||
/// Ultimo invio contapezzi (x invio delayed)
|
||||
/// </summary>
|
||||
protected DateTime lastPzCountSend;
|
||||
/// <summary>
|
||||
/// Ritardo minimo x invio contapezzi
|
||||
/// </summary>
|
||||
protected int pzCountDelay;
|
||||
/// <summary>
|
||||
/// LookUpTable di decodifica da CNC a segnali tipo bitmap MAPO
|
||||
/// </summary>
|
||||
Dictionary<string, string> signLUT = new Dictionary<string, string>();
|
||||
@@ -99,9 +107,12 @@ namespace IOB_WIN
|
||||
{
|
||||
// i dati RAW principali sono 6 byte...
|
||||
RawInput = new byte[6];
|
||||
// inizializzo correttamente aree memoria secondo CONF - iniFileName
|
||||
|
||||
// leggo file
|
||||
// gestione invio ritardato contapezzi
|
||||
pzCountDelay = utils.CRI("pzCountDelay");
|
||||
lastPzCountSend = DateTime.Now;
|
||||
|
||||
// inizializzo correttamente aree memoria secondo CONF - iniFileName
|
||||
IniFile fIni = new IniFile(IOBConf.iniFileName);
|
||||
// inizializzo aree di memoria correnti...
|
||||
MemBlockG = new byte[fIni.ReadInteger("MEMORY", "AREAG_SIZE", 8)];
|
||||
@@ -291,7 +302,7 @@ namespace IOB_WIN
|
||||
int memIndex = 0;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.Y, memIndex, ref MemBlockY);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlockY.Length), stopwatch.ElapsedTicks);
|
||||
// log
|
||||
if (verboseLog)
|
||||
{
|
||||
@@ -401,7 +412,6 @@ namespace IOB_WIN
|
||||
break;
|
||||
}
|
||||
// controllo se il bit sia attivo...
|
||||
//if ((byte2check & (long)Math.Pow(2, bitNum)) > 0)
|
||||
if ((byte2check & (1 << bitNum)) == (1 << bitNum))
|
||||
{
|
||||
B_input += 1 << i;
|
||||
@@ -409,14 +419,23 @@ namespace IOB_WIN
|
||||
}
|
||||
}
|
||||
|
||||
// verifico se variato contapezzi in 6711...
|
||||
if (lastCount != contapezzi)
|
||||
// verifico se variato contapezzi in 6711... e se passato ritardo minimo...
|
||||
if (lastCount > contapezzi)
|
||||
{
|
||||
// controllo se è passato intervallo minimo pre invio
|
||||
if (lastPzCountSend.AddMilliseconds(pzCountDelay) < DateTime.Now)
|
||||
{
|
||||
// salvo nuovo contapezzi (incremento di 1...)
|
||||
contapezzi++;
|
||||
// salvo in semaforo!
|
||||
B_input += 1 << 2;
|
||||
// registro contapezzi
|
||||
lg.Info(string.Format("Contapezzi FANUC: {0} | Contapezzi interno {1}", lastCount, contapezzi));
|
||||
}
|
||||
}
|
||||
else if (contapezzi > lastCount) // in questo caso resetto
|
||||
{
|
||||
// FARE!!! deve incrementare di 1 il contapezzi e poi mettere un WAIT prima del successivo conteggio... da testare PRIMA di tutto...
|
||||
// salvo nuovo contapezzi
|
||||
contapezzi = lastCount;
|
||||
// salvo in semaforo!
|
||||
B_input += 1 << 2;
|
||||
}
|
||||
|
||||
#if false
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=221']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=222']) {
|
||||
// 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