Merge branch 'develop' into IOB-NET
This commit is contained in:
Binary file not shown.
@@ -0,0 +1 @@
|
||||
SESSS0000 CONNECT;
|
||||
@@ -0,0 +1 @@
|
||||
SESSS0000 ERROR 05 00000004 "Warning of first connection: all previous job are lost";
|
||||
@@ -0,0 +1 @@
|
||||
SESSS0000 PROCESSED;
|
||||
@@ -0,0 +1,15 @@
|
||||
MachVendor, "Plastic Metal";
|
||||
MachNbr, "6037";
|
||||
MachDesc, "";
|
||||
ContrType, "";
|
||||
ContrVersion, "";
|
||||
Version, "1.05a July 2000";
|
||||
MaxJobs, 20;
|
||||
MaxReports, ;
|
||||
MaxArchives, ;
|
||||
InjUnitNbr, 2;
|
||||
MaterialNbr, ;
|
||||
CharDef, "850";
|
||||
MaxSessions, 20;
|
||||
ActiveJobs, "GETID" "SESS0001.JOB" "MPW280SP\SESS0001.DAT";
|
||||
ActiveJobs, "GETINFO" "SESS0002.JOB" "MPW280SP\SESS0002.DAT";
|
||||
@@ -0,0 +1,2 @@
|
||||
JOB GETID RESPONSE "SESS0001.LOG";
|
||||
GETID "SESS0001.DAT";
|
||||
@@ -0,0 +1 @@
|
||||
SESS0001 EXECUTE "SESS0001.JOB";
|
||||
@@ -0,0 +1,2 @@
|
||||
JOB ImpostaOrario RESPONSE "SESS0002.LOG";
|
||||
SET SetTimMach {DTNow};
|
||||
@@ -0,0 +1 @@
|
||||
SESS0002 EXECUTE "SESS0002.JOB";
|
||||
@@ -0,0 +1,7 @@
|
||||
JOB Abort1 RESPONSE "SESS0003.LOG";
|
||||
|
||||
//ABORT EVENT Event1;
|
||||
//ABORT ALL REPORTS;
|
||||
//ABORT JOB Job1Name;
|
||||
ABORT ALL JOBS;
|
||||
//ABORT REPORT Report1Name;
|
||||
@@ -0,0 +1 @@
|
||||
SESS0003 EXECUTE "SESS0003.JOB";
|
||||
@@ -0,0 +1,2 @@
|
||||
DATE, TIME, ActStsMach
|
||||
20201007, 21:28:10, 0A000
|
||||
@@ -0,0 +1,11 @@
|
||||
JOB machstat RESPONSE "SESS0004.LOG";
|
||||
|
||||
REPORT status REWRITE "SESS0004.DAT"
|
||||
START IMMEDIATE
|
||||
STOP NEVER
|
||||
CYCLIC TIME 00:00:01
|
||||
SESSIONS 60
|
||||
PARAMETERS
|
||||
DATE, TIME, ActStsMach;
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SESS0004 EXECUTE "SESS0004.JOB";
|
||||
@@ -0,0 +1,2 @@
|
||||
DATE, TIME, ActCntCyc, ActTimCyc, ActTimFill, @OutXhour, SetDescJob
|
||||
20201007, 21:29:52, 5302, 8.61, 0.50, 10058, Nr. 1000987654.01
|
||||
@@ -0,0 +1,25 @@
|
||||
JOB machstat RESPONSE "SESS0005.LOG";
|
||||
|
||||
REPORT status REWRITE "SESS0005.DAT"
|
||||
START IMMEDIATE
|
||||
STOP NEVER
|
||||
CYCLIC TIME 00:00:03
|
||||
SESSIONS 100
|
||||
//PARAMETERS
|
||||
//DATE, TIME, ActCntCyc, ActTimCyc, ActTimFill, @OutXhour, SetDescJob;
|
||||
PARAMETERS
|
||||
DATE, TIME
|
||||
, ActCntCyc, ActTimCyc, ActTimFill
|
||||
, @OutXhour
|
||||
//, SetTmpBrlZnStb[1]
|
||||
//, SetTmpBrlZn[2], SetTmpBrlZnHdev[2], SetTmpBrlZnLdev[2]
|
||||
//, ActTmpBrlZn[1], ActTmpBrlZn[2], ActTmpBrlZn[3]
|
||||
//, SetTmpMldZn[50], SetTmpMldZnStb[50], SetTmpMldZnHdev[50], SetTmpMldZnLdev[50], ActTmpMldZn[50]
|
||||
//, SetTmpMldZn[51], SetTmpMldZnStb[51], SetTmpMldZnHdev[51], SetTmpMldZnLdev[51], ActTmpMldZn[51]
|
||||
//, ActTmpCab, ActTmpMlt
|
||||
//, ActStrCsh, ActStrCsh
|
||||
//, ActSpdPlstMax, ActSpdPlstAve
|
||||
, SetDescJob
|
||||
//, ActCntPrt
|
||||
//, ActTmpOil
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
SESS0005 EXECUTE "SESS0005.JOB";
|
||||
@@ -0,0 +1,15 @@
|
||||
MachVendor, "Plastic Metal";
|
||||
MachNbr, "6037";
|
||||
MachDesc, "";
|
||||
ContrType, "";
|
||||
ContrVersion, "";
|
||||
Version, "1.05a July 2000";
|
||||
MaxJobs, 20;
|
||||
MaxReports, ;
|
||||
MaxArchives, ;
|
||||
InjUnitNbr, 2;
|
||||
MaterialNbr, ;
|
||||
CharDef, "850";
|
||||
MaxSessions, 20;
|
||||
ActiveJobs, "GETID" "MPW280SP\SESS0001.JOB" "MPW280SP\SESS0001.DAT";
|
||||
ActiveJobs, "GETINFO" "MPW280SP\SESS0002.JOB" "MPW280SP\SESS0002.DAT";
|
||||
@@ -0,0 +1,2 @@
|
||||
JOB GETINFO RESPONSE "SESS0002.LOG";
|
||||
GETINFO "SESS0002.DAT";
|
||||
@@ -0,0 +1 @@
|
||||
SESS0002 EXECUTE "SESS0002.JOB";
|
||||
@@ -0,0 +1,19 @@
|
||||
JOB SetID RESPONSE "SESS0005.LOG";
|
||||
//SET SetDescJob " ";
|
||||
//SET SetDescPrt " "
|
||||
//SET SetDescMld " ";
|
||||
//SET SetDescOp " ";
|
||||
|
||||
SET SetDescJob {ODL};
|
||||
SET SetDescPrt {DescrArt};
|
||||
SET SetDescMld {CodArt};
|
||||
SET SetDescOp {CodOpr};
|
||||
|
||||
//SET SetDescJob "Nr. 1000987654.01";
|
||||
//SET SetDescPrt "STICK: 8 componenti SENZA assemblaggio";
|
||||
//SET SetDescMld "Stampo componenti a 8 impronte";
|
||||
//SET SetDescOp "Operatore 01";
|
||||
|
||||
//SET SetCntMld 2;
|
||||
//SET SetCntPrt 10000;
|
||||
//SET SetCntPrtBox 20;
|
||||
@@ -0,0 +1 @@
|
||||
SESS0005 EXECUTE "SESS0005.JOB";
|
||||
Binary file not shown.
+256
-195
@@ -5,6 +5,108 @@ using System.Text;
|
||||
|
||||
namespace IOB_UT
|
||||
{
|
||||
/// <summary>
|
||||
/// Elenco MODI CNC
|
||||
/// </summary>
|
||||
public enum CNC_MODE
|
||||
{
|
||||
/// <summary>
|
||||
/// Non definito
|
||||
/// </summary>
|
||||
ND = 0,
|
||||
|
||||
/// <summary>
|
||||
/// AUTOMATICO
|
||||
/// </summary>
|
||||
AUTO,
|
||||
|
||||
/// <summary>
|
||||
/// EDIT (MEMORY EDIT)
|
||||
/// </summary>
|
||||
EDIT,
|
||||
|
||||
/// <summary>
|
||||
/// MEN (MEMORY OPERATION)
|
||||
/// </summary>
|
||||
MEN,
|
||||
|
||||
/// <summary>
|
||||
/// MDI (MANUAL DATA INPUT)
|
||||
/// </summary>
|
||||
MDI,
|
||||
|
||||
/// <summary>
|
||||
/// HANDLE/INC (MANUAL HANDLE / INCREMENTAL FEED)
|
||||
/// </summary>
|
||||
HANDLE_INC,
|
||||
|
||||
/// <summary>
|
||||
/// HOME
|
||||
/// </summary>
|
||||
HOME,
|
||||
|
||||
/// <summary>
|
||||
/// JOG (MANUAL CONTINUOUS FEED)
|
||||
/// </summary>
|
||||
JOG,
|
||||
|
||||
/// <summary>
|
||||
/// JOG MAN
|
||||
/// </summary>
|
||||
JOG_MAN,
|
||||
|
||||
/// <summary>
|
||||
/// JOG_INC
|
||||
/// </summary>
|
||||
JOG_INC,
|
||||
|
||||
/// <summary>
|
||||
/// PROFILE
|
||||
/// </summary>
|
||||
PROFILE,
|
||||
|
||||
/// <summary>
|
||||
/// SEMI
|
||||
/// </summary>
|
||||
SEMI,
|
||||
|
||||
/// <summary>
|
||||
/// THND (TEACH IN HANDLE)
|
||||
/// </summary>
|
||||
THND,
|
||||
|
||||
/// <summary>
|
||||
/// TJOG (TEACH IN JOG)
|
||||
/// </summary>
|
||||
TJOG,
|
||||
|
||||
/// <summary>
|
||||
/// RMT (DNC OPERATION)
|
||||
/// </summary>
|
||||
RMT,
|
||||
|
||||
/// <summary>
|
||||
/// REF (MANUAL REFERENCE POSITION RETURN)
|
||||
/// </summary>
|
||||
REF
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco STATI CNC OSAI
|
||||
/// </summary>
|
||||
public enum CNC_STATUS_OSAI
|
||||
{
|
||||
IDLE = 1,
|
||||
CYCLE,
|
||||
HODA,
|
||||
RUNH,
|
||||
HRUN,
|
||||
ERRO,
|
||||
WAIT,
|
||||
RESET,
|
||||
EMERG,
|
||||
INPUT
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipologie di DUMP memoria
|
||||
@@ -15,101 +117,13 @@ namespace IOB_UT
|
||||
/// Salvataggio all'avvio aree memoria (con sovrascrittura)
|
||||
/// </summary>
|
||||
STARTUP,
|
||||
|
||||
/// <summary>
|
||||
/// Campionamento periodico
|
||||
/// </summary>
|
||||
SAMPLE
|
||||
}
|
||||
/// <summary>
|
||||
/// Tipologia di adapters ammessi
|
||||
/// </summary>
|
||||
public enum tipoAdapter
|
||||
{
|
||||
/// <summary>
|
||||
/// Adapter SIMULAZIONE
|
||||
/// </summary>
|
||||
SIMULA,
|
||||
/// <summary>
|
||||
/// adapter FANUC
|
||||
/// </summary>
|
||||
FANUC,
|
||||
/// <summary>
|
||||
/// adapter KAWASAKI e-controller
|
||||
/// </summary>
|
||||
KAWASAKI,
|
||||
/// <summary>
|
||||
/// Adapter non specificato
|
||||
/// </summary>
|
||||
ND,
|
||||
/// <summary>
|
||||
/// Adapter MTConnect
|
||||
/// </summary>
|
||||
MTConnect,
|
||||
/// <summary>
|
||||
/// Adapter OMRON
|
||||
/// </summary>
|
||||
OMRON,
|
||||
/// <summary>
|
||||
/// Adapter OSAI CNDEX (Cndex)
|
||||
/// </summary>
|
||||
OSAI_CNDEX,
|
||||
/// <summary>
|
||||
/// Adapter OSAI OPEN (ws)
|
||||
/// </summary>
|
||||
OSAI_OPEN,
|
||||
/// <summary>
|
||||
/// Adapter OSAI VB6
|
||||
/// </summary>
|
||||
OSAI_VB6,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS
|
||||
/// </summary>
|
||||
SIEMENS,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione APROCHIM (filtro liquidi rettifiche)
|
||||
/// </summary>
|
||||
SIEMENS_APROCHIM,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione VIPA @2001
|
||||
/// </summary>
|
||||
SIEMENS_AT2001,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione FAPE (punzonatrici)
|
||||
/// </summary>
|
||||
SIEMENS_FAPE,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione COMUR (dentatrice)
|
||||
/// </summary>
|
||||
SIEMENS_COMUR,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione INGENIA (Valvital, Automazione)
|
||||
/// </summary>
|
||||
SIEMENS_INGENIA,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione LASCO (Valvital, Pressa Bilancere)
|
||||
/// </summary>
|
||||
SIEMENS_LASCO,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione PRESSOIL + CEI (Valvital, Pressa Idraulica)
|
||||
/// </summary>
|
||||
SIEMENS_PRESSOIL_CEI,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione SAET (Valvital, forni / tempra)
|
||||
/// </summary>
|
||||
SIEMENS_SAET,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione SIMEC (Valvital, taglio)
|
||||
/// </summary>
|
||||
SIEMENS_SIMEC,
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione Torri
|
||||
/// </summary>
|
||||
SIEMENS_TORRI,
|
||||
/// <summary>
|
||||
/// Metodi di WPS WebPageScraping (es x compressori Atlas Copco)
|
||||
/// </summary>
|
||||
WPS
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipo di ciclo da processare
|
||||
/// </summary>
|
||||
@@ -119,40 +133,28 @@ namespace IOB_UT
|
||||
/// Very High Frequency (solo x invii...)
|
||||
/// </summary>
|
||||
VHF,
|
||||
|
||||
/// <summary>
|
||||
/// lettura dati ad alta frequenza
|
||||
/// </summary>
|
||||
HF,
|
||||
|
||||
/// <summary>
|
||||
/// lettura dati standard
|
||||
/// </summary>
|
||||
MF,
|
||||
|
||||
/// <summary>
|
||||
/// lettura dati bassa freq
|
||||
/// </summary>
|
||||
LF,
|
||||
|
||||
/// <summary>
|
||||
/// lettura dati bassissima priorità (re-sync stato allarmi)
|
||||
/// </summary>
|
||||
VLF
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// StFlag8: set di 8 bit (1 word) contente semaforo di variabili
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum StFlag8 : int
|
||||
{
|
||||
NONE = 0,
|
||||
B0 = 1 << 0,
|
||||
B1 = 1 << 1,
|
||||
B2 = 1 << 2,
|
||||
B3 = 1 << 3,
|
||||
B4 = 1 << 4,
|
||||
B5 = 1 << 5,
|
||||
B6 = 1 << 6,
|
||||
B7 = 1 << 7
|
||||
}
|
||||
/// <summary>
|
||||
/// StFlag32: set di 32 bit (4 word) contente semaforo di variabili
|
||||
/// </summary>
|
||||
@@ -193,6 +195,150 @@ namespace IOB_UT
|
||||
B30 = 1 << 30,
|
||||
B31 = 1 << 31
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// StFlag8: set di 8 bit (1 word) contente semaforo di variabili
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum StFlag8 : int
|
||||
{
|
||||
NONE = 0,
|
||||
B0 = 1 << 0,
|
||||
B1 = 1 << 1,
|
||||
B2 = 1 << 2,
|
||||
B3 = 1 << 3,
|
||||
B4 = 1 << 4,
|
||||
B5 = 1 << 5,
|
||||
B6 = 1 << 6,
|
||||
B7 = 1 << 7
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia di adapters ammessi
|
||||
/// </summary>
|
||||
public enum tipoAdapter
|
||||
{
|
||||
/// <summary>
|
||||
/// Adapter SIMULAZIONE
|
||||
/// </summary>
|
||||
SIMULA,
|
||||
|
||||
/// <summary>
|
||||
/// adapter FANUC
|
||||
/// </summary>
|
||||
FANUC,
|
||||
|
||||
/// <summary>
|
||||
/// File Based exchange generic adapter
|
||||
/// </summary>
|
||||
FILE_GEN,
|
||||
|
||||
/// <summary>
|
||||
/// File Based exchange Euromap63
|
||||
/// </summary>
|
||||
FILE_EUROM63,
|
||||
|
||||
///// <summary>
|
||||
///// File Based exchange SCM Xylog
|
||||
///// </summary>
|
||||
//FILE_XYLOG,
|
||||
|
||||
/// <summary>
|
||||
/// adapter KAWASAKI e-controller
|
||||
/// </summary>
|
||||
KAWASAKI,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter non specificato
|
||||
/// </summary>
|
||||
ND,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter MTConnect
|
||||
/// </summary>
|
||||
MTConnect,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter OMRON
|
||||
/// </summary>
|
||||
OMRON,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter OSAI CNDEX (Cndex)
|
||||
/// </summary>
|
||||
OSAI_CNDEX,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter OSAI OPEN (ws)
|
||||
/// </summary>
|
||||
OSAI_OPEN,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter OSAI VB6
|
||||
/// </summary>
|
||||
OSAI_VB6,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS
|
||||
/// </summary>
|
||||
SIEMENS,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione APROCHIM (filtro liquidi rettifiche)
|
||||
/// </summary>
|
||||
SIEMENS_APROCHIM,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione VIPA @2001
|
||||
/// </summary>
|
||||
SIEMENS_AT2001,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione FAPE (punzonatrici)
|
||||
/// </summary>
|
||||
SIEMENS_FAPE,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione COMUR (dentatrice)
|
||||
/// </summary>
|
||||
SIEMENS_COMUR,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione INGENIA (Valvital, Automazione)
|
||||
/// </summary>
|
||||
SIEMENS_INGENIA,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione LASCO (Valvital, Pressa Bilancere)
|
||||
/// </summary>
|
||||
SIEMENS_LASCO,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione PRESSOIL + CEI (Valvital, Pressa Idraulica)
|
||||
/// </summary>
|
||||
SIEMENS_PRESSOIL_CEI,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione SAET (Valvital, forni / tempra)
|
||||
/// </summary>
|
||||
SIEMENS_SAET,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione SIMEC (Valvital, taglio)
|
||||
/// </summary>
|
||||
SIEMENS_SIMEC,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter SIEMENS, interfaccia versione Torri
|
||||
/// </summary>
|
||||
SIEMENS_TORRI,
|
||||
|
||||
/// <summary>
|
||||
/// Metodi di WPS WebPageScraping (es x compressori Atlas Copco)
|
||||
/// </summary>
|
||||
WPS
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Enumerazione tipi di semaforo
|
||||
@@ -219,8 +365,9 @@ namespace IOB_UT
|
||||
/// Grigio/Spento
|
||||
/// </summary>
|
||||
SS
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Enumerazione tipi di tipi di URL x invio
|
||||
/// </summary>
|
||||
@@ -230,96 +377,10 @@ namespace IOB_UT
|
||||
/// Salvataggio FluxLog (valori estesi che non provocano calcoli di macchine a stati, eventi...)
|
||||
/// </summary>
|
||||
FLog,
|
||||
|
||||
/// <summary>
|
||||
/// INPUT segnali in ingresso (standard base MAPO)
|
||||
/// </summary>
|
||||
SignIN
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco STATI CNC OSAI
|
||||
/// </summary>
|
||||
public enum CNC_STATUS_OSAI
|
||||
{
|
||||
IDLE = 1,
|
||||
CYCLE,
|
||||
HODA,
|
||||
RUNH,
|
||||
HRUN,
|
||||
ERRO,
|
||||
WAIT,
|
||||
RESET,
|
||||
EMERG,
|
||||
INPUT
|
||||
}
|
||||
/// <summary>
|
||||
/// Elenco MODI CNC
|
||||
/// </summary>
|
||||
public enum CNC_MODE
|
||||
{
|
||||
/// <summary>
|
||||
/// Non definito
|
||||
/// </summary>
|
||||
ND = 0,
|
||||
/// <summary>
|
||||
/// AUTOMATICO
|
||||
/// </summary>
|
||||
AUTO,
|
||||
/// <summary>
|
||||
/// EDIT (MEMORY EDIT)
|
||||
/// </summary>
|
||||
EDIT,
|
||||
/// <summary>
|
||||
/// MEN (MEMORY OPERATION)
|
||||
/// </summary>
|
||||
MEN,
|
||||
/// <summary>
|
||||
/// MDI (MANUAL DATA INPUT)
|
||||
/// </summary>
|
||||
MDI,
|
||||
/// <summary>
|
||||
/// HANDLE/INC (MANUAL HANDLE / INCREMENTAL FEED)
|
||||
/// </summary>
|
||||
HANDLE_INC,
|
||||
/// <summary>
|
||||
/// HOME
|
||||
/// </summary>
|
||||
HOME,
|
||||
/// <summary>
|
||||
/// JOG (MANUAL CONTINUOUS FEED)
|
||||
/// </summary>
|
||||
JOG,
|
||||
/// <summary>
|
||||
/// JOG MAN
|
||||
/// </summary>
|
||||
JOG_MAN,
|
||||
/// <summary>
|
||||
/// JOG_INC
|
||||
/// </summary>
|
||||
JOG_INC,
|
||||
/// <summary>
|
||||
/// PROFILE
|
||||
/// </summary>
|
||||
PROFILE,
|
||||
/// <summary>
|
||||
/// SEMI
|
||||
/// </summary>
|
||||
SEMI,
|
||||
/// <summary>
|
||||
/// THND (TEACH IN HANDLE)
|
||||
/// </summary>
|
||||
THND,
|
||||
/// <summary>
|
||||
/// TJOG (TEACH IN JOG)
|
||||
/// </summary>
|
||||
TJOG,
|
||||
/// <summary>
|
||||
/// RMT (DNC OPERATION)
|
||||
/// </summary>
|
||||
RMT,
|
||||
/// <summary>
|
||||
/// REF (MANUAL REFERENCE POSITION RETURN)
|
||||
/// </summary>
|
||||
REF
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace IOB_UT
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe di helper per metodi Euromap63 tramite File Exchange
|
||||
/// </summary>
|
||||
public class Eurom63
|
||||
{
|
||||
#region Public Enums
|
||||
|
||||
/// <summary>
|
||||
/// Elenco dei livelli di comunicazione attivi
|
||||
/// </summary>
|
||||
public enum ComLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// Comunicazione NON attiva
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// COntrollo comunicazione col PLC
|
||||
/// </summary>
|
||||
IsConnected,
|
||||
|
||||
/// <summary>
|
||||
/// Ricezione info preliminari macchina
|
||||
/// </summary>
|
||||
HasInfo,
|
||||
|
||||
/// <summary>
|
||||
/// Impostato data-ora correnti
|
||||
/// </summary>
|
||||
TimeSet,
|
||||
|
||||
/// <summary>
|
||||
/// Verificato il canale di comunicazione è OK, fatta pulizia con AbortAll, NON ci sono report attivi
|
||||
/// </summary>
|
||||
ChannelOk,
|
||||
|
||||
/// <summary>
|
||||
/// Status data richiesti
|
||||
/// </summary>
|
||||
StatusRequested,
|
||||
|
||||
/// <summary>
|
||||
/// Prod data richiesti
|
||||
/// </summary>
|
||||
ProdRequested
|
||||
}
|
||||
|
||||
public enum FileOpr
|
||||
{
|
||||
Copy = 0,
|
||||
ReplaceAndCopy
|
||||
}
|
||||
|
||||
public enum FileType
|
||||
{
|
||||
NA = 0,
|
||||
Dat,
|
||||
Job,
|
||||
Log,
|
||||
Req,
|
||||
Rsp
|
||||
}
|
||||
|
||||
public enum JobType
|
||||
{
|
||||
NA = 0,
|
||||
AbortAll,
|
||||
GetId,
|
||||
GetInfo,
|
||||
GetParams,
|
||||
GetStatus,
|
||||
GetProduction,
|
||||
IsConnected,
|
||||
SetDateTime,
|
||||
SetParamOdl
|
||||
}
|
||||
|
||||
#endregion Public Enums
|
||||
|
||||
#region Public Classes
|
||||
|
||||
/// <summary>
|
||||
/// Struttura per un file da processare
|
||||
/// </summary>
|
||||
public class FileTask
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public FileOpr OprReq { get; set; } = FileOpr.Copy;
|
||||
public string Path { get; set; } = @"EUR63_JOB\SESS9999.FILE";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
public class ProtoConf
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
public Dictionary<int, Session> ActiveSessions = new Dictionary<int, Session>();
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string BaseDir { get; set; } = @"C:\EUROMAP63\";
|
||||
public List<string> cleanupExt { get; set; } = new List<string>();
|
||||
public List<DynDataItem> DynData { get; set; } = new List<DynDataItem>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generic communication session
|
||||
/// </summary>
|
||||
public class Session
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Session currently active
|
||||
/// </summary>
|
||||
public bool Active { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that must be repeated/restarted when not active
|
||||
/// </summary>
|
||||
public bool Cycle { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Session Description
|
||||
/// </summary>
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Elenco dei file da processare
|
||||
/// </summary>
|
||||
public List<FileTask> FileList { get; set; } = new List<FileTask>();
|
||||
|
||||
/// <summary>
|
||||
/// Numero MAX di esecuzioni da mantenere in HIST prima di eliminare i + vecchi (fare folder HIST\SESSnnnn)
|
||||
/// </summary>
|
||||
public int Max2Keep { get; set; } = 50;
|
||||
|
||||
/// <summary>
|
||||
/// Session check passed (= not to repeat)
|
||||
/// </summary>
|
||||
public bool Passed { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// TAG per risposta con errori
|
||||
/// </summary>
|
||||
public string RespKo { get; set; } = "ERROR";
|
||||
|
||||
/// <summary>
|
||||
/// Tag per risposta positiva
|
||||
/// </summary>
|
||||
public string RespOk { get; set; } = "PROCESSED";
|
||||
|
||||
/// <summary>
|
||||
/// Seconds before do a new retry (default = 0 --> no veto)
|
||||
/// </summary>
|
||||
public double RetrySec { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Veto for retry operation
|
||||
/// </summary>
|
||||
public DateTime RetryVeto { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Session Name
|
||||
/// </summary>
|
||||
public string SessionName { get; set; } = "SESS0000";
|
||||
|
||||
/// <summary>
|
||||
/// Start of communication
|
||||
/// </summary>
|
||||
public DateTime SessionStarted { get; set; } = DateTime.Now.AddMinutes(-5);
|
||||
|
||||
/// <summary>
|
||||
/// Session type
|
||||
/// </summary>
|
||||
public JobType SessionType { get; set; } = JobType.NA;
|
||||
|
||||
/// <summary>
|
||||
/// Estimated Validity limit
|
||||
/// </summary>
|
||||
public DateTime SessionValidUntil { get; set; } = DateTime.Now.AddMinutes(-1);
|
||||
|
||||
/// <summary>
|
||||
/// Set Step Order (=execution priority, 1...n)
|
||||
/// </summary>
|
||||
public int StepOrder { get; set; } = 999;
|
||||
|
||||
/// <summary>
|
||||
/// Standard session validity time
|
||||
/// </summary>
|
||||
public double ValidityMinutes { get; set; } = 1;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
}
|
||||
}
|
||||
@@ -99,6 +99,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Eurom63.cs" />
|
||||
<Compile Include="TCMan.cs" />
|
||||
<Compile Include="ToMapo.cs" />
|
||||
<Compile Include="baseUtils.cs">
|
||||
|
||||
+1547
-1539
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,66 @@
|
||||
;Configurazione IOB-WIN
|
||||
[IOB]
|
||||
;MAcchina con protocollo Euromap63 PlasticMetal NPM
|
||||
CNCTYPE=FILE_EUROM63
|
||||
PING_MS_TIMEOUT=500
|
||||
|
||||
[MACHINE]
|
||||
VENDOR=PlasticMetal
|
||||
MODEL=MPW280SP
|
||||
|
||||
[CNC]
|
||||
;IP=192.168.1.55
|
||||
IP=10.74.82.253
|
||||
;IP=10.82.74.1
|
||||
|
||||
[SERVER]
|
||||
MPIP=http://10.74.82.218
|
||||
;MPIP=http://192.168.1.150
|
||||
MPURL=/MP/IO
|
||||
CMDBASE=/IOB/input/
|
||||
CMDFLOG=/IOB/flog/
|
||||
CMDALIVE=/IOB
|
||||
CMDENABLED=/IOB/enabled/
|
||||
CMDADV1=?valore=
|
||||
CMDREBO=/sendReboot.aspx?idxMacchina=
|
||||
|
||||
[MEMORY]
|
||||
ADDR_READ=DB0.DBB0
|
||||
ADDR_WRITE=DB0.DBB0
|
||||
SIZE_READ=1
|
||||
SIZE_WRITE=0
|
||||
;BIT0=CONN
|
||||
BIT1=DB0.DBB1
|
||||
;BIT2=PZCOUNT.STD.DB700.DBW22
|
||||
BIT3=DB0.DBB3
|
||||
BIT4=DB0.DBB4
|
||||
|
||||
|
||||
[BLINK]
|
||||
;MAX_COUNTER_BLINK = 30
|
||||
MAX_COUNTER_BLINK = 15
|
||||
;bit0 = 0
|
||||
;bit1 = 0
|
||||
;bit2 = 1
|
||||
;bit3 = 1
|
||||
;bit4 = 1
|
||||
;bit5 = 0
|
||||
;bit6 = 0
|
||||
;bit7 = 0
|
||||
BLINK_FILT=0
|
||||
;BLINK_FILT=28
|
||||
|
||||
[OPTPAR]
|
||||
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
|
||||
; attenzione memoria sempre base BYTE (1604 DW --> 6416...)
|
||||
;PZCOUNT_MODE=STD.DB550.DBDW0
|
||||
PZCOUNT_MODE=NONE
|
||||
DISABLE_PZCOUNT=TRUE
|
||||
ENABLE_DYN_DATA=TRUE
|
||||
FORCE_DYN_DATA=TRUE
|
||||
; CONF variabili da recuperare in WebPage (stato macchina, contatori, variabili, ...)
|
||||
LUT_CONF=EM63.json
|
||||
timerIntMs=50
|
||||
|
||||
[BRANCH]
|
||||
NAME=master
|
||||
@@ -0,0 +1,185 @@
|
||||
{
|
||||
"BaseDir": "C:\\NPM_E63\\E63\\MPW280SP",
|
||||
"cleanupExt": [
|
||||
"*.dat",
|
||||
"*.job",
|
||||
"*.log",
|
||||
"*.req",
|
||||
"*.rsp"
|
||||
],
|
||||
"DynData": [
|
||||
{
|
||||
"key": "CLOCK_1",
|
||||
"name": "CLOCK_1",
|
||||
"val": "ct4",
|
||||
"unit": "DateTime",
|
||||
"func": "CHANGE",
|
||||
"sPeriod": 10
|
||||
},
|
||||
{
|
||||
"key": "CLOCK_2",
|
||||
"name": "CLOCK_2",
|
||||
"val": "ct4",
|
||||
"unit": "DateTime",
|
||||
"func": "SAMPLE",
|
||||
"sPeriod": 10
|
||||
}
|
||||
],
|
||||
"ActiveSessions": {
|
||||
"0": {
|
||||
"Cycle": false,
|
||||
"Description": "Check Connection Status",
|
||||
"Max2Keep": 10,
|
||||
"RetrySec": 5,
|
||||
"SessionName": "SESS0000",
|
||||
"SessionType": "IsConnected",
|
||||
"StepOrder": 0,
|
||||
"ValidityMinutes": 0.0,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0000.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"1": {
|
||||
"Cycle": false,
|
||||
"Description": "Get ID data",
|
||||
"Max2Keep": 10,
|
||||
"SessionName": "SESS0001",
|
||||
"SessionType": "GetId",
|
||||
"StepOrder": 1,
|
||||
"ValidityMinutes": 0.0,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0001.JOB",
|
||||
"OprReq": "Copy"
|
||||
},
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0001.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"Cycle": false,
|
||||
"Description": "Set DateTime on machine at start",
|
||||
"RetrySec": 10,
|
||||
"SessionName": "SESS0002",
|
||||
"SessionType": "SetDateTime",
|
||||
"ValidityMinutes": 0.0,
|
||||
"Max2Keep": 10,
|
||||
"StepOrder": 2,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0002.JOB",
|
||||
"OprReq": "ReplaceAndCopy"
|
||||
},
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0002.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"Cycle": false,
|
||||
"Description": "Abort All prev requests",
|
||||
"RetrySec": 10,
|
||||
"SessionName": "SESS0003",
|
||||
"SessionType": "AbortAll",
|
||||
"ValidityMinutes": 0.0,
|
||||
"Max2Keep": 10,
|
||||
"StepOrder": 3,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0003.JOB",
|
||||
"OprReq": "Copy"
|
||||
},
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0003.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"Cycle": true,
|
||||
"Description": "Get Machine Status",
|
||||
"RetrySec": 15,
|
||||
"SessionName": "SESS0004",
|
||||
"SessionType": "GetStatus",
|
||||
"ValidityMinutes": 5.0,
|
||||
"Max2Keep": 120,
|
||||
"StepOrder": 4,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0004.JOB",
|
||||
"OprReq": "Copy"
|
||||
},
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0004.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"Cycle": true,
|
||||
"Description": "Get Production",
|
||||
"RetrySec": 15,
|
||||
"SessionName": "SESS0005",
|
||||
"SessionType": "GetProduction",
|
||||
"ValidityMinutes": 5.0,
|
||||
"Max2Keep": 120,
|
||||
"StepOrder": 5,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0005.JOB",
|
||||
"OprReq": "Copy"
|
||||
},
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0005.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"Cycle": false,
|
||||
"Description": "Set Param ODL at Setup",
|
||||
"RetrySec": 5,
|
||||
"SessionName": "SESS0010",
|
||||
"SessionType": "SetParamOdl",
|
||||
"ValidityMinutes": 0.0,
|
||||
"Max2Keep": 10,
|
||||
"StepOrder": 10,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0010.JOB",
|
||||
"OprReq": "ReplaceAndCopy"
|
||||
},
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0010.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"19": {
|
||||
"Cycle": false,
|
||||
"Description": "Get INFO data",
|
||||
"Max2Keep": 10,
|
||||
"RetrySec": 5,
|
||||
"SessionName": "SESS0019",
|
||||
"SessionType": "GetInfo",
|
||||
"StepOrder": 19,
|
||||
"ValidityMinutes": 0.0,
|
||||
"FileList": [
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0019.JOB",
|
||||
"OprReq": "Copy"
|
||||
},
|
||||
{
|
||||
"Path": "DATA\\EUR63_JOB\\SESS0019.REQ",
|
||||
"OprReq": "Copy"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ SIM_WUCD=8000|20
|
||||
; indica gestione e simulazione bit 7 --> emergenza
|
||||
SIM_EMRG=4000|10
|
||||
; indica simulazione delle funzionalità power ON/ OFF
|
||||
SIM_POW_ON_OFF=false
|
||||
SIM_POW_ON_OFF=true
|
||||
T_ON=7
|
||||
T_OFF=22
|
||||
; gestione DynData simulati
|
||||
|
||||
@@ -58,7 +58,7 @@ FORCE_DYN_DATA=TRUE
|
||||
NEW_DYN_DATA=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; indica parametri gestione TcMan
|
||||
|
||||
@@ -58,7 +58,7 @@ FORCE_DYN_DATA=TRUE
|
||||
NEW_DYN_DATA=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; indica parametri gestione TcMan
|
||||
|
||||
@@ -58,7 +58,7 @@ FORCE_DYN_DATA=TRUE
|
||||
NEW_DYN_DATA=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; indica parametri gestione TcMan
|
||||
|
||||
@@ -58,7 +58,7 @@ FORCE_DYN_DATA=TRUE
|
||||
NEW_DYN_DATA=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; indica parametri gestione TcMan
|
||||
|
||||
@@ -58,7 +58,7 @@ FORCE_DYN_DATA=TRUE
|
||||
NEW_DYN_DATA=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; indica parametri gestione TcMan
|
||||
|
||||
@@ -58,7 +58,7 @@ FORCE_DYN_DATA=TRUE
|
||||
NEW_DYN_DATA=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; indica parametri gestione TcMan
|
||||
|
||||
@@ -58,7 +58,7 @@ FORCE_DYN_DATA=TRUE
|
||||
NEW_DYN_DATA=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; indica parametri gestione TcMan
|
||||
|
||||
@@ -41,7 +41,7 @@ PZCOUNT_MODE=BIT
|
||||
ENABLE_PZ_RESET=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; per il simulatore: 50|1 = WAIT 50, DURATION 1 con riferimento al PERIODO base (PER_BASE in ms, default 1 secondo)
|
||||
|
||||
@@ -41,7 +41,7 @@ PZCOUNT_MODE=BIT
|
||||
ENABLE_PZ_RESET=TRUE
|
||||
;gestione invio pezzi in blocco
|
||||
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=5
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
MIN_DURATA_ODL=240
|
||||
; per il simulatore: 50|1 = WAIT 50, DURATION 1 con riferimento al PERIODO base (PER_BASE in ms, default 1 secondo)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SESSS0000 CONNECT;
|
||||
@@ -0,0 +1,2 @@
|
||||
JOB GETID RESPONSE "SESS0001.LOG";
|
||||
GETID "SESS0001.DAT";
|
||||
@@ -0,0 +1 @@
|
||||
SESS0001 EXECUTE "SESS0001.JOB";
|
||||
@@ -0,0 +1,2 @@
|
||||
JOB ImpostaOrario RESPONSE "SESS0002.LOG";
|
||||
SET SetTimMach {DTNow};
|
||||
@@ -0,0 +1 @@
|
||||
SESS0002 EXECUTE "SESS0002.JOB";
|
||||
@@ -0,0 +1,7 @@
|
||||
JOB Abort1 RESPONSE "SESS0003.LOG";
|
||||
|
||||
//ABORT EVENT Event1;
|
||||
//ABORT ALL REPORTS;
|
||||
//ABORT JOB Job1Name;
|
||||
ABORT ALL JOBS;
|
||||
//ABORT REPORT Report1Name;
|
||||
@@ -0,0 +1 @@
|
||||
SESS0003 EXECUTE "SESS0003.JOB";
|
||||
@@ -0,0 +1,11 @@
|
||||
JOB machstat RESPONSE "SESS0004.LOG";
|
||||
|
||||
REPORT status REWRITE "SESS0004.DAT"
|
||||
START IMMEDIATE
|
||||
STOP NEVER
|
||||
CYCLIC TIME 00:00:01
|
||||
SESSIONS 60
|
||||
PARAMETERS
|
||||
DATE, TIME, ActStsMach;
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SESS0004 EXECUTE "SESS0004.JOB";
|
||||
@@ -0,0 +1,25 @@
|
||||
JOB machstat RESPONSE "SESS0005.LOG";
|
||||
|
||||
REPORT status REWRITE "SESS0005.DAT"
|
||||
START IMMEDIATE
|
||||
STOP NEVER
|
||||
CYCLIC TIME 00:00:03
|
||||
SESSIONS 100
|
||||
//PARAMETERS
|
||||
//DATE, TIME, ActCntCyc, ActTimCyc, ActTimFill, @OutXhour, SetDescJob;
|
||||
PARAMETERS
|
||||
DATE, TIME
|
||||
, ActCntCyc, ActTimCyc, ActTimFill
|
||||
, @OutXhour
|
||||
//, SetTmpBrlZnStb[1]
|
||||
//, SetTmpBrlZn[2], SetTmpBrlZnHdev[2], SetTmpBrlZnLdev[2]
|
||||
//, ActTmpBrlZn[1], ActTmpBrlZn[2], ActTmpBrlZn[3]
|
||||
//, SetTmpMldZn[50], SetTmpMldZnStb[50], SetTmpMldZnHdev[50], SetTmpMldZnLdev[50], ActTmpMldZn[50]
|
||||
//, SetTmpMldZn[51], SetTmpMldZnStb[51], SetTmpMldZnHdev[51], SetTmpMldZnLdev[51], ActTmpMldZn[51]
|
||||
//, ActTmpCab, ActTmpMlt
|
||||
//, ActStrCsh, ActStrCsh
|
||||
//, ActSpdPlstMax, ActSpdPlstAve
|
||||
, SetDescJob
|
||||
//, ActCntPrt
|
||||
//, ActTmpOil
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
SESS0005 EXECUTE "SESS0005.JOB";
|
||||
@@ -0,0 +1,19 @@
|
||||
JOB SetID RESPONSE "SESS0010.LOG";
|
||||
//SET SetDescJob " ";
|
||||
//SET SetDescPrt " "
|
||||
//SET SetDescMld " ";
|
||||
//SET SetDescOp " ";
|
||||
|
||||
SET SetDescJob {ODL};
|
||||
SET SetDescPrt {DescrArt};
|
||||
SET SetDescMld {CodArt};
|
||||
SET SetDescOp {CodOpr};
|
||||
|
||||
//SET SetDescJob "Nr. 1000987654.01";
|
||||
//SET SetDescPrt "STICK: 8 componenti SENZA assemblaggio";
|
||||
//SET SetDescMld "Stampo componenti a 8 impronte";
|
||||
//SET SetDescOp "Operatore 01";
|
||||
|
||||
//SET SetCntMld 2;
|
||||
//SET SetCntPrt 10000;
|
||||
//SET SetCntPrtBox 20;
|
||||
@@ -0,0 +1 @@
|
||||
SESS0010 EXECUTE "SESS0010.JOB";
|
||||
@@ -0,0 +1,2 @@
|
||||
JOB GETINFO RESPONSE "SESS0019.LOG";
|
||||
GETINFO "SESS0019.DAT";
|
||||
@@ -0,0 +1 @@
|
||||
SESS0019 EXECUTE "SESS0019.JOB";
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -148,6 +148,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="IobFileEurom63.cs" />
|
||||
<Compile Include="IobMTC.cs" />
|
||||
<Compile Include="IobOmron.cs" />
|
||||
<Compile Include="IobSiemensAt2001.cs" />
|
||||
@@ -157,6 +158,7 @@
|
||||
<Compile Include="IobSiemensIngenia.cs" />
|
||||
<Compile Include="IobSiemensComur.cs" />
|
||||
<Compile Include="IobSiemensSaet.cs" />
|
||||
<Compile Include="IobFile.cs" />
|
||||
<Compile Include="IobWPS.cs" />
|
||||
<Compile Include="IobOSAI.cs" />
|
||||
<Compile Include="IobKawasaki.cs" />
|
||||
@@ -481,6 +483,12 @@
|
||||
<None Include="DATA\CONF\MMapW.map">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\EM63.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\EM63.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\WPS.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
@@ -496,6 +504,60 @@
|
||||
<Content Include="Resources\Start-IOB-WIN.bat">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="DATA\EUR63_JOB\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0000.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0001.JOB">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0001.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0019.JOB">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0019.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0003.JOB">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0003.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0002.JOB">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0002.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0010.JOB">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0010.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0004.JOB">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0004.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0005.JOB">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\EUR63_JOB\SESS0005.REQ">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\HIST\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\TEMP\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="postBuildTgt.bat" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
using IOB_UT;
|
||||
using MapoSDK;
|
||||
using Newtonsoft.Json;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
using OpenQA.Selenium.Firefox;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace IOB_WIN
|
||||
{
|
||||
/// <summary>
|
||||
/// Generica classe per implementare IOB basato su scambio FILE
|
||||
/// </summary>
|
||||
public class IobFile : IobGeneric, IDisposable
|
||||
{
|
||||
/* --------------------------------------------------------------------------------
|
||||
* Controlli dotati di GENERICA funzionalità scambio info tramite file
|
||||
*
|
||||
* -------------------------------------------------------------------------------- */
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Cartella di base per interscambio
|
||||
/// </summary>
|
||||
protected string BaseDir = @"C:\Steamware";
|
||||
|
||||
/// <summary>
|
||||
/// Array di configurazione degli oggetti da cercare x decodifica e recupero info
|
||||
/// </summary>
|
||||
protected Dictionary<string, string> dataLocatorLUT;
|
||||
|
||||
/// <summary>
|
||||
/// Vettore della frequenza di ogni status trovato... invio ogni 100 rilevazioni (modulo 100, resto == 1)
|
||||
/// </summary>
|
||||
protected Dictionary<string, int> freqUnknStatus = new Dictionary<string, int>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller"></param>
|
||||
/// <param name="adpConf"></param>
|
||||
public IobFile(AdapterForm caller, IobConfiguration IOBConf) : base(caller, IOBConf)
|
||||
{
|
||||
lgInfo("INIT IobFile");
|
||||
//reloadAdapterConf();
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
/// <summary>
|
||||
/// Pulizia preliminare folder comunicazione
|
||||
/// </summary>
|
||||
internal virtual void cleanupFolder()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricarica conf adapter...
|
||||
/// </summary>
|
||||
internal virtual void reloadAdapterConf()
|
||||
{
|
||||
#if false
|
||||
// init obj display
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
lgInfo("BEGIN reloadAdapterConf");
|
||||
// inizializzo LUT decodifica
|
||||
string jsonConf = getOptPar("LUT_CONF");
|
||||
if (!string.IsNullOrEmpty(jsonConf))
|
||||
{
|
||||
string jsonFullPath = $"{Application.StartupPath}/DATA/CONF/{jsonConf}";
|
||||
lgInfo($"Apertura file {jsonFullPath}");
|
||||
StreamReader reader = new StreamReader(jsonFullPath);
|
||||
string jsonData = reader.ReadToEnd();
|
||||
if (!string.IsNullOrEmpty(jsonData))
|
||||
{
|
||||
try
|
||||
{
|
||||
monitoredItems = JsonConvert.DeserializeObject<MonitoredItemsConf>(jsonData);
|
||||
// salvo baseUri
|
||||
baseDir = monitoredItems.SrvData.baseUri;
|
||||
lgInfo($"baseUri = {baseDir}");
|
||||
// imposto a zero la bitmap x riavvio!
|
||||
B_input = 0;
|
||||
// FORZO invio dati...
|
||||
accodaSigIN(ref currDispData);
|
||||
// loggo!
|
||||
lgInfo($"init input bitmap to zero: {B_input}");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Eccezione in decodifica conf json");
|
||||
}
|
||||
}
|
||||
reader.Dispose();
|
||||
}
|
||||
lgInfo("DONE reloadAdapterConf");
|
||||
raiseRefresh(currDispData);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Metodi specifici (da verificare/completare in implementazione)
|
||||
|
||||
/// <summary>
|
||||
/// Processo stati unknown...
|
||||
/// </summary>
|
||||
/// <param name="cKey"></param>
|
||||
private void processUnknStatus(string cKey)
|
||||
{
|
||||
// cerco se avevo già una key nella dictionary...
|
||||
if (freqUnknStatus.ContainsKey(cKey))
|
||||
{
|
||||
freqUnknStatus[cKey]++;
|
||||
// se è 1 ogni 100 (%100, resto ==1) --> loggo...
|
||||
if (freqUnknStatus[cKey] % 100 == 1)
|
||||
{
|
||||
lgInfo($"Errore in decodifica status: MAPPING non trovato per {cKey} | freq: {freqUnknStatus[cKey]}");
|
||||
// accodo come invio di tipo FLOG...
|
||||
string sVal = string.Format("[UnknStatus] {0}, freq: {1}", cKey, freqUnknStatus);
|
||||
// chiamo accodamento...
|
||||
accodaFLog(sVal, qEncodeFLog("UnknStatus", sVal));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// creo chiave con freq = 1
|
||||
freqUnknStatus.Add(cKey, 1);
|
||||
// log iniziale
|
||||
lgInfo($"Errore in decodifica status: MAPPING non trovato per {cKey}");
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupero dati dinamici in formato dictionary
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override Dictionary<string, string> getDynData()
|
||||
{
|
||||
lgInfo("Chiamata getDynData x IOB FILE!");
|
||||
Dictionary<string, string> outVal = new Dictionary<string, string>();
|
||||
#if false
|
||||
try
|
||||
{
|
||||
/* ----------------------------------------------------------
|
||||
* Recupero dalla TUTTE le chiavi richieste...
|
||||
* */
|
||||
|
||||
string cKey = "";
|
||||
string cVal = "";
|
||||
// processo tutti i DynData...
|
||||
foreach (var item in monitoredItems.DynData)
|
||||
{
|
||||
// cerco elemento indicato
|
||||
element = driver.FindElement(By.Id(item.val));
|
||||
cVal = element.Text;
|
||||
// verifico nome o key...
|
||||
if (!string.IsNullOrEmpty(item.name))
|
||||
{
|
||||
cKey = item.name;
|
||||
}
|
||||
else
|
||||
{
|
||||
element = driver.FindElement(By.Id(item.key));
|
||||
cKey = element.Text;
|
||||
}
|
||||
// controllo se devo inviare (per tipo di dato, x scadenza)
|
||||
if (monItem2Send(cVal, item))
|
||||
{
|
||||
item.actVal = cVal;
|
||||
item.DTScad = DateTime.Now.AddSeconds(item.sPeriod);
|
||||
// accodo!
|
||||
outVal.Add(cKey, cVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Errore in getDynData x IOB FILE");
|
||||
}
|
||||
#endif
|
||||
return outVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua processing del recupero delle OVERRIDE (spindle, feedrate, rapid)
|
||||
/// </summary>
|
||||
public override void processOverride()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua lettura semafori principale
|
||||
/// <paramref name="currDispData">Parametri da aggiornare x display in form</paramref>
|
||||
/// </summary>
|
||||
public override void readSemafori(ref newDisplayData currDispData)
|
||||
{
|
||||
// init a zero...
|
||||
B_input = 0;
|
||||
// ciclo!
|
||||
try
|
||||
{
|
||||
#if false
|
||||
// controllo SE il driver SIA attivo...
|
||||
if (driver != null)
|
||||
{
|
||||
string cKey = "";
|
||||
string cVal = "";
|
||||
// IPOTESI: un UNICO oggetto decodifica status
|
||||
if (monitoredItems.Status.Count == 1)
|
||||
{
|
||||
var item = monitoredItems.Status[0];
|
||||
// cerco elemento indicato
|
||||
element = driver.FindElement(By.Id(item.val));
|
||||
cKey = element.Text;
|
||||
// verifico se mancasse il mapping...
|
||||
if (!item.codeMapping.ContainsKey(cKey))
|
||||
{
|
||||
processUnknStatus(cKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ora decodifico da variabile status a valore secondo impostazione "codeMapping"
|
||||
cVal = item.codeMapping[cKey];
|
||||
B_input = int.Parse(cVal, System.Globalization.NumberStyles.HexNumber);
|
||||
if (currDispData != null)
|
||||
{
|
||||
currDispData.semIn = Semaforo.SV;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError("Errore: driver non pronto (null)");
|
||||
}
|
||||
#endif
|
||||
// riporto bitmap...
|
||||
reportRawInput(ref currDispData);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Errore in readSemafori x IOB FILE");
|
||||
if (currDispData != null)
|
||||
currDispData.semIn = Semaforo.SR;
|
||||
}
|
||||
}
|
||||
|
||||
public override void startAdapter(bool resetQueue)
|
||||
{
|
||||
// in primis RICARICO conf specifica...
|
||||
reloadAdapterConf();
|
||||
// pulizia preliminare folder
|
||||
cleanupFolder();
|
||||
// continuo con start...
|
||||
base.startAdapter(resetQueue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override x chiusura driver...
|
||||
/// </summary>
|
||||
/// <param name="tryRestart"></param>
|
||||
/// <param name="forceDequeue"></param>
|
||||
public override void stopAdapter(bool tryRestart, bool forceDequeue)
|
||||
{
|
||||
try
|
||||
{
|
||||
#if false
|
||||
// in primis chiudo driver...
|
||||
if (driver != null)
|
||||
{
|
||||
driver.Quit();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Eccezione in tryDisconnect");
|
||||
}
|
||||
// continuo
|
||||
base.stopAdapter(tryRestart, forceDequeue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connessione
|
||||
/// </summary>
|
||||
public override void tryConnect()
|
||||
{
|
||||
// controllo ping --> segno connected...
|
||||
connectionOk = Directory.Exists(BaseDir);
|
||||
if (connectionOk)
|
||||
{
|
||||
#if false
|
||||
try
|
||||
{
|
||||
// modalità sincrona
|
||||
startDriver();
|
||||
lgInfo("Completato start driver");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Eccezione in tryConnect");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
// aspetto prima di riprovare...
|
||||
Thread.Sleep(200);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnessione
|
||||
/// </summary>
|
||||
public override void tryDisconnect()
|
||||
{
|
||||
connectionOk = false;
|
||||
try
|
||||
{
|
||||
#if false
|
||||
// in primis chiudo driver...
|
||||
if (driver != null)
|
||||
//if (driver != null && driver.WindowHandles.Count > 0)
|
||||
{
|
||||
driver.Quit();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Eccezione in tryDisconnect");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Metodi specifici (da verificare/completare in implementazione)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,648 @@
|
||||
using CncLib.OPENcontrol;
|
||||
using IOB_UT;
|
||||
using MapoSDK;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace IOB_WIN
|
||||
{
|
||||
public class IobFileEurom63 : IobFile
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// step di comunicazione attivo
|
||||
/// </summary>
|
||||
protected Eurom63.ComLevel actLevel = Eurom63.ComLevel.None;
|
||||
|
||||
/// <summary>
|
||||
/// DIrectory eseguibile corrente
|
||||
/// </summary>
|
||||
protected string appPath = Directory.GetCurrentDirectory();
|
||||
|
||||
/// <summary>
|
||||
/// Oggetti decodificati da pagina
|
||||
/// </summary>
|
||||
protected Eurom63.ProtoConf confE63;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller"></param>
|
||||
/// <param name="adpConf"></param>
|
||||
public IobFileEurom63(AdapterForm caller, IobConfiguration IOBConf) : base(caller, IOBConf)
|
||||
{
|
||||
lgInfo("INIT IobFileEurom63");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Se la sessione fosse scaduta o non attiva --> torna al livello indicato
|
||||
/// </summary>
|
||||
/// <param name="currSession"></param>
|
||||
private void checkSessionActive(Eurom63.Session currSession, Eurom63.ComLevel nextLevel)
|
||||
{
|
||||
// SOLO SE ha senso che controllo (sono in sampling...)
|
||||
if (actLevel > Eurom63.ComLevel.ChannelOk)
|
||||
{
|
||||
// devono essere ATTIVE le sessioni di campionamento...
|
||||
if (!currSession.Active)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
// devono NON essere scadute...
|
||||
if (currSession.SessionValidUntil < adesso)
|
||||
{
|
||||
// elimino TUTTE le risposte...
|
||||
cleanupResp();
|
||||
cleanupFolder();
|
||||
// imposto livello...
|
||||
actLevel = Eurom63.ComLevel.ChannelOk;
|
||||
// richiedo abortall...
|
||||
abortPrevJob();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void abortPrevJob()
|
||||
{
|
||||
var nextLevel = Eurom63.ComLevel.ChannelOk;
|
||||
var connectSession = confE63.ActiveSessions[3];
|
||||
processSession(nextLevel, connectSession);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica una sessione configurata (ovvero la comunicazione su TUTTI i file associati)
|
||||
/// </summary>
|
||||
/// <param name="session"></param>
|
||||
/// <returns></returns>
|
||||
protected bool checkResp(Eurom63.Session session)
|
||||
{
|
||||
bool answ = false;
|
||||
string fileName = "";
|
||||
if (session != null)
|
||||
{
|
||||
fileName = $"{BaseDir}\\{session.SessionName}.RSP";
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
// verifico contenuto
|
||||
string rawData = File.ReadAllText(fileName);
|
||||
answ = rawData.Contains(session.RespOk);
|
||||
if (!answ)
|
||||
{
|
||||
// se NON ok faccio pulizia...
|
||||
cleanupSession(session);
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica periodica dei campionamenti:
|
||||
/// - i due jobs devono essere attivi e non scaduti
|
||||
/// - non devo aver già resettato...
|
||||
/// </summary>
|
||||
protected void checkSampling()
|
||||
{
|
||||
var currSession = confE63.ActiveSessions[4];
|
||||
checkSessionActive(currSession, Eurom63.ComLevel.ChannelOk);
|
||||
|
||||
currSession = confE63.ActiveSessions[5];
|
||||
checkSessionActive(currSession, Eurom63.ComLevel.ChannelOk);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina i file della sessione indicata (SE è un task ciclico --> solo RSP)
|
||||
/// </summary>
|
||||
/// <param name="session"></param>
|
||||
/// <returns></returns>
|
||||
protected bool cleanupSession(Eurom63.Session session)
|
||||
{
|
||||
bool answ = false;
|
||||
if (session != null)
|
||||
{
|
||||
// solo se scaduta validità...
|
||||
if (session.SessionValidUntil < DateTime.Now)
|
||||
{
|
||||
string searchPattern = $"{session.SessionName}.*";
|
||||
// task ciclico?
|
||||
if (session.Cycle)
|
||||
{
|
||||
// solo risposta!
|
||||
searchPattern = $"{session.SessionName}.RSP";
|
||||
}
|
||||
string[] file2del = Directory.GetFiles(BaseDir, searchPattern);
|
||||
foreach (var file in file2del)
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processa una sessione
|
||||
/// - andando a verificare l'esistenza della REQ + se esito positivo pulizia
|
||||
/// - andando a richeidere di nuovo risposta
|
||||
/// </summary>
|
||||
/// <param name="nextLevel"></param>
|
||||
/// <param name="connectSession"></param>
|
||||
protected void processSession(Eurom63.ComLevel nextLevel, Eurom63.Session connectSession)
|
||||
{
|
||||
if (connectSession != null)
|
||||
{
|
||||
// controllo esistenza directory --> segno connected...
|
||||
connectionOk = Directory.Exists(BaseDir);
|
||||
if (connectionOk)
|
||||
{
|
||||
// verifico se ci sia risp CONNECT
|
||||
if (checkResp(connectSession))
|
||||
{
|
||||
// aggiorno livello
|
||||
actLevel = nextLevel;
|
||||
// elimino file sessione
|
||||
cleanupSession(connectSession);
|
||||
connectSession.Active = false;
|
||||
connectSession.Passed = true;
|
||||
}
|
||||
// richiedo SE non ci fosse i dati CONNECT...
|
||||
else
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
// evito di richiedere SE non fosse già scaduta richiesta...
|
||||
if (adesso > connectSession.RetryVeto)
|
||||
{
|
||||
processSessionFile(connectSession);
|
||||
connectSession.Active = true;
|
||||
connectSession.Passed = false;
|
||||
connectSession.SessionStarted = adesso;
|
||||
connectSession.SessionValidUntil = adesso.AddMinutes(connectSession.ValidityMinutes);
|
||||
connectSession.RetryVeto = adesso.AddSeconds(connectSession.RetrySec);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// aspetto prima di riprovare...
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// aspetto prima di riprovare...
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processa i file della sessione indicata (copy + transform)
|
||||
/// </summary>
|
||||
/// <param name="session"></param>
|
||||
/// <returns></returns>
|
||||
protected bool processSessionFile(Eurom63.Session session)
|
||||
{
|
||||
bool answ = false;
|
||||
if (session != null)
|
||||
{
|
||||
string fileFrom = "";
|
||||
string fileTo = "";
|
||||
// processo OGNI file sessione x farne copia
|
||||
foreach (var file2Proc in session.FileList)
|
||||
{
|
||||
fileFrom = $"{appPath}\\{file2Proc.Path}";
|
||||
fileTo = $"{BaseDir}\\{Path.GetFileName(file2Proc.Path)}";
|
||||
if (file2Proc.OprReq == Eurom63.FileOpr.Copy)
|
||||
{
|
||||
File.Copy(fileFrom, fileTo, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// leggo file originale...
|
||||
string rawData = File.ReadAllText(fileFrom);
|
||||
// processo sostituzioni
|
||||
rawData = rawData.Replace("{DTNow}", DateTime.Now.ToString("HHmmssyyyyMMdd"));
|
||||
// ora in posizione definitiva
|
||||
File.WriteAllText(fileTo, rawData);
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua richiesta info x macchina (validare startup process)
|
||||
/// </summary>
|
||||
protected void requestInfo()
|
||||
{
|
||||
var nextLevel = Eurom63.ComLevel.HasInfo;
|
||||
var connectSession = confE63.ActiveSessions[1];
|
||||
processSession(nextLevel, connectSession);
|
||||
}
|
||||
|
||||
protected void requestProdData()
|
||||
{
|
||||
var nextLevel = Eurom63.ComLevel.ProdRequested;
|
||||
var connectSession = confE63.ActiveSessions[5];
|
||||
processSession(nextLevel, connectSession);
|
||||
}
|
||||
|
||||
protected void requestStatusData()
|
||||
{
|
||||
var nextLevel = Eurom63.ComLevel.StatusRequested;
|
||||
var connectSession = confE63.ActiveSessions[4];
|
||||
processSession(nextLevel, connectSession);
|
||||
}
|
||||
|
||||
protected void setMachineTime()
|
||||
{
|
||||
var nextLevel = Eurom63.ComLevel.TimeSet;
|
||||
var connectSession = confE63.ActiveSessions[2];
|
||||
processSession(nextLevel, connectSession);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
/// <summary>
|
||||
/// Metodi preliminari x comunicazione:
|
||||
/// - richiesta connessione
|
||||
/// - richiesta stato attivo
|
||||
/// </summary>
|
||||
internal void checkCommStatus()
|
||||
{
|
||||
// init obj display
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
|
||||
switch (actLevel)
|
||||
{
|
||||
case Eurom63.ComLevel.None:
|
||||
tryConnect();
|
||||
break;
|
||||
|
||||
case Eurom63.ComLevel.IsConnected:
|
||||
requestInfo();
|
||||
break;
|
||||
|
||||
case Eurom63.ComLevel.HasInfo:
|
||||
setMachineTime();
|
||||
break;
|
||||
|
||||
case Eurom63.ComLevel.TimeSet:
|
||||
abortPrevJob();
|
||||
break;
|
||||
|
||||
case Eurom63.ComLevel.ChannelOk:
|
||||
requestStatusData();
|
||||
break;
|
||||
|
||||
case Eurom63.ComLevel.StatusRequested:
|
||||
requestProdData();
|
||||
break;
|
||||
|
||||
case Eurom63.ComLevel.ProdRequested:
|
||||
checkSampling();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
lgInfo("DONE checkCommStatus");
|
||||
raiseRefresh(currDispData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pulizia preliminare folder comunicazione
|
||||
/// </summary>
|
||||
internal override void cleanupFolder()
|
||||
{
|
||||
// elimino OGNI file per tipo configurato
|
||||
foreach (var cleanExt in confE63.cleanupExt)
|
||||
{
|
||||
string[] file2del = Directory.GetFiles(BaseDir, cleanExt);
|
||||
foreach (var file in file2del)
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pulizia folder da tutti i file RSP
|
||||
/// </summary>
|
||||
internal void cleanupResp()
|
||||
{
|
||||
string[] file2del = Directory.GetFiles(BaseDir, "*.RSP");
|
||||
foreach (var file in file2del)
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricarica conf adapter...
|
||||
/// </summary>
|
||||
internal override void reloadAdapterConf()
|
||||
{
|
||||
// init obj display
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
lgInfo("BEGIN reloadAdapterConf");
|
||||
// inizializzo LUT decodifica
|
||||
string jsonConf = getOptPar("LUT_CONF");
|
||||
if (!string.IsNullOrEmpty(jsonConf))
|
||||
{
|
||||
string jsonFullPath = $"{Application.StartupPath}/DATA/CONF/{jsonConf}";
|
||||
lgInfo($"Apertura file {jsonFullPath}");
|
||||
StreamReader reader = new StreamReader(jsonFullPath);
|
||||
string jsonData = reader.ReadToEnd();
|
||||
if (!string.IsNullOrEmpty(jsonData))
|
||||
{
|
||||
try
|
||||
{
|
||||
confE63 = JsonConvert.DeserializeObject<Eurom63.ProtoConf>(jsonData);
|
||||
|
||||
// salvo baseUri
|
||||
BaseDir = confE63.BaseDir;
|
||||
lgInfo($"baseDir = {BaseDir}");
|
||||
// imposto a zero la bitmap x riavvio!
|
||||
B_input = 0;
|
||||
// FORZO invio dati...
|
||||
accodaSigIN(ref currDispData);
|
||||
// loggo!
|
||||
lgInfo($"init input bitmap to zero: {B_input}");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Eccezione in decodifica conf json");
|
||||
}
|
||||
}
|
||||
reader.Dispose();
|
||||
}
|
||||
lgInfo("DONE reloadAdapterConf");
|
||||
raiseRefresh(currDispData);
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Effettua vero processing contapezzi
|
||||
/// </summary>
|
||||
public override void processContapezzi()
|
||||
{
|
||||
if (utils.CRB("enableContapezzi"))
|
||||
{
|
||||
// controllo se sono in sampling della produzione
|
||||
if (actLevel > Eurom63.ComLevel.ProdRequested)
|
||||
{
|
||||
/************************************************************
|
||||
*
|
||||
* EXAMPLE
|
||||
* DATE, TIME, ActCntCyc, ActTimCyc, ActTimFill, @OutXhour, SetDescJob
|
||||
* 20201007, 21:29:52, 5302, 8.61, 0.50, 10058, Nr. 1000987654.01
|
||||
*
|
||||
* devo prendere il 3° valore
|
||||
*
|
||||
*
|
||||
************************************************************/
|
||||
|
||||
// leggo il file della produzione HARD CODED...
|
||||
var sessProd = confE63.ActiveSessions[5];
|
||||
string currPzCount = "";
|
||||
if (sessProd != null)
|
||||
{
|
||||
if (sessProd.Active)
|
||||
{
|
||||
// nome file...
|
||||
string fileName = $"{BaseDir}\\{sessProd.SessionName}.DAT";
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
// leggo il file...
|
||||
string[] rawLines = File.ReadAllLines(fileName);
|
||||
// devo avere almeno 2 righe...
|
||||
if (rawLines.Length >= 2)
|
||||
{
|
||||
string[] statusData = rawLines[2].Split(',');
|
||||
currPzCount = statusData[2].Trim();
|
||||
// salvo se valido
|
||||
if (!string.IsNullOrEmpty(currPzCount))
|
||||
{
|
||||
int newVal = -1;
|
||||
Int32.TryParse(currPzCount, out newVal);
|
||||
contapezziPLC = newVal > -1 ? newVal : contapezziPLC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua lettura semafori principale
|
||||
/// <paramref name="currDispData">Parametri da aggiornare x display in form</paramref>
|
||||
/// </summary>
|
||||
public override void readSemafori(ref newDisplayData currDispData)
|
||||
{
|
||||
// in primis controllo status...
|
||||
checkCommStatus();
|
||||
|
||||
// init a zero...
|
||||
B_input = 0;
|
||||
|
||||
// se sono OLTRE i primi 2 step --> accesa...
|
||||
if (actLevel > Eurom63.ComLevel.None)
|
||||
{
|
||||
B_input += (1 << 0);
|
||||
}
|
||||
|
||||
// ciclo!
|
||||
try
|
||||
{
|
||||
// controllo di essere in sampling...
|
||||
if (actLevel > Eurom63.ComLevel.ChannelOk)
|
||||
{
|
||||
// controllo se sono in sampling dello stato
|
||||
if (actLevel > Eurom63.ComLevel.StatusRequested)
|
||||
{
|
||||
/* -----------------------------------------------------
|
||||
* bitmap MAPO
|
||||
* B0: POWER_ON
|
||||
* B1: RUN
|
||||
* B2: pzCount
|
||||
* B3: allarme
|
||||
* B4: manuale
|
||||
* B5: allarme TCiclo (SLOW)
|
||||
----------------------------------------------------- */
|
||||
|
||||
/******************************************************************
|
||||
*
|
||||
* EXAMPLE file content
|
||||
* DATE, TIME, ActStsMach
|
||||
* 20201007, 21:28:10, 0A000
|
||||
*
|
||||
* Configurazione array status: 5 char status decoding
|
||||
*
|
||||
* Pos1: (status)
|
||||
* 0: poweron
|
||||
* 1: poweroff
|
||||
*
|
||||
* Pos2: (mode)
|
||||
* A: AUTO
|
||||
* S: SEMI auto
|
||||
* M: Manual
|
||||
* U: Setup
|
||||
* H: Hord
|
||||
* C: Maintenance
|
||||
* 0: Unknown
|
||||
* I: Idle
|
||||
*
|
||||
* Pos3: (assist call)
|
||||
* 0: No assistance
|
||||
* 2: Assistance required
|
||||
*
|
||||
* Pos4: (Bad part)
|
||||
* 0: last cycle not bad
|
||||
* 1: last cycle bad
|
||||
*
|
||||
* Pos5: Active Alarm
|
||||
* 0: No alarm
|
||||
* 1: Alarm
|
||||
*
|
||||
*
|
||||
*
|
||||
*******************************************************************/
|
||||
|
||||
// leggo il file dela produzione HARD CODED...
|
||||
var sessStatus = confE63.ActiveSessions[4];
|
||||
string currStatus = "00000";
|
||||
if (sessStatus != null)
|
||||
{
|
||||
if (sessStatus.Active)
|
||||
{
|
||||
// nome file...
|
||||
string fileName = $"{BaseDir}\\{sessStatus.SessionName}.DAT";
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
// leggo il file...
|
||||
string[] rawLines = File.ReadAllLines(fileName);
|
||||
// devo avere almeno 2 righe...
|
||||
if (rawLines.Length >= 2)
|
||||
{
|
||||
string[] statusData = rawLines[2].Split(',');
|
||||
currStatus = statusData[2].Trim();
|
||||
if (!string.IsNullOrEmpty(currStatus))
|
||||
{
|
||||
currDispData.semIn = Semaforo.SV;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// processo il currentStatus... parto da poweron
|
||||
B_input = currStatus[0] == '1' ? 0 : 1;
|
||||
// ora MODE
|
||||
switch (currStatus[1])
|
||||
{
|
||||
case 'A':
|
||||
B_input += (1 << 1);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
case 'M':
|
||||
case 'U':
|
||||
B_input += (1 << 4);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// ora cerco allarmi
|
||||
if (currStatus[5] == '1')
|
||||
{
|
||||
B_input += (1 << 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// riporto bitmap...
|
||||
reportRawInput(ref currDispData);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Errore in readSemafori x IOB FILE");
|
||||
if (currDispData != null)
|
||||
currDispData.semIn = Semaforo.SR;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua reset del contapezzi, NON PERMESSO per EM63 (read only)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool resetcontapezziPLC()
|
||||
{
|
||||
bool answ = false;
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua IMPOSTAZIONE FORZATA del contapezzi, NON PERMESSO per EM63 (read only)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool setcontapezziPLC(int newPzCount)
|
||||
{
|
||||
bool answ = false;
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connessione
|
||||
/// </summary>
|
||||
public override void tryConnect()
|
||||
{
|
||||
var nextLevel = Eurom63.ComLevel.IsConnected;
|
||||
var connectSession = confE63.ActiveSessions[0];
|
||||
processSession(nextLevel, connectSession);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnessione
|
||||
/// </summary>
|
||||
public override void tryDisconnect()
|
||||
{
|
||||
connectionOk = false;
|
||||
try
|
||||
{
|
||||
cleanupFolder();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Eccezione in tryDisconnect");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -366,6 +366,8 @@ namespace IOB_WIN
|
||||
{
|
||||
B_input = 0;
|
||||
}
|
||||
// aggiungo NON emergenza...
|
||||
B_input += (1 << 7);
|
||||
}
|
||||
}
|
||||
// in primis verifico SE posso inviare in blocco i pezzi...... SE MP online e SE NON E' MULTI
|
||||
|
||||
+117
-110
@@ -1,113 +1,120 @@
|
||||
<body>
|
||||
<h3>MAPO-IOB-WIN</h3>
|
||||
<b>v: {{CURRENT-REL}}</b>
|
||||
<br />
|
||||
<i>Acquisitore MAPO-IOB per sistemi Windows</i>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>v.2.6.* → v.3.0.*</b>
|
||||
<ul>
|
||||
<li>revisione sistema metodi invio in blocco</li>
|
||||
<li>Gestione invio contapezzi in step > 1</li>
|
||||
<li>Gestione eventi in blocco (indipendente e prioritario su EvBlock)</li>
|
||||
<li>Gestione limite eventi memorizzabili</li>
|
||||
<li>Integrazione REDIS</li>
|
||||
<li>Integrazione IOB-MAN</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.5.* → v.2.6.*</b>
|
||||
<ul>
|
||||
<li>revisione sistema timeout Ping</li>
|
||||
<li>Gestione AutoODL in prod generale (non solo SIM)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.4.* → v.2.5.*</b>
|
||||
<ul>
|
||||
<li>Aggiunto adapter MTConnect</li>
|
||||
<li>Ottimizzazione gestione SIEMENS</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.3.* → v.2.4.*</b>
|
||||
<ul>
|
||||
<li>inserita gestione conf json x Flog acquisiti</li>
|
||||
<li>gestione invio Json blocchi dati FLog</li>
|
||||
<li>ottimizzazioni varie adapter Siemens</li>
|
||||
<li>ottimizzazione processo svuotamento code</li>
|
||||
<li>riduzione interferenza e interblocchi in fase di PLC assente</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.18.* → v.2.3.*</b>
|
||||
<ul>
|
||||
<li>inserimento WPS x acontrolli WebPage human readable</li>
|
||||
<li>fix gestione task2exe</li>
|
||||
<li>aggiunte varie versioni PLC siemens</li>
|
||||
<li>aggiunto PLC WPS x generiche web pages</li>
|
||||
<li>revisitazione LOG ODL e contapezzi</li>
|
||||
<li>modifica pagina presentazione dati (master) x resize</li>
|
||||
<li>Attivazione IOB SIMULATOR per test di carico (sostituito type DEMO)</li>
|
||||
<li>Aggiunto simulatore macchine MULTI pallet</li>
|
||||
<li>Ottimizzazione simulatore</li>
|
||||
<li>Ottimizzazioni PLC Siemens x riavvio post disconnessione (es spegnimento notturno)</li>
|
||||
<li>Ottimizzazione processo chiusura in update applicazione</li>
|
||||
<li>Aggiunta simulazione spegnimento con WU/CD</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.11.* → v.1.18.*</b>
|
||||
<ul>
|
||||
<li>Inserimento controller SIEMENS con S7+ library</li>
|
||||
<li>Inserimento nuove letture FANUC x programmi</li>
|
||||
<li>Inserimento nuove letture FANUC x SysEx (informazioni sistema)</li>
|
||||
<li>Inserimento invio FluxLog x parametri estesi (es SysEx, ProgName,...)</li>
|
||||
<li>FIX visualizzazione dati FluxLog e URL inviati</li>
|
||||
<li>FIX MAIN program da FANUC (non il current)</li>
|
||||
<li>Inserita modalita' DUMP memoria (iniziale full + periodica)</li>
|
||||
<li>Inserimento gestione contapezzi standard/checkBit in IOB.cfg</li>
|
||||
<li>Inserimento contapezzi da area memoria X</li>
|
||||
<li>NUOVA Gestione rami cliente e URL di update</li>
|
||||
<li>Gestione modi CNC</li>
|
||||
<li>Lettura dari dinamycs FANUC (feed, speed)</li>
|
||||
<li> aggiunta gestione aree G0..G30 (overrides?)</li>
|
||||
<li>fix errore disconnessione FANUC (allo spegnimento dl CNC) e memoria valori persistente a 1</li>
|
||||
<li>fix globali x gestione log IN / FLOG + ottimizzaizone check FANUC (PING)</li>
|
||||
<li>ottimizzazione fasi di restart in caso di assenza del server (evita reinvii inutili e migliora tempo ripartenza invio)</li>
|
||||
<li>review procedure controllo connessione x FANUC (es Tornos II)</li>
|
||||
<li>non richeide più privilegi admin x fare update</li>
|
||||
<li> gestione segnali inverted</li>
|
||||
<li>completata gestione configurabilità parametrica segnali (Tornos, CMZ, Biglia)</li>
|
||||
<li>revisitazione LOG x distinguere processi IOB</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.0.1.* → v.0.10.*</b>
|
||||
<ul>
|
||||
<li>Testato in produzione x update ad avvio e su richiesta</li>
|
||||
<li>Testato in produzione x lettura dati da Fanuc</li>
|
||||
<li>Inizio deploy con copia file su area IIS</li>
|
||||
<li>Prima versione con autoupdate</li>
|
||||
<li>Test PrettyBin x spostamento dll</li>
|
||||
<li>Base acquisitore FANUC</li>
|
||||
<li>Sistema base sw controllo in tray</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
<h3>MAPO-IOB-WIN</h3>
|
||||
<b>v: {{CURRENT-REL}}</b>
|
||||
<br />
|
||||
<i>Acquisitore MAPO-IOB per sistemi Windows</i>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>v.3.1.* → v.3.2.*</b>
|
||||
<ul>
|
||||
<li>Nuovi simulatori con gestione emergenza</li>
|
||||
<li>Fix gestione invio dati Redis</li>
|
||||
<li>Implementazione IOB Eurom63</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.6.* → v.3.0.*</b>
|
||||
<ul>
|
||||
<li>revisione sistema metodi invio in blocco</li>
|
||||
<li>Gestione invio contapezzi in step > 1</li>
|
||||
<li>Gestione eventi in blocco (indipendente e prioritario su EvBlock)</li>
|
||||
<li>Gestione limite eventi memorizzabili</li>
|
||||
<li>Integrazione REDIS</li>
|
||||
<li>Integrazione IOB-MAN</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.5.* → v.2.6.*</b>
|
||||
<ul>
|
||||
<li>revisione sistema timeout Ping</li>
|
||||
<li>Gestione AutoODL in prod generale (non solo SIM)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.4.* → v.2.5.*</b>
|
||||
<ul>
|
||||
<li>Aggiunto adapter MTConnect</li>
|
||||
<li>Ottimizzazione gestione SIEMENS</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.3.* → v.2.4.*</b>
|
||||
<ul>
|
||||
<li>inserita gestione conf json x Flog acquisiti</li>
|
||||
<li>gestione invio Json blocchi dati FLog</li>
|
||||
<li>ottimizzazioni varie adapter Siemens</li>
|
||||
<li>ottimizzazione processo svuotamento code</li>
|
||||
<li>riduzione interferenza e interblocchi in fase di PLC assente</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.18.* → v.2.3.*</b>
|
||||
<ul>
|
||||
<li>inserimento WPS x acontrolli WebPage human readable</li>
|
||||
<li>fix gestione task2exe</li>
|
||||
<li>aggiunte varie versioni PLC siemens</li>
|
||||
<li>aggiunto PLC WPS x generiche web pages</li>
|
||||
<li>revisitazione LOG ODL e contapezzi</li>
|
||||
<li>modifica pagina presentazione dati (master) x resize</li>
|
||||
<li>Attivazione IOB SIMULATOR per test di carico (sostituito type DEMO)</li>
|
||||
<li>Aggiunto simulatore macchine MULTI pallet</li>
|
||||
<li>Ottimizzazione simulatore</li>
|
||||
<li>Ottimizzazioni PLC Siemens x riavvio post disconnessione (es spegnimento notturno)</li>
|
||||
<li>Ottimizzazione processo chiusura in update applicazione</li>
|
||||
<li>Aggiunta simulazione spegnimento con WU/CD</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.11.* → v.1.18.*</b>
|
||||
<ul>
|
||||
<li>Inserimento controller SIEMENS con S7+ library</li>
|
||||
<li>Inserimento nuove letture FANUC x programmi</li>
|
||||
<li>Inserimento nuove letture FANUC x SysEx (informazioni sistema)</li>
|
||||
<li>Inserimento invio FluxLog x parametri estesi (es SysEx, ProgName,...)</li>
|
||||
<li>FIX visualizzazione dati FluxLog e URL inviati</li>
|
||||
<li>FIX MAIN program da FANUC (non il current)</li>
|
||||
<li>Inserita modalita' DUMP memoria (iniziale full + periodica)</li>
|
||||
<li>Inserimento gestione contapezzi standard/checkBit in IOB.cfg</li>
|
||||
<li>Inserimento contapezzi da area memoria X</li>
|
||||
<li>NUOVA Gestione rami cliente e URL di update</li>
|
||||
<li>Gestione modi CNC</li>
|
||||
<li>Lettura dari dinamycs FANUC (feed, speed)</li>
|
||||
<li> aggiunta gestione aree G0..G30 (overrides?)</li>
|
||||
<li>fix errore disconnessione FANUC (allo spegnimento dl CNC) e memoria valori persistente a 1</li>
|
||||
<li>fix globali x gestione log IN / FLOG + ottimizzaizone check FANUC (PING)</li>
|
||||
<li>ottimizzazione fasi di restart in caso di assenza del server (evita reinvii inutili e migliora tempo ripartenza invio)</li>
|
||||
<li>review procedure controllo connessione x FANUC (es Tornos II)</li>
|
||||
<li>non richeide più privilegi admin x fare update</li>
|
||||
<li> gestione segnali inverted</li>
|
||||
<li>completata gestione configurabilità parametrica segnali (Tornos, CMZ, Biglia)</li>
|
||||
<li>revisitazione LOG x distinguere processi IOB</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.0.1.* → v.0.10.*</b>
|
||||
<ul>
|
||||
<li>Testato in produzione x update ad avvio e su richiesta</li>
|
||||
<li>Testato in produzione x lettura dati da Fanuc</li>
|
||||
<li>Inizio deploy con copia file su area IIS</li>
|
||||
<li>Prima versione con autoupdate</li>
|
||||
<li>Test PrettyBin x spostamento dll</li>
|
||||
<li>Base acquisitore FANUC</li>
|
||||
<li>Sistema base sw controllo in tray</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/IOT" target="_blank">© Steamware 2006-{{CURR-YEAR}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/IOT" target="_blank">© Steamware 2006-{{CURR-YEAR}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
Vendored
+3
-3
@@ -9,9 +9,9 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=705']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '3.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '3.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
withEnv(['NEXT_BUILD_NUMBER=706']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '3.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '3.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'MAPO-IOB-WIN'
|
||||
}
|
||||
}
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30413.136
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{41CED9A1-A4F8-4F8D-97EC-CBEFC2B3F2EB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{41CED9A1-A4F8-4F8D-97EC-CBEFC2B3F2EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{41CED9A1-A4F8-4F8D-97EC-CBEFC2B3F2EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{41CED9A1-A4F8-4F8D-97EC-CBEFC2B3F2EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{41CED9A1-A4F8-4F8D-97EC-CBEFC2B3F2EB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D37298AA-67AF-432E-B3BB-12C51CD28F92}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace TestApp
|
||||
{
|
||||
/**************************************************
|
||||
* Classe gestione verifica cambio files in directory
|
||||
*
|
||||
* links:
|
||||
* https://docs.microsoft.com/it-it/dotnet/api/system.io.filesystemwatcher?view=netframework-4.0
|
||||
* https://www.c-sharpcorner.com/UploadFile/puranindia/filesystemwatcher-in-C-Sharp/
|
||||
*
|
||||
*
|
||||
* ***********************************************/
|
||||
public static class FSWatch
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Metodo principale esecuzione check filesystem
|
||||
/// </summary>
|
||||
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
|
||||
public static void Run()
|
||||
{
|
||||
//string[] args = Environment.GetCommandLineArgs();
|
||||
|
||||
//// If a directory is not specified, exit program.
|
||||
//if (args.Length != 2)
|
||||
//{
|
||||
// // Display the proper way to call the program.
|
||||
// Console.WriteLine("Usage: Watcher.exe (directory)");
|
||||
// return;
|
||||
//}
|
||||
|
||||
try
|
||||
{
|
||||
// Create a new FileSystemWatcher and set its properties.
|
||||
using (FileSystemWatcher watcher = new FileSystemWatcher())
|
||||
{
|
||||
//watcher.Path = args[1];
|
||||
|
||||
watcher.Path = Directory.GetCurrentDirectory();
|
||||
|
||||
// NO guardo le subdirs
|
||||
watcher.IncludeSubdirectories = false;
|
||||
|
||||
// Watch for changes in LastAccess and LastWrite times, and
|
||||
// the renaming of files or directories.
|
||||
//watcher.NotifyFilter = NotifyFilters.DirectoryName
|
||||
// | NotifyFilters.FileName
|
||||
// | NotifyFilters.LastAccess
|
||||
// | NotifyFilters.LastWrite
|
||||
// | NotifyFilters.Size;
|
||||
watcher.NotifyFilter = NotifyFilters.Attributes
|
||||
| NotifyFilters.CreationTime
|
||||
| NotifyFilters.DirectoryName
|
||||
| NotifyFilters.FileName
|
||||
| NotifyFilters.LastAccess
|
||||
| NotifyFilters.LastWrite
|
||||
| NotifyFilters.Security
|
||||
| NotifyFilters.Size;
|
||||
|
||||
// Only watch text files.
|
||||
watcher.Filter = "*.*";
|
||||
|
||||
// Add event handlers.
|
||||
watcher.Changed += OnChanged;
|
||||
watcher.Created += OnChanged;
|
||||
watcher.Error += OnError;
|
||||
watcher.Deleted += OnChanged;
|
||||
watcher.Renamed += OnRenamed;
|
||||
|
||||
// Begin watching.
|
||||
watcher.EnableRaisingEvents = true;
|
||||
|
||||
// Wait for the user to quit the program.
|
||||
Console.WriteLine("Press 'q' to quit the sample.");
|
||||
while (Console.Read() != 'q') ;
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
//Console.WriteLine("A Exception Occurred :" + e);
|
||||
Utils.Log.Error("A Exception Occurred :" + e);
|
||||
}
|
||||
catch (Exception oe)
|
||||
{
|
||||
//Console.WriteLine("An Exception Occurred :" + oe);
|
||||
Utils.Log.Error("An Exception Occurred :" + oe);
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnError(object sender, ErrorEventArgs e) =>
|
||||
// Specify what is done when a file is changed, created, or deleted.
|
||||
Console.WriteLine($"{DateTime.Now} | Error: {e.GetException()}");
|
||||
|
||||
// Define the event handlers.
|
||||
private static void OnChanged(object source, FileSystemEventArgs e) =>
|
||||
Utils.Log.Info($"File: {e.Name} {e.ChangeType}");
|
||||
// Specify what is done when a file is changed, created, or deleted.
|
||||
//Console.WriteLine($"{DateTime.Now} | File: {e.Name} {e.ChangeType} ({e.FullPath})");
|
||||
|
||||
|
||||
private static void OnRenamed(object source, RenamedEventArgs e) =>
|
||||
Utils.Log.Info($"File: {e.OldName} renamed to {e.Name}");
|
||||
// Specify what is done when a file is renamed.
|
||||
//Console.WriteLine($"{DateTime.Now} | File: {e.OldName} renamed to {e.Name} ({e.OldFullPath} --> {e.FullPath})");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
|
||||
<!-- optional, add some variables
|
||||
https://github.com/nlog/NLog/wiki/Configuration-file#variables
|
||||
-->
|
||||
<variable name="logDir" value="${basedir}/logs"/>
|
||||
|
||||
<!--
|
||||
See https://github.com/nlog/nlog/wiki/Configuration-file
|
||||
for information on customizing logging rules and outputs.
|
||||
-->
|
||||
<targets>
|
||||
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}"
|
||||
archiveFileName="${logDir}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="60"
|
||||
enableArchiveFileCompression="false"
|
||||
keepFileOpen="false"
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="60"
|
||||
enableArchiveFileCompression="false"
|
||||
keepFileOpen="false"
|
||||
/>
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<!-- add your logging rules here -->
|
||||
|
||||
<!--
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<logger name="*" minlevel="Debug" maxlevel="Warn" final="true" writeTo="f_base" />
|
||||
<logger name="*" minlevel="Error" writeTo="f_error" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace TestApp
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
// eseguo test FS Watcher
|
||||
FSWatch.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("TestApp")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TestApp")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
|
||||
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
|
||||
// COM, impostare su true l'attributo ComVisible per tale tipo.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
|
||||
[assembly: Guid("41ced9a1-a4f8-4f8d-97ec-cbefc2b3f2eb")]
|
||||
|
||||
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
|
||||
//
|
||||
// Versione principale
|
||||
// Versione secondaria
|
||||
// Numero di build
|
||||
// Revisione
|
||||
//
|
||||
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
||||
// usando l'asterisco '*' come illustrato di seguito:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{41CED9A1-A4F8-4F8D-97EC-CBEFC2B3F2EB}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>TestApp</RootNamespace>
|
||||
<AssemblyName>TestApp</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.5\lib\net40-client\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FSWatch.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="logs\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="AfterBuild">
|
||||
<ItemGroup>
|
||||
<MoveToLibFolder Include="$(OutputPath)*.dll ; $(OutputPath)*.pdb ; $(OutputPath)*.xml" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -0,0 +1,23 @@
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace TestApp
|
||||
{
|
||||
public class Utils
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// S
|
||||
/// </summary>
|
||||
public static Logger Log { get; private set; }
|
||||
static Utils()
|
||||
{
|
||||
LogManager.ReconfigExistingLoggers();
|
||||
|
||||
Log = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.7.5" targetFramework="net40" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user