Lettura Char[] su TestS7

This commit is contained in:
Samuele Locatelli
2021-09-23 17:10:22 +02:00
parent 0cb0997447
commit 0f8fdce5b3
2 changed files with 46 additions and 45 deletions
+12 -11
View File
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<appSettings>
<add key="appName" value="S7.Test"/>
<!--conf file-->
<add key="dataPath" value="DATA"/>
<add key="dataConfPath" value="DATA\CONF"/>
<add key="dataDatPath" value="DATA\DAT"/>
<add key="MMapR" value="MMapR.map"/>
<add key="MMapW" value="MMapW.map"/>
<add key="charSep" value="|"/>
</appSettings>
<appSettings>
<add key="appName" value="S7.Test" />
<!--conf file-->
<add key="verbose" value="false" />
<add key="dataPath" value="DATA" />
<add key="dataConfPath" value="DATA\CONF" />
<add key="dataDatPath" value="DATA\DAT" />
<add key="MMapR" value="MMapR.map" />
<add key="MMapW" value="MMapW.map" />
<add key="charSep" value="|" />
</appSettings>
</configuration>
+34 -34
View File
@@ -37,6 +37,7 @@
this.label3 = new System.Windows.Forms.Label();
this.txtMemSize = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnReadChar = new System.Windows.Forms.Button();
this.btnReadString = new System.Windows.Forms.Button();
this.btnReadDWord = new System.Windows.Forms.Button();
this.btnReadWord = new System.Windows.Forms.Button();
@@ -58,6 +59,7 @@
this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
this.tslRTime = new System.Windows.Forms.ToolStripStatusLabel();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.btnCharWrite = new System.Windows.Forms.Button();
this.btnNumWriteReal = new System.Windows.Forms.Button();
this.btnStrWrite = new System.Windows.Forms.Button();
this.btnNumWriteB = new System.Windows.Forms.Button();
@@ -71,8 +73,6 @@
this.label10 = new System.Windows.Forms.Label();
this.txtWriteAddr1 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.btnCharWrite = new System.Windows.Forms.Button();
this.btnReadChar = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -85,9 +85,9 @@
this.txtIP.Location = new System.Drawing.Point(64, 19);
this.txtIP.Margin = new System.Windows.Forms.Padding(2);
this.txtIP.Name = "txtIP";
this.txtIP.Size = new System.Drawing.Size(83, 20);
this.txtIP.Size = new System.Drawing.Size(99, 20);
this.txtIP.TabIndex = 0;
this.txtIP.Text = "192.168.0.51";
this.txtIP.Text = "127.0.0.1";
this.txtIP.TextChanged += new System.EventHandler(this.txtIP_TextChanged);
//
// lblIP
@@ -112,7 +112,7 @@
this.cbCpuType.Location = new System.Drawing.Point(64, 50);
this.cbCpuType.Margin = new System.Windows.Forms.Padding(2);
this.cbCpuType.Name = "cbCpuType";
this.cbCpuType.Size = new System.Drawing.Size(83, 21);
this.cbCpuType.Size = new System.Drawing.Size(99, 21);
this.cbCpuType.TabIndex = 2;
this.cbCpuType.Text = "S7300";
this.cbCpuType.SelectedIndexChanged += new System.EventHandler(this.cbCpuType_SelectedIndexChanged);
@@ -192,6 +192,17 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Memoria: READ param";
//
// btnReadChar
//
this.btnReadChar.Location = new System.Drawing.Point(104, 74);
this.btnReadChar.Margin = new System.Windows.Forms.Padding(2);
this.btnReadChar.Name = "btnReadChar";
this.btnReadChar.Size = new System.Drawing.Size(76, 20);
this.btnReadChar.TabIndex = 12;
this.btnReadChar.Text = "R Char[]";
this.btnReadChar.UseVisualStyleBackColor = true;
this.btnReadChar.Click += new System.EventHandler(this.btnReadChar_Click);
//
// btnReadString
//
this.btnReadString.Location = new System.Drawing.Point(10, 74);
@@ -318,18 +329,18 @@
this.textBox2.BackColor = System.Drawing.SystemColors.Menu;
this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox2.Location = new System.Drawing.Point(226, 31);
this.textBox2.Location = new System.Drawing.Point(240, 31);
this.textBox2.Margin = new System.Windows.Forms.Padding(2);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(105, 44);
this.textBox2.Size = new System.Drawing.Size(91, 44);
this.textBox2.TabIndex = 7;
this.textBox2.Text = "S7-1200/S7-1500: 0/0\r\nS7-300/S7-400: 0/2\r\nSlot > 0 se eth ext";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(226, 11);
this.label6.Location = new System.Drawing.Point(236, 11);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(91, 13);
@@ -338,7 +349,7 @@
//
// txtSlot
//
this.txtSlot.Location = new System.Drawing.Point(190, 50);
this.txtSlot.Location = new System.Drawing.Point(201, 50);
this.txtSlot.Margin = new System.Windows.Forms.Padding(2);
this.txtSlot.Name = "txtSlot";
this.txtSlot.Size = new System.Drawing.Size(32, 20);
@@ -349,7 +360,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(156, 52);
this.label5.Location = new System.Drawing.Point(167, 52);
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);
@@ -358,7 +369,7 @@
//
// txtRack
//
this.txtRack.Location = new System.Drawing.Point(190, 19);
this.txtRack.Location = new System.Drawing.Point(201, 19);
this.txtRack.Margin = new System.Windows.Forms.Padding(2);
this.txtRack.Name = "txtRack";
this.txtRack.Size = new System.Drawing.Size(32, 20);
@@ -369,7 +380,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(156, 21);
this.label4.Location = new System.Drawing.Point(167, 21);
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);
@@ -441,6 +452,17 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Memoria: WRITE param";
//
// btnCharWrite
//
this.btnCharWrite.Location = new System.Drawing.Point(548, 32);
this.btnCharWrite.Margin = new System.Windows.Forms.Padding(2);
this.btnCharWrite.Name = "btnCharWrite";
this.btnCharWrite.Size = new System.Drawing.Size(79, 24);
this.btnCharWrite.TabIndex = 12;
this.btnCharWrite.Text = "W Char[]";
this.btnCharWrite.UseVisualStyleBackColor = true;
this.btnCharWrite.Click += new System.EventHandler(this.btnCharWrite_Click);
//
// btnNumWriteReal
//
this.btnNumWriteReal.Location = new System.Drawing.Point(258, 13);
@@ -577,28 +599,6 @@
this.label7.TabIndex = 7;
this.label7.Text = "ADDR 1";
//
// btnCharWrite
//
this.btnCharWrite.Location = new System.Drawing.Point(548, 32);
this.btnCharWrite.Margin = new System.Windows.Forms.Padding(2);
this.btnCharWrite.Name = "btnCharWrite";
this.btnCharWrite.Size = new System.Drawing.Size(79, 24);
this.btnCharWrite.TabIndex = 12;
this.btnCharWrite.Text = "W Char[]";
this.btnCharWrite.UseVisualStyleBackColor = true;
this.btnCharWrite.Click += new System.EventHandler(this.btnCharWrite_Click);
//
// btnReadChar
//
this.btnReadChar.Location = new System.Drawing.Point(104, 74);
this.btnReadChar.Margin = new System.Windows.Forms.Padding(2);
this.btnReadChar.Name = "btnReadChar";
this.btnReadChar.Size = new System.Drawing.Size(76, 20);
this.btnReadChar.TabIndex = 12;
this.btnReadChar.Text = "R Char[]";
this.btnReadChar.UseVisualStyleBackColor = true;
this.btnReadChar.Click += new System.EventHandler(this.btnReadChar_Click);
//
// TestMainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);