Merge branch 'master' into develop
This commit is contained in:
+17
-15
@@ -1,18 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="appName" value="MHT-Proxy"/>
|
||||
<add key="verbose" value="false"/>
|
||||
<!--conf file-->
|
||||
<add key="memConfPath" value="setupData.json"/>
|
||||
<add key="sampleTimerMs" value="1000"/>
|
||||
</appSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="lib;libs"/>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="appName" value="IOB-WIN.FileExp"/>
|
||||
<add key="verbose" value="false"/>
|
||||
<!--conf file-->
|
||||
<add key="csvFilePath" value="c:\\TMP\\OutputFile.csv"/>
|
||||
<add key="csvHeader" value="true"/>
|
||||
<add key="csvSeparator" value=";"/>
|
||||
<add key="sampleTimerMs" value="500"/>
|
||||
</appSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="lib;libs"/>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"confPLC": {
|
||||
"ipAdrr": "192.168.214.1",
|
||||
"tipoCpu": "S7300",
|
||||
"rack": 0,
|
||||
"slot": 2
|
||||
},
|
||||
"TriggerMemConf": "DB700.DBB0",
|
||||
"parametersList": {
|
||||
"DB700.DBB8": {
|
||||
"Column": "Valore 1",
|
||||
"Index": 1,
|
||||
"MemConf": "DB700.DBB8",
|
||||
"DataType": "word",
|
||||
"memByteSize": 2
|
||||
},
|
||||
"DB700.DBB10": {
|
||||
"Column": "Valore 2",
|
||||
"Index": 2,
|
||||
"MemConf": "DB700.DBB10",
|
||||
"DataType": "word",
|
||||
"memByteSize": 2
|
||||
},
|
||||
"DB700.DBB16": {
|
||||
"Column": "Valore 3",
|
||||
"Index": 3,
|
||||
"MemConf": "DB700.DBB16",
|
||||
"DataType": "dword",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB700.DBB20": {
|
||||
"Column": "Valore 4",
|
||||
"Index": 4,
|
||||
"MemConf": "DB700.DBB20",
|
||||
"DataType": "dword",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB700.DBB32": {
|
||||
"Column": "Valore 5",
|
||||
"Index": 5,
|
||||
"MemConf": "DB700.DBB32",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB700.DBB36": {
|
||||
"Column": "Valore 6",
|
||||
"Index": 6,
|
||||
"MemConf": "DB700.DBB36",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB700.DBB40": {
|
||||
"Column": "Valore 7",
|
||||
"Index": 7,
|
||||
"MemConf": "DB700.DBB40",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB700.DBB48": {
|
||||
"Column": "Valore 8",
|
||||
"Index": 8,
|
||||
"MemConf": "DB700.DBB48",
|
||||
"DataType": "string",
|
||||
"memByteSize": 20
|
||||
}
|
||||
//"parametersList": {
|
||||
// "DB701.DBD142": {
|
||||
// "Column": "Valore assoluto",
|
||||
// "Index": 7,
|
||||
// "MemConf": "DB701.DBD142",
|
||||
// "DataType": "real"
|
||||
// }
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"confPLC": {
|
||||
"ipAdrr": "192.168.0.102",
|
||||
"tipoCpu": "S71500",
|
||||
"rack": 0,
|
||||
"slot": 1
|
||||
},
|
||||
"TriggerMemConf": "DB999.DBB0",
|
||||
"parametersList": {
|
||||
"DB999.DBB8": {
|
||||
"Column": "Valore 1",
|
||||
"Index": 1,
|
||||
"MemConf": "DB999.DBB8",
|
||||
"DataType": "word",
|
||||
"memByteSize": 2
|
||||
},
|
||||
"DB999.DBB10": {
|
||||
"Column": "Valore 2",
|
||||
"Index": 2,
|
||||
"MemConf": "DB999.DBB10",
|
||||
"DataType": "word",
|
||||
"memByteSize": 2
|
||||
},
|
||||
"DB999.DBB16": {
|
||||
"Column": "Valore 3",
|
||||
"Index": 3,
|
||||
"MemConf": "DB999.DBB16",
|
||||
"DataType": "dword",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB20": {
|
||||
"Column": "Valore 4",
|
||||
"Index": 4,
|
||||
"MemConf": "DB999.DBB20",
|
||||
"DataType": "dword",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB32": {
|
||||
"Column": "Valore 5",
|
||||
"Index": 5,
|
||||
"MemConf": "DB999.DBB32",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB36": {
|
||||
"Column": "Valore 6",
|
||||
"Index": 6,
|
||||
"MemConf": "DB999.DBB36",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB40": {
|
||||
"Column": "Valore 7",
|
||||
"Index": 7,
|
||||
"MemConf": "DB999.DBB40",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB48": {
|
||||
"Column": "Valore 8",
|
||||
"Index": 8,
|
||||
"MemConf": "DB999.DBB48",
|
||||
"DataType": "string",
|
||||
"memByteSize": 20
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"confPLC": {
|
||||
"ipAdrr": "192.168.0.102",
|
||||
"tipoCpu": "S71500",
|
||||
"rack": 0,
|
||||
"slot": 1
|
||||
},
|
||||
"TriggerMemConf": "DB999.DBB0",
|
||||
"parametersList": {
|
||||
"DB999.DBB8": {
|
||||
"Column": "Valore 1",
|
||||
"Index": 1,
|
||||
"MemConf": "DB999.DBB8",
|
||||
"DataType": "word",
|
||||
"memByteSize": 2
|
||||
},
|
||||
"DB999.DBB10": {
|
||||
"Column": "Valore 2",
|
||||
"Index": 2,
|
||||
"MemConf": "DB999.DBB10",
|
||||
"DataType": "word",
|
||||
"memByteSize": 2
|
||||
},
|
||||
"DB999.DBB16": {
|
||||
"Column": "Valore 3",
|
||||
"Index": 3,
|
||||
"MemConf": "DB999.DBB16",
|
||||
"DataType": "dword",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB20": {
|
||||
"Column": "Valore 4",
|
||||
"Index": 4,
|
||||
"MemConf": "DB999.DBB20",
|
||||
"DataType": "dword",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB32": {
|
||||
"Column": "Valore 5",
|
||||
"Index": 5,
|
||||
"MemConf": "DB999.DBB32",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB36": {
|
||||
"Column": "Valore 6",
|
||||
"Index": 6,
|
||||
"MemConf": "DB999.DBB36",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB40": {
|
||||
"Column": "Valore 7",
|
||||
"Index": 7,
|
||||
"MemConf": "DB999.DBB40",
|
||||
"DataType": "real",
|
||||
"memByteSize": 4
|
||||
},
|
||||
"DB999.DBB48": {
|
||||
"Column": "Valore 8",
|
||||
"Index": 8,
|
||||
"MemConf": "DB999.DBB48",
|
||||
"DataType": "string",
|
||||
"memByteSize": 20
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MHT_Siemens
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
#region memorie configurate staticamente
|
||||
|
||||
public const string RESOURCE_DIRECTORY = @"IOB.WIN.FileExp.Config.";
|
||||
public const string CONFIG_PATH = RESOURCE_DIRECTORY + @"setup.json";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+53
-53
@@ -1,6 +1,6 @@
|
||||
namespace MHT_Siemens
|
||||
{
|
||||
partial class SiemensProxy
|
||||
partial class IOB_Exporter
|
||||
{
|
||||
/// <summary>
|
||||
/// Variabile di progettazione necessaria.
|
||||
@@ -28,16 +28,16 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SiemensProxy));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IOB_Exporter));
|
||||
this.txtCsvPath = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.lblPlcIp = new System.Windows.Forms.Label();
|
||||
this.txtIP = new System.Windows.Forms.TextBox();
|
||||
this.txtSlot = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.lblPlcSlot = new System.Windows.Forms.Label();
|
||||
this.txtRack = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.lblPlcRack = new System.Windows.Forms.Label();
|
||||
this.lblPlcCpu = new System.Windows.Forms.Label();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.tsslApp = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
|
||||
@@ -54,7 +54,7 @@
|
||||
this.txtCsvPath.Name = "txtCsvPath";
|
||||
this.txtCsvPath.Size = new System.Drawing.Size(172, 20);
|
||||
this.txtCsvPath.TabIndex = 0;
|
||||
this.txtCsvPath.Text = "c:\\zz\\prova1.csv";
|
||||
this.txtCsvPath.Text = "c:\\TMP\\OutputFile.csv";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@@ -65,14 +65,14 @@
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "CSV File";
|
||||
//
|
||||
// label2
|
||||
// lblPlcIp
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(279, 24);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(42, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "IP Addr";
|
||||
this.lblPlcIp.AutoSize = true;
|
||||
this.lblPlcIp.Location = new System.Drawing.Point(279, 24);
|
||||
this.lblPlcIp.Name = "lblPlcIp";
|
||||
this.lblPlcIp.Size = new System.Drawing.Size(42, 13);
|
||||
this.lblPlcIp.TabIndex = 2;
|
||||
this.lblPlcIp.Text = "IP Addr";
|
||||
//
|
||||
// txtIP
|
||||
//
|
||||
@@ -97,15 +97,15 @@
|
||||
this.txtSlot.Text = "1";
|
||||
this.txtSlot.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// label5
|
||||
// lblPlcSlot
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(462, 49);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(25, 13);
|
||||
this.label5.TabIndex = 8;
|
||||
this.label5.Text = "Slot";
|
||||
this.lblPlcSlot.AutoSize = true;
|
||||
this.lblPlcSlot.Location = new System.Drawing.Point(462, 49);
|
||||
this.lblPlcSlot.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblPlcSlot.Name = "lblPlcSlot";
|
||||
this.lblPlcSlot.Size = new System.Drawing.Size(25, 13);
|
||||
this.lblPlcSlot.TabIndex = 8;
|
||||
this.lblPlcSlot.Text = "Slot";
|
||||
//
|
||||
// txtRack
|
||||
//
|
||||
@@ -119,34 +119,34 @@
|
||||
this.txtRack.Text = "0";
|
||||
this.txtRack.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// label4
|
||||
// lblPlcRack
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(462, 23);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(33, 13);
|
||||
this.label4.TabIndex = 9;
|
||||
this.label4.Text = "Rack";
|
||||
this.lblPlcRack.AutoSize = true;
|
||||
this.lblPlcRack.Location = new System.Drawing.Point(462, 23);
|
||||
this.lblPlcRack.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblPlcRack.Name = "lblPlcRack";
|
||||
this.lblPlcRack.Size = new System.Drawing.Size(33, 13);
|
||||
this.lblPlcRack.TabIndex = 9;
|
||||
this.lblPlcRack.Text = "Rack";
|
||||
//
|
||||
// label3
|
||||
// lblPlcCpu
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(279, 49);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 13);
|
||||
this.label3.TabIndex = 7;
|
||||
this.label3.Text = "CPU Type";
|
||||
this.lblPlcCpu.AutoSize = true;
|
||||
this.lblPlcCpu.Location = new System.Drawing.Point(279, 49);
|
||||
this.lblPlcCpu.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblPlcCpu.Name = "lblPlcCpu";
|
||||
this.lblPlcCpu.Size = new System.Drawing.Size(56, 13);
|
||||
this.lblPlcCpu.TabIndex = 7;
|
||||
this.lblPlcCpu.Text = "CPU Type";
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsslApp,
|
||||
this.toolStripProgressBar1});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 236);
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 421);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(555, 22);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(658, 22);
|
||||
this.statusStrip1.TabIndex = 12;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
@@ -183,30 +183,30 @@
|
||||
this.txtLog.Location = new System.Drawing.Point(13, 82);
|
||||
this.txtLog.Multiline = true;
|
||||
this.txtLog.Name = "txtLog";
|
||||
this.txtLog.Size = new System.Drawing.Size(530, 151);
|
||||
this.txtLog.Size = new System.Drawing.Size(633, 336);
|
||||
this.txtLog.TabIndex = 14;
|
||||
this.txtLog.Text = "...";
|
||||
//
|
||||
// SiemensProxy
|
||||
// IOB_Exporter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(555, 258);
|
||||
this.ClientSize = new System.Drawing.Size(658, 443);
|
||||
this.Controls.Add(this.txtLog);
|
||||
this.Controls.Add(this.txtCpuType);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.txtSlot);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.lblPlcSlot);
|
||||
this.Controls.Add(this.txtRack);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.lblPlcRack);
|
||||
this.Controls.Add(this.lblPlcCpu);
|
||||
this.Controls.Add(this.txtIP);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.lblPlcIp);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.txtCsvPath);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "SiemensProxy";
|
||||
this.Text = "SiemensProxy";
|
||||
this.Name = "IOB_Exporter";
|
||||
this.Text = "MAPO IOB Exporter";
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
@@ -218,13 +218,13 @@
|
||||
|
||||
private System.Windows.Forms.TextBox txtCsvPath;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label lblPlcIp;
|
||||
private System.Windows.Forms.TextBox txtIP;
|
||||
private System.Windows.Forms.TextBox txtSlot;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label lblPlcSlot;
|
||||
private System.Windows.Forms.TextBox txtRack;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label lblPlcRack;
|
||||
private System.Windows.Forms.Label lblPlcCpu;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel tsslApp;
|
||||
private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;
|
||||
@@ -11,12 +11,12 @@ using System.Windows.Forms;
|
||||
|
||||
namespace MHT_Siemens
|
||||
{
|
||||
public partial class SiemensProxy : Form
|
||||
public partial class IOB_Exporter : Form
|
||||
{
|
||||
#region oggetti di base
|
||||
|
||||
/// <summary>
|
||||
/// configurazioen principale proxy
|
||||
/// configurazione principale proxy
|
||||
/// </summary>
|
||||
protected dataProxy currDataProxy;
|
||||
/// <summary>
|
||||
@@ -63,7 +63,7 @@ namespace MHT_Siemens
|
||||
|
||||
#region inizializazione
|
||||
|
||||
public SiemensProxy()
|
||||
public IOB_Exporter()
|
||||
{
|
||||
InitializeComponent();
|
||||
myInit();
|
||||
@@ -73,6 +73,9 @@ namespace MHT_Siemens
|
||||
{
|
||||
lg = LogManager.GetCurrentClassLogger();
|
||||
tsslApp.Text = $"{utils.CRS("appName")}";
|
||||
fixVisibility();
|
||||
|
||||
|
||||
prevValues = new Dictionary<string, string>();
|
||||
currValues = new Dictionary<string, string>();
|
||||
loadMemConf();
|
||||
@@ -81,6 +84,23 @@ namespace MHT_Siemens
|
||||
startSampleTimer();
|
||||
startCheckTimer();
|
||||
}
|
||||
|
||||
private void fixVisibility()
|
||||
{
|
||||
bool showParams = false;
|
||||
#if DEBUG
|
||||
showParams = true;
|
||||
#endif
|
||||
lblPlcIp.Visible = showParams;
|
||||
lblPlcCpu.Visible = showParams;
|
||||
lblPlcRack.Visible = showParams;
|
||||
lblPlcSlot.Visible = showParams;
|
||||
txtIP.Visible = showParams;
|
||||
txtCpuType.Visible = showParams;
|
||||
txtRack.Visible = showParams;
|
||||
txtSlot.Visible = showParams;
|
||||
}
|
||||
|
||||
private void startUiTimer()
|
||||
{
|
||||
uiTimer.Interval = 20;
|
||||
@@ -174,7 +194,7 @@ namespace MHT_Siemens
|
||||
currDataProxy = new dataProxy()
|
||||
{
|
||||
csvFilePath = @"c:\zz\prova1.csv",
|
||||
csvHasHeader = true,
|
||||
csvFileEnableWrite = true,
|
||||
csvSeparator = ';',
|
||||
confPLC = new connParam()
|
||||
{
|
||||
@@ -201,10 +221,10 @@ namespace MHT_Siemens
|
||||
txtSlot.Text = $"{currDataProxy.confPLC.slot}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region metodi ricorrenti
|
||||
#region metodi ricorrenti
|
||||
|
||||
|
||||
private void UiTimer_Tick(object sender, EventArgs e)
|
||||
@@ -251,9 +271,9 @@ namespace MHT_Siemens
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region helper methods
|
||||
#region helper methods
|
||||
|
||||
/// <summary>
|
||||
/// salva i dati sul PLC
|
||||
@@ -340,7 +360,7 @@ namespace MHT_Siemens
|
||||
{
|
||||
string currentLine;
|
||||
//se ha header salto la prima riga...
|
||||
if (currDataProxy.csvHasHeader)
|
||||
if (currDataProxy.csvFileEnableWrite)
|
||||
{
|
||||
if ((currentLine = sr.ReadLine()) == null)
|
||||
{
|
||||
@@ -506,6 +526,6 @@ namespace MHT_Siemens
|
||||
appenRTLog(contenuto);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -65,13 +65,14 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="connParam.cs" />
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="dataProxy.cs" />
|
||||
<Compile Include="memAddress.cs" />
|
||||
<Compile Include="SiemensProxy.cs">
|
||||
<Compile Include="IOB-Exporter.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SiemensProxy.Designer.cs">
|
||||
<DependentUpon>SiemensProxy.cs</DependentUpon>
|
||||
<Compile Include="IOB-Exporter.Designer.cs">
|
||||
<DependentUpon>IOB-Exporter.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -95,8 +96,8 @@
|
||||
<Content Include="NLog.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="SiemensProxy.resx">
|
||||
<DependentUpon>SiemensProxy.cs</DependentUpon>
|
||||
<EmbeddedResource Include="IOB-Exporter.resx">
|
||||
<DependentUpon>IOB-Exporter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="NLog.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
@@ -111,9 +112,9 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<None Include="setup.json">
|
||||
<EmbeddedResource Include="Config\setup.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
@@ -16,7 +16,7 @@ namespace MHT_Siemens
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new SiemensProxy());
|
||||
Application.Run(new IOB_Exporter());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,24 +11,16 @@ namespace MHT_Siemens
|
||||
/// </summary>
|
||||
public class dataProxy
|
||||
{
|
||||
/// <summary>
|
||||
/// Nome file da osservare
|
||||
/// </summary>
|
||||
public string csvFilePath { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Indica se il CSV abbia intestazione
|
||||
/// </summary>
|
||||
public bool csvHasHeader { get; set; } = true;
|
||||
/// <summary>
|
||||
/// Indica se il CSV abbia intestazione
|
||||
/// </summary>
|
||||
public char csvSeparator { get; set; } = ';';
|
||||
/// <summary>
|
||||
/// Configurazione PLC
|
||||
/// </summary>
|
||||
public connParam confPLC { get; set; }
|
||||
/// <summary>
|
||||
/// Elenco parametri
|
||||
/// Area memoria da usare come trigger x scrittura
|
||||
/// </summary>
|
||||
public string TriggerMemConf { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Elenco parametri da salvare
|
||||
/// </summary>
|
||||
public Dictionary<string, dataConf> parametersList { get; set; } = new Dictionary<string, dataConf>();
|
||||
}
|
||||
@@ -47,12 +39,16 @@ namespace MHT_Siemens
|
||||
/// </summary>
|
||||
public int Index { get; set; } = -1;
|
||||
/// <summary>
|
||||
/// Area memoria in cui inserire i dati
|
||||
/// Area memoria da cui leggere i dati
|
||||
/// </summary>
|
||||
public string MemConf { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Tipo di dati
|
||||
/// </summary>
|
||||
public string DataType { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Dimensione memoria in Byte
|
||||
/// </summary>
|
||||
public int memByteSize { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"csvFilePath": "c:\\zz\\prova1.csv",
|
||||
"csvHasHeader": true,
|
||||
"csvSeparator": ";",
|
||||
"confPLC": {
|
||||
"ipAdrr": "192.168.214.1",
|
||||
"tipoCpu": "S7300",
|
||||
"rack": 0,
|
||||
"slot": 2
|
||||
},
|
||||
"parametersList": {
|
||||
"DB701.DBD142": {
|
||||
"Column": "Valore assoluto",
|
||||
"Index": 7,
|
||||
"MemConf": "DB701.DBD142",
|
||||
"DataType": "real"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"csvFilePath": "c:\\zz\\prova1.csv",
|
||||
"csvHasHeader": true,
|
||||
"csvSeparator": ";",
|
||||
"confPLC": {
|
||||
"ipAdrr": "192.168.0.102",
|
||||
"tipoCpu": "S71500",
|
||||
"rack": 0,
|
||||
"slot": 1
|
||||
},
|
||||
"parametersList": {
|
||||
"DB999.DBD32": {
|
||||
"Column": "Valore assoluto",
|
||||
"Index": 7,
|
||||
"MemConf": "DB999.DBD32",
|
||||
"DataType": "real"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"csvFilePath": "c:\\zz\\prova1.csv",
|
||||
"csvHasHeader": true,
|
||||
"csvSeparator": ";",
|
||||
"confPLC": {
|
||||
"ipAdrr": "192.168.0.102",
|
||||
"tipoCpu": "S71500",
|
||||
"rack": 0,
|
||||
"slot": 1
|
||||
},
|
||||
"parametersList": {
|
||||
"DB999.DBD32": {
|
||||
"Column": "Valore assoluto",
|
||||
"Index": 7,
|
||||
"MemConf": "DB999.DBD32",
|
||||
"DataType": "real"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30002.166
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-FILE-EXP", "IOB-WIN-FILE-EXP\IOB-WIN-FILE-EXP.csproj", "{958CB938-3860-49D3-8B16-15ED0E9FE2FB}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB.WIN.FileExp", "IOB-WIN-FILE-EXP\IOB.WIN.FileExp.csproj", "{958CB938-3860-49D3-8B16-15ED0E9FE2FB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -1,3 +1,25 @@
|
||||
# MAPO IOB WIN File Exp
|
||||
|
||||
Adapter MAPO IOB WIn per l'export in formato CSV da PLC
|
||||
Adapter MAPO IOB Win per l'export in formato CSV da PLC
|
||||
|
||||
## Versioni
|
||||
|
||||
Vers | Data | Note
|
||||
---------|----------|---------
|
||||
1.0.* | 2020.07.02 | Prima release per Torri MTH x sostituzione vecchio sw con export 8 variabili CABLATE
|
||||
|
||||
## Terminologia
|
||||
|
||||
|
||||
Termine | Descrizione
|
||||
---------|----------
|
||||
**PLC** | Generico PLC di comunicazione (Es SIEMENS, ...)
|
||||
Adapter | Software dedicato a interazione con PLC
|
||||
|
||||
## Descrizione
|
||||
|
||||
Macrofunzionalità
|
||||
|
||||
* Gestione lettura periodica da PLC (SIEMENS x partire)
|
||||
* Verifica periodica evento (bit segnalazione richiesta salvataggio)
|
||||
* Lettura memorie e salvataggio su CSV dei dati cablati (conf in )
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user