riportato a messaggi ed esteso uso messaggi...
This commit is contained in:
@@ -329,6 +329,7 @@ namespace MTC_Adapter
|
||||
string pathExeMode = "";
|
||||
string pathRunMode = "";
|
||||
string ProgAreaRun = "";
|
||||
int ProgAreaRunCode = 0;
|
||||
bool isFeedHold = false;
|
||||
bool isActive = false;
|
||||
bool isReady = false;
|
||||
@@ -495,7 +496,8 @@ namespace MTC_Adapter
|
||||
}
|
||||
else if (mapIOT_Byte[i].varName.StartsWith("IOT_EXEC_A_"))
|
||||
{
|
||||
ProgAreaRun = "";
|
||||
ProgAreaRun = "OFF";
|
||||
ProgAreaRunCode = 0;
|
||||
// recupero NUMERO
|
||||
try
|
||||
{
|
||||
@@ -504,11 +506,9 @@ namespace MTC_Adapter
|
||||
if (((StFlag8)currByte).HasFlag((StFlag8)Math.Pow(2, bitNum)))
|
||||
{
|
||||
ProgAreaRun = "ON";
|
||||
ProgAreaRunCode = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProgAreaRun = "OFF";
|
||||
}
|
||||
vettMemArea[numero - 1].mMemAreaRunning.Code = ProgAreaRunCode.ToString();
|
||||
vettMemArea[numero - 1].mMemAreaRunning.Value = ProgAreaRun;
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -970,6 +970,7 @@ namespace MTC_Adapter
|
||||
// trimmo!
|
||||
valString = valString.Trim();
|
||||
// salvo
|
||||
vettMemArea[j].mMemAreaProgName.Code = j.ToString();
|
||||
vettMemArea[j].mMemAreaProgName.Value = valString;
|
||||
// aggiungo nomi programmi...
|
||||
sb.AppendLine(string.Format("{0}: {1}", mapIOT_String[j].varName, valString));
|
||||
|
||||
@@ -157,11 +157,11 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Programma caricato
|
||||
/// </summary>
|
||||
public Event mMemAreaProgName;
|
||||
public MTConnect.Message mMemAreaProgName;
|
||||
/// <summary>
|
||||
/// Programma Running (in esecuzione) - ON/OFF
|
||||
/// </summary>
|
||||
public Event mMemAreaRunning;
|
||||
public MTConnect.Message mMemAreaRunning;
|
||||
/// <summary>
|
||||
/// Num esecuzioni programma
|
||||
/// </summary>
|
||||
@@ -179,8 +179,8 @@ namespace MTC_Adapter
|
||||
ident = baseElem.ident;
|
||||
dataRefList = baseElem.dataRefList;
|
||||
|
||||
mMemAreaProgName = new Event(string.Format("{0}_PROG_NAME", ident));
|
||||
mMemAreaRunning = new Event(string.Format("{0}_RUNNING", ident));
|
||||
mMemAreaProgName = new MTConnect.Message(string.Format("{0}_PROG_NAME", ident));
|
||||
mMemAreaRunning = new MTConnect.Message(string.Format("{0}_RUNNING", ident));
|
||||
mMemAreaProgNumExe = new Event(string.Format("{0}_NUM_EXE", ident));
|
||||
mMemAreaProgNumRep = new Event(string.Format("{0}_NUM_REP", ident));
|
||||
}
|
||||
@@ -193,7 +193,7 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Tipo Path (LAVOR/ASSERV)
|
||||
/// </summary>
|
||||
public MTConnect.Event mPathType;
|
||||
public MTConnect.Message mPathType;
|
||||
/// <summary>
|
||||
/// Cod Particolare su Path
|
||||
/// </summary>
|
||||
@@ -205,15 +205,15 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Codici M sul PATH
|
||||
/// </summary>
|
||||
public MTConnect.Event mPathCodM;
|
||||
public MTConnect.Message mPathCodM;
|
||||
/// <summary>
|
||||
/// Codici S sul PATH
|
||||
/// </summary>
|
||||
public MTConnect.Event mPathCodS;
|
||||
public MTConnect.Message mPathCodS;
|
||||
/// <summary>
|
||||
/// Codici T sul PATH
|
||||
/// </summary>
|
||||
public MTConnect.Event mPathCodT;
|
||||
public MTConnect.Message mPathCodT;
|
||||
/// <summary>
|
||||
/// Modalità RUN del PATH: AUTO/EDIT/MDI/JOG/JOGINC/REF/HANDLE
|
||||
/// </summary>
|
||||
@@ -277,11 +277,11 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Stato dei codici G attivi
|
||||
/// </summary>
|
||||
public Event mPathCodG_Act;
|
||||
public MTConnect.Message mPathCodG_Act;
|
||||
/// <summary>
|
||||
/// Stato dei SubMode attivi
|
||||
/// </summary>
|
||||
public Event mPathSubMode;
|
||||
public MTConnect.Message mPathSubMode;
|
||||
/// <summary>
|
||||
/// Allarmi CNC del PATH
|
||||
/// </summary>
|
||||
@@ -309,20 +309,20 @@ namespace MTC_Adapter
|
||||
mPathPosActJ = new Sample(string.Format("{0}_PosActJ", ident));
|
||||
mPathPosActK = new Sample(string.Format("{0}_PosActK", ident));
|
||||
// aggiunta x revisione 2016.05.05
|
||||
mPathType = new Event(string.Format("{0}_Type", ident));
|
||||
mPathType = new MTConnect.Message(string.Format("{0}_Type", ident));
|
||||
mPathPartId = new Event(string.Format("{0}_PartId", ident));
|
||||
mPathPartCount = new Event(string.Format("{0}_PZ_TOT", ident));
|
||||
mPathCodM = new Event(string.Format("{0}_Cod_M", ident));
|
||||
mPathCodS = new Event(string.Format("{0}_Cod_S", ident));
|
||||
mPathCodT = new Event(string.Format("{0}_Cod_T", ident));
|
||||
mPathCodM = new MTConnect.Message(string.Format("{0}_Cod_M", ident));
|
||||
mPathCodS = new MTConnect.Message(string.Format("{0}_Cod_S", ident));
|
||||
mPathCodT = new MTConnect.Message(string.Format("{0}_Cod_T", ident));
|
||||
mPathRunMode = new Event(string.Format("{0}_RUN_MODE", ident));
|
||||
mPathExeMode = new Event(string.Format("{0}_EXE_MODE", ident));
|
||||
mPathCurrProg = new Event(string.Format("{0}_CurrProg", ident));
|
||||
mPathCurrArea = new Event(string.Format("{0}_CurrArea", ident));
|
||||
mPathCurrProgRowNum = new Event(string.Format("{0}_CurrProg_RowNum", ident));
|
||||
mPathActiveAxes = new Event(string.Format("{0}_ActiveAxes", ident));
|
||||
mPathCodG_Act = new Event(string.Format("{0}_CodG_Act", ident));
|
||||
mPathSubMode = new Event(string.Format("{0}_SubMode", ident));
|
||||
mPathCodG_Act = new MTConnect.Message(string.Format("{0}_CodG_Act", ident));
|
||||
mPathSubMode = new MTConnect.Message(string.Format("{0}_SubMode", ident));
|
||||
mPathAlarmCNC = new Condition(string.Format("{0}_AlarmCNC", ident));
|
||||
mPathAlarmPLC = new Condition(string.Format("{0}_AlarmPLC", ident));
|
||||
}
|
||||
@@ -355,7 +355,7 @@ namespace MTC_Adapter
|
||||
/// 2 : "Stroke [n]"
|
||||
/// 3 : "Distance [m]" ([ft] se la macchina è impostata in pollici)
|
||||
/// </summary>
|
||||
public Event mUnOpVitaResType;
|
||||
public MTConnect.Message mUnOpVitaResType;
|
||||
/// <summary>
|
||||
/// valore speed
|
||||
/// </summary>
|
||||
@@ -393,7 +393,7 @@ namespace MTC_Adapter
|
||||
mUnOpSpeedOverr = new Sample(string.Format("{0}_SpeedOverr", ident));
|
||||
mUnOpLoad = new Sample(string.Format("{0}_Load", ident));
|
||||
mUnOpAccTime = new Sample(string.Format("{0}_AccTime", ident));
|
||||
mUnOpVitaResType = new Event(string.Format("{0}_VitaResType", ident));
|
||||
mUnOpVitaResType = new MTConnect.Message(string.Format("{0}_VitaResType", ident));
|
||||
mUnOpKRev = new Sample(string.Format("{0}_KRev", ident));
|
||||
}
|
||||
}
|
||||
@@ -405,11 +405,11 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Processo di appartenenza
|
||||
/// </summary>
|
||||
public Event mAxMainProc;
|
||||
public MTConnect.Message mAxMainProc;
|
||||
/// <summary>
|
||||
/// Bit se sia master (=1) o slave (=0)
|
||||
/// </summary>
|
||||
public Event mAxIsMaster;
|
||||
public MTConnect.Message mAxIsMaster;
|
||||
/// <summary>
|
||||
/// ID del master
|
||||
/// </summary>
|
||||
@@ -506,8 +506,8 @@ namespace MTC_Adapter
|
||||
|
||||
}
|
||||
// valori standard
|
||||
mAxMainProc = new Event(string.Format("{0}_MainProc", ident));
|
||||
mAxIsMaster = new Event(string.Format("{0}_IsMast", ident));
|
||||
mAxMainProc = new MTConnect.Message(string.Format("{0}_MainProc", ident));
|
||||
mAxIsMaster = new MTConnect.Message(string.Format("{0}_IsMast", ident));
|
||||
mAxMastId = new Event(string.Format("{0}_MastId", ident));
|
||||
mAxDir = new Event(string.Format("{0}_Dir", ident));
|
||||
mAxLoad = new Sample(string.Format("{0}_Load", ident));
|
||||
@@ -902,26 +902,6 @@ namespace MTC_Adapter
|
||||
/// Stato protezioni (0/1, off/on)
|
||||
/// </summary>
|
||||
public Event mProtectionStatus = new Event("PROTECTION_STATUS");
|
||||
/// <summary>
|
||||
/// modalità funzionale
|
||||
/// </summary>
|
||||
public Event mFunctionalMode = new Event("FUNCT_MODE");
|
||||
/// <summary>
|
||||
/// Azioni operatore (Start/Stop/reset)
|
||||
/// </summary>
|
||||
public Event mUserAction = new Event("USER_ACTION");
|
||||
/// <summary>
|
||||
/// Testing macchina
|
||||
/// </summary>
|
||||
public Event mTestingData = new Event("TESTING_DATA");
|
||||
/// <summary>
|
||||
/// Strobe rilevati ma non qualificati
|
||||
/// </summary>
|
||||
public Event mUnkStrobe = new Event("UNK_STROBE");
|
||||
/// <summary>
|
||||
/// Status rilevati ma non qualificati
|
||||
/// </summary>
|
||||
public Event mUnkStatus = new Event("UNK_STATUS");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -935,6 +915,26 @@ namespace MTC_Adapter
|
||||
|
||||
#region Messages
|
||||
|
||||
/// <summary>
|
||||
/// modalità funzionale
|
||||
/// </summary>
|
||||
public MTConnect.Message mFunctionalMode = new MTConnect.Message("FUNCT_MODE");
|
||||
/// <summary>
|
||||
/// Azioni operatore (Start/Stop/reset)
|
||||
/// </summary>
|
||||
public MTConnect.Message mUserAction = new MTConnect.Message("USER_ACTION");
|
||||
/// <summary>
|
||||
/// Testing macchina
|
||||
/// </summary>
|
||||
public MTConnect.Message mTestingData = new MTConnect.Message("TESTING_DATA");
|
||||
/// <summary>
|
||||
/// Strobe rilevati ma non qualificati
|
||||
/// </summary>
|
||||
public MTConnect.Message mUnkStrobe = new MTConnect.Message("UNK_STROBE");
|
||||
/// <summary>
|
||||
/// Status rilevati ma non qualificati
|
||||
/// </summary>
|
||||
public MTConnect.Message mUnkStatus = new MTConnect.Message("UNK_STATUS");
|
||||
/// <summary>
|
||||
/// Messaggi generali
|
||||
/// </summary>
|
||||
@@ -984,7 +984,6 @@ namespace MTC_Adapter
|
||||
mAdapter.AddDataItem(mAvail);
|
||||
mAvail.Value = "AVAILABLE";
|
||||
mMessage.Value = "";
|
||||
mMessage.Code = "";
|
||||
|
||||
// assets
|
||||
mAdapter.AddDataItem(mAssetChg);
|
||||
@@ -1731,14 +1730,27 @@ namespace MTC_Adapter
|
||||
if (codiceM != "")
|
||||
{
|
||||
vettPath[i].mPathCodM.Value = string.Format("[M{0}]", codiceM);
|
||||
#if false
|
||||
mMessage.Code = string.Format("[M{0}]", codiceM);
|
||||
mMessage.Value = string.Format("[M{0}]", codiceM);
|
||||
#endif
|
||||
}
|
||||
if (codiceS != "")
|
||||
{
|
||||
vettPath[i].mPathCodS.Value = string.Format("[S{0}]", codiceS);
|
||||
#if false
|
||||
mMessage.Code = string.Format("[S{0}]", codiceS);
|
||||
mMessage.Value = string.Format("[S{0}]", codiceS);
|
||||
|
||||
#endif
|
||||
}
|
||||
if (codiceT != "")
|
||||
{
|
||||
vettPath[i].mPathCodT.Value = string.Format("[T{0}]", codiceT);
|
||||
#if false
|
||||
mMessage.Code = string.Format("[T{0}]", codiceT);
|
||||
mMessage.Value = string.Format("[T{0}]", codiceT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user