diff --git a/MTC_Sim/.vs/MTC_Sim/v14/.suo b/MTC_Sim/.vs/MTC_Sim/v14/.suo
index 6780cbc..118fd62 100644
Binary files a/MTC_Sim/.vs/MTC_Sim/v14/.suo and b/MTC_Sim/.vs/MTC_Sim/v14/.suo differ
diff --git a/MTC_Sim/MTC_Sim/AdapterGeneric.cs b/MTC_Sim/MTC_Sim/AdapterGeneric.cs
index 0152fe0..58ca33a 100644
--- a/MTC_Sim/MTC_Sim/AdapterGeneric.cs
+++ b/MTC_Sim/MTC_Sim/AdapterGeneric.cs
@@ -146,11 +146,11 @@ namespace MTC_Sim
///
/// D.D1.P1.PATH_MODE - modalità esecuzione
///
- public Event mMode = new Event("mode");
+ public Event mMode = new Event("PATH_MODE");
///
/// D.D1.P1.PATH_STATUS - status macchina
///
- public Event mExec = new Event("exec");
+ public Event mExec = new Event("PATH_STATUS");
///
/// M_CODE
diff --git a/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs b/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs
index 773931e..6002688 100644
--- a/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs
+++ b/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs
@@ -323,28 +323,19 @@
// functionalMode
//
this.functionalMode.FormattingEnabled = true;
- this.functionalMode.Items.AddRange(new object[] {
- "MACCHINA_DISPONIBILE",
- "MANUTENZIONE",
- "PRODUZIONE",
- "PULIZIA",
- "REGOLAZIONI",
- "SETUP",
- "TEARDOWN"});
- this.functionalMode.Location = new System.Drawing.Point(252, 71);
+ this.functionalMode.Location = new System.Drawing.Point(80, 71);
this.functionalMode.Name = "functionalMode";
- this.functionalMode.Size = new System.Drawing.Size(121, 21);
+ this.functionalMode.Size = new System.Drawing.Size(293, 21);
this.functionalMode.TabIndex = 47;
- this.functionalMode.Text = "SETUP";
//
// label12
//
this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(164, 74);
+ this.label12.Location = new System.Drawing.Point(15, 74);
this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(86, 13);
+ this.label12.Size = new System.Drawing.Size(53, 13);
this.label12.TabIndex = 46;
- this.label12.Text = "Functional Mode";
+ this.label12.Text = "Halt Type";
//
// commonVariables
//
diff --git a/MTC_Sim/MTC_Sim/CMS_MachineSim.cs b/MTC_Sim/MTC_Sim/CMS_MachineSim.cs
index 760ff9d..20fe2a9 100644
--- a/MTC_Sim/MTC_Sim/CMS_MachineSim.cs
+++ b/MTC_Sim/MTC_Sim/CMS_MachineSim.cs
@@ -20,6 +20,7 @@ namespace MTC_Sim
using MTConnect;
using System.Configuration;
using System.Diagnostics;
+ using System.IO;
public partial class CMS_MachineSim : Form
{
@@ -86,6 +87,29 @@ namespace MTC_Sim
MainProgrBar.Value = 0;
MainProgrBar.Step = 1;
+ // compilo combobox causali fermo...
+ string[] contenuto = File.ReadAllLines("HaltTypeList.txt");
+
+ System.Collections.Generic.Dictionary comboSource = new Dictionary();
+ foreach (var line in contenuto)
+ {
+ // se la linea non è commento e non è vuota...
+ if (line.Length > 0 && line[0] != '#')
+ {
+ string[] tokens = line.Split(':');
+ comboSource.Add(tokens[0], tokens[1]);
+ //riga.value = tokens[0];
+ //riga.label = tokens[1];
+ //functionalMode.Items.Add(new { Value = riga.label, Key = riga.value });
+
+ //functionalMode.Items.Add(new { label = tokens[1], value = tokens[0] });
+ }
+ }
+ functionalMode.DataSource = new BindingSource(comboSource, null);
+ functionalMode.DisplayMember = "Value";
+ functionalMode.ValueMember = "Key";
+
+
string[] row = { "1", "2", "3", "4" };
commonVariables.Rows.Add(row);
}
@@ -173,7 +197,7 @@ namespace MTC_Sim
else if (stopped.Checked) answ.ExeMode = "STOPPED";
else if (ready.Checked) answ.ExeMode = "READY";
- answ.FuncMode = functionalMode.Text;
+ answ.FuncMode = ((KeyValuePair)functionalMode.SelectedItem).Key;
answ.MessageCode = messageCode.Text;
answ.MessageText = messageText.Text;
@@ -472,5 +496,6 @@ namespace MTC_Sim
#endregion
+
}
}
diff --git a/MTC_Sim/MTC_Sim/HaltTypeList.txt b/MTC_Sim/MTC_Sim/HaltTypeList.txt
new file mode 100644
index 0000000..df383db
--- /dev/null
+++ b/MTC_Sim/MTC_Sim/HaltTypeList.txt
@@ -0,0 +1,8 @@
+# Commenti con "#", elenco tipo codice:valore delle causali di HALT
+
+001:[COD 001] - PRODUZIONE
+002:[COD 002] - SETUP
+003:[COD 003] - MACCHINA_DISPONIBILE
+004:[COD 004] - MANUTENZIONE
+005:[COD 005] - PULIZIA
+006:[COD 006] - REGOLAZIONI
diff --git a/MTC_Sim/MTC_Sim/MTC_Sim.csproj b/MTC_Sim/MTC_Sim/MTC_Sim.csproj
index b27b1a8..aeb77f3 100644
--- a/MTC_Sim/MTC_Sim/MTC_Sim.csproj
+++ b/MTC_Sim/MTC_Sim/MTC_Sim.csproj
@@ -92,6 +92,11 @@
DotNetAdapterSDK
+
+
+ Always
+
+