UPdate ewon adapter

This commit is contained in:
Samuele Locatelli
2021-07-19 17:24:24 +02:00
parent e42c85467b
commit 7625275c51
5 changed files with 36 additions and 4 deletions
+14 -1
View File
@@ -102,6 +102,7 @@
this.label10 = new System.Windows.Forms.Label();
this.lblDataProc = new System.Windows.Forms.Label();
this.lblQueueLen = new System.Windows.Forms.Label();
this.btnForceAutoOdl = new System.Windows.Forms.Button();
this.statusStrip1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tabData.SuspendLayout();
@@ -787,6 +788,7 @@
// tabMes
//
this.tabMes.BackColor = System.Drawing.Color.Transparent;
this.tabMes.Controls.Add(this.btnForceAutoOdl);
this.tabMes.Controls.Add(this.panel1);
this.tabMes.Location = new System.Drawing.Point(4, 22);
this.tabMes.Name = "tabMes";
@@ -962,6 +964,16 @@
this.lblQueueLen.TabIndex = 83;
this.lblQueueLen.Text = "###";
//
// btnForceAutoOdl
//
this.btnForceAutoOdl.Location = new System.Drawing.Point(352, 6);
this.btnForceAutoOdl.Name = "btnForceAutoOdl";
this.btnForceAutoOdl.Size = new System.Drawing.Size(173, 23);
this.btnForceAutoOdl.TabIndex = 89;
this.btnForceAutoOdl.Text = "Force AutoODL";
this.btnForceAutoOdl.UseVisualStyleBackColor = true;
this.btnForceAutoOdl.Click += new System.EventHandler(this.btnForceAutoOdl_Click);
//
// AdapterForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1080,5 +1092,6 @@
private System.Windows.Forms.Label lblQueueMessLen;
private System.Windows.Forms.Label lblPzCountIob;
private System.Windows.Forms.Label lblPzCountMac;
}
private System.Windows.Forms.Button btnForceAutoOdl;
}
}
+5
View File
@@ -733,6 +733,11 @@ namespace IOB_WIN_NEXT
#region Private Methods
private void btnForceAutoOdl_Click(object sender, EventArgs e)
{
iobObj.forceResetOdl();
}
private void BtnOpenLog_Click(object sender, EventArgs e)
{
try
+9
View File
@@ -3176,6 +3176,15 @@ namespace IOB_WIN_NEXT
return answ;
}
/// <summary>
/// forza reset ODL
/// </summary>
public void forceResetOdl()
{
lgInfo("Registrato richiesta forzatura reset ODL");
pzCountResetted = true;
}
/// <summary>
/// Effettua chiamata x split ODL
/// </summary>
+2
View File
@@ -145,6 +145,7 @@ namespace IOB_WIN_NEXT
/// <param name="updatedPar"></param>
protected override void plcWriteParams(List<objItem> updatedPar)
{
#if false
if (!testDone)
{
try
@@ -160,6 +161,7 @@ namespace IOB_WIN_NEXT
lgError($"Eccezione in WriteTestNodes{Environment.NewLine}{exc}");
}
}
#endif
dataConf currMem = null;
int byteSize = 0;
+6 -3
View File
@@ -776,6 +776,9 @@ namespace IOB_WIN_NEXT
try
{
// scrivo vaslori a caso.. hhmm odierni
int hhmm = 9876;
int.TryParse(DateTime.Now.ToString("HHmm"), out hhmm);
// Write the configured nodes
WriteValueCollection nodesToWrite = new WriteValueCollection();
@@ -784,21 +787,21 @@ namespace IOB_WIN_NEXT
commWriteVal.NodeId = new NodeId("ns=4;s=IO_151");
commWriteVal.AttributeId = Attributes.Value;
commWriteVal.Value = new DataValue();
commWriteVal.Value.Value = (int)111;
commWriteVal.Value.Value = (int)hhmm - 10;
nodesToWrite.Add(commWriteVal);
WriteValue artWriteVal = new WriteValue();
artWriteVal.NodeId = new NodeId("ns=4;s=IO_151");
artWriteVal.AttributeId = Attributes.Value;
artWriteVal.Value = new DataValue();
artWriteVal.Value.Value = (int)222;
artWriteVal.Value.Value = (int)hhmm;
nodesToWrite.Add(artWriteVal);
WriteValue qtyWriteVal = new WriteValue();
qtyWriteVal.NodeId = new NodeId("ns=4;s=IO_153");
qtyWriteVal.AttributeId = Attributes.Value;
qtyWriteVal.Value = new DataValue();
qtyWriteVal.Value.Value = (int)333;
qtyWriteVal.Value.Value = (int)hhmm + 10;
nodesToWrite.Add(qtyWriteVal);
#if false