..
This commit is contained in:
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project.ViewForm
|
||||
{
|
||||
@@ -28,7 +29,7 @@ namespace Project.ViewForm
|
||||
private void fAuto_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuto1.dev_agv = PUB.AGV;
|
||||
ctlAuto1.dev_plc = PUB.PLC;
|
||||
// ctlAuto1.dev_plc = PUB.PLC;
|
||||
ctlAuto1.dev_bms = PUB.BMS;
|
||||
ctlAuto1.dev_xbe = PUB.XBE;
|
||||
this.timer1.Start();
|
||||
@@ -40,7 +41,7 @@ namespace Project.ViewForm
|
||||
{
|
||||
PUB.log.Add("ui reset click");
|
||||
PUB.AGV.AGVErrorReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Sm_StepChanged(object sender, StepChangeEventArgs e)
|
||||
@@ -52,7 +53,7 @@ namespace Project.ViewForm
|
||||
}
|
||||
|
||||
private void FAuto_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
{
|
||||
timer1.Stop();
|
||||
PUB.sm.StepChanged -= Sm_StepChanged;
|
||||
this.ctlAuto1.ButtonClick -= CtlAuto1_ButtonClick;
|
||||
@@ -67,21 +68,13 @@ namespace Project.ViewForm
|
||||
|
||||
this.ctlAuto1.OnUpdateMode = true;
|
||||
|
||||
//lbBatteryLevel.Text = $"{PUB.BMS.Current_Level}%";
|
||||
//lbBatteryLevel.ProgressValue = PUB.BMS.Current_Level;
|
||||
|
||||
if(this.ctlAuto1.Scean == CtlAuto.eScean.Progress)
|
||||
if (this.ctlAuto1.Scean == CtlAuto.eScean.Progress)
|
||||
{
|
||||
ctlAuto1.ProgressVal = PUB.Result.SMSG_ProgressValue;
|
||||
ctlAuto1.ProgressMax = PUB.Result.SMSG_ProgressMax;
|
||||
ctlAuto1.StatusMessage = VAR.STR?.Get(eVarString.StatusMessage) ?? string.Empty;
|
||||
}
|
||||
|
||||
//if(Pub.Result.StopMessagePLC.StartsWith()
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_EMG) == true)
|
||||
this.ctlAuto1.StopMessage = PUB.Result.StopMessagePLC;
|
||||
else
|
||||
this.ctlAuto1.StopMessage = string.Empty;
|
||||
this.ctlAuto1.StopMessage = string.Empty;
|
||||
|
||||
if (PUB.sm.Step == StateMachine.eSMStep.RUN)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using AR;
|
||||
using COMM;
|
||||
|
||||
namespace Project.ViewForm
|
||||
|
||||
180
Cs_HMI/Project/ViewForm/fIO.Designer.cs
generated
180
Cs_HMI/Project/ViewForm/fIO.Designer.cs
generated
@@ -29,28 +29,29 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
arFrame.Control.ColorListItem colorListItem1 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem2 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem3 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem4 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem5 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem6 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem7 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem8 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem25 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem26 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem27 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem28 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem29 = new arFrame.Control.ColorListItem();
|
||||
arFrame.Control.ColorListItem colorListItem30 = new arFrame.Control.ColorListItem();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fIO));
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.HWState = new arFrame.Control.GridView();
|
||||
this.tblMain = new arFrame.Control.GridView();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.button4 = new System.Windows.Forms.Button();
|
||||
this.button5 = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -59,8 +60,8 @@
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.HWState, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tblMain, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel3, 0, 1);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
@@ -68,38 +69,38 @@
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 58F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(957, 583);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1056, 583);
|
||||
this.tableLayoutPanel1.TabIndex = 5;
|
||||
//
|
||||
// HWState
|
||||
//
|
||||
this.HWState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
|
||||
this.HWState.BorderSize = 0;
|
||||
colorListItem1.BackColor1 = System.Drawing.Color.Gray;
|
||||
colorListItem1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100)))));
|
||||
colorListItem1.Remark = "타이틀바(상)";
|
||||
colorListItem2.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
colorListItem2.Remark = "상태표시(하)";
|
||||
colorListItem3.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem3.BackColor2 = System.Drawing.Color.Lime;
|
||||
colorListItem3.Remark = "정상";
|
||||
colorListItem4.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem4.BackColor2 = System.Drawing.Color.Red;
|
||||
colorListItem4.Remark = "오류";
|
||||
colorListItem5.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem5.BackColor2 = System.Drawing.Color.Yellow;
|
||||
colorListItem5.Remark = "오류(깜박)";
|
||||
colorListItem6.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem6.BackColor2 = System.Drawing.Color.DarkViolet;
|
||||
colorListItem6.Remark = "오류(유효)";
|
||||
colorListItem25.BackColor1 = System.Drawing.Color.Gray;
|
||||
colorListItem25.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100)))));
|
||||
colorListItem25.Remark = "타이틀바(상)";
|
||||
colorListItem26.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem26.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
colorListItem26.Remark = "상태표시(하)";
|
||||
colorListItem27.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem27.BackColor2 = System.Drawing.Color.Lime;
|
||||
colorListItem27.Remark = "정상";
|
||||
colorListItem28.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem28.BackColor2 = System.Drawing.Color.Red;
|
||||
colorListItem28.Remark = "오류";
|
||||
colorListItem29.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem29.BackColor2 = System.Drawing.Color.Yellow;
|
||||
colorListItem29.Remark = "오류(깜박)";
|
||||
colorListItem30.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
colorListItem30.BackColor2 = System.Drawing.Color.DarkViolet;
|
||||
colorListItem30.Remark = "오류(유효)";
|
||||
this.HWState.ColorList = new arFrame.Control.ColorListItem[] {
|
||||
colorListItem1,
|
||||
colorListItem2,
|
||||
colorListItem3,
|
||||
colorListItem4,
|
||||
colorListItem5,
|
||||
colorListItem6};
|
||||
colorListItem25,
|
||||
colorListItem26,
|
||||
colorListItem27,
|
||||
colorListItem28,
|
||||
colorListItem29,
|
||||
colorListItem30};
|
||||
this.HWState.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.HWState.Font = new System.Drawing.Font("Consolas", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.HWState.FontPin = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
@@ -107,7 +108,7 @@
|
||||
this.HWState.ForeColorPin = System.Drawing.Color.Moccasin;
|
||||
this.HWState.Location = new System.Drawing.Point(0, 525);
|
||||
this.HWState.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.HWState.MatrixSize = new System.Drawing.Point(4, 2);
|
||||
this.HWState.MatrixSize = new System.Drawing.Point(3, 2);
|
||||
this.HWState.MenuBorderSize = 1;
|
||||
this.HWState.MenuGap = 5;
|
||||
this.HWState.MinimumSize = new System.Drawing.Size(100, 0);
|
||||
@@ -128,61 +129,21 @@
|
||||
this.HWState.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
|
||||
this.HWState.showDebugInfo = false;
|
||||
this.HWState.ShowIndexString = false;
|
||||
this.HWState.Size = new System.Drawing.Size(957, 58);
|
||||
this.HWState.Size = new System.Drawing.Size(1056, 58);
|
||||
this.HWState.TabIndex = 9;
|
||||
this.HWState.Tags = null;
|
||||
this.HWState.Text = "gridView3";
|
||||
this.HWState.TextAttachToImage = true;
|
||||
this.HWState.Titles = new string[] {
|
||||
"AGV|XBE|PLC|BAT|",
|
||||
"C00|C00|C00|C00|"};
|
||||
"AGV|XBE|BAT|",
|
||||
"C00|C00|C00|"};
|
||||
this.HWState.Values = new ushort[] {
|
||||
((ushort)(0)),
|
||||
((ushort)(0)),
|
||||
((ushort)(0)),
|
||||
((ushort)(0)),
|
||||
((ushort)(1)),
|
||||
((ushort)(1)),
|
||||
((ushort)(1)),
|
||||
((ushort)(1))};
|
||||
//
|
||||
// tblMain
|
||||
//
|
||||
this.tblMain.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100)))));
|
||||
this.tblMain.BorderSize = 1;
|
||||
colorListItem7.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
|
||||
colorListItem7.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||
colorListItem7.Remark = "";
|
||||
colorListItem8.BackColor1 = System.Drawing.Color.Orange;
|
||||
colorListItem8.BackColor2 = System.Drawing.Color.DarkOrange;
|
||||
colorListItem8.Remark = "";
|
||||
this.tblMain.ColorList = new arFrame.Control.ColorListItem[] {
|
||||
colorListItem7,
|
||||
colorListItem8};
|
||||
this.tblMain.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.tblMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tblMain.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tblMain.FontPin = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold);
|
||||
this.tblMain.ForeColor = System.Drawing.Color.White;
|
||||
this.tblMain.ForeColorPin = System.Drawing.Color.WhiteSmoke;
|
||||
this.tblMain.Location = new System.Drawing.Point(3, 23);
|
||||
this.tblMain.MatrixSize = new System.Drawing.Point(8, 4);
|
||||
this.tblMain.MenuBorderSize = 1;
|
||||
this.tblMain.MenuGap = 5;
|
||||
this.tblMain.MinimumSize = new System.Drawing.Size(100, 50);
|
||||
this.tblMain.Name = "tblMain";
|
||||
this.tblMain.Names = null;
|
||||
this.tblMain.ShadowColor = System.Drawing.Color.Black;
|
||||
this.tblMain.showDebugInfo = false;
|
||||
this.tblMain.ShowIndexString = true;
|
||||
this.tblMain.Size = new System.Drawing.Size(951, 499);
|
||||
this.tblMain.TabIndex = 4;
|
||||
this.tblMain.Tags = null;
|
||||
this.tblMain.Text = "gridView1";
|
||||
this.tblMain.TextAttachToImage = true;
|
||||
this.tblMain.Titles = null;
|
||||
this.tblMain.Values = null;
|
||||
this.tblMain.ItemClick += new System.EventHandler<arFrame.Control.GridView.ItemClickEventArgs>(this.tblIn1_ItemClick);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
@@ -191,7 +152,7 @@
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(951, 14);
|
||||
this.panel1.Size = new System.Drawing.Size(1050, 14);
|
||||
this.panel1.TabIndex = 6;
|
||||
//
|
||||
// label1
|
||||
@@ -200,7 +161,7 @@
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(551, 14);
|
||||
this.label1.Size = new System.Drawing.Size(650, 14);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "label1";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
@@ -209,17 +170,23 @@
|
||||
//
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||
this.label3.Location = new System.Drawing.Point(551, 0);
|
||||
this.label3.Location = new System.Drawing.Point(650, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(400, 14);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "label3";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// timer1
|
||||
// panel3
|
||||
//
|
||||
this.timer1.Interval = 200;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
this.panel3.Controls.Add(this.button5);
|
||||
this.panel3.Controls.Add(this.button4);
|
||||
this.panel3.Controls.Add(this.panel2);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel3.Location = new System.Drawing.Point(3, 23);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(1050, 499);
|
||||
this.panel3.TabIndex = 10;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
@@ -227,10 +194,9 @@
|
||||
this.panel2.Controls.Add(this.button2);
|
||||
this.panel2.Controls.Add(this.button3);
|
||||
this.panel2.Controls.Add(this.button1);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.panel2.Location = new System.Drawing.Point(957, 0);
|
||||
this.panel2.Location = new System.Drawing.Point(925, 15);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(99, 583);
|
||||
this.panel2.Size = new System.Drawing.Size(99, 315);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// button2
|
||||
@@ -239,7 +205,7 @@
|
||||
this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image")));
|
||||
this.button2.Location = new System.Drawing.Point(0, 100);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(99, 383);
|
||||
this.button2.Size = new System.Drawing.Size(99, 115);
|
||||
this.button2.TabIndex = 1;
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
@@ -248,7 +214,7 @@
|
||||
//
|
||||
this.button3.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.button3.Image = ((System.Drawing.Image)(resources.GetObject("button3.Image")));
|
||||
this.button3.Location = new System.Drawing.Point(0, 483);
|
||||
this.button3.Location = new System.Drawing.Point(0, 215);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(99, 100);
|
||||
this.button3.TabIndex = 2;
|
||||
@@ -266,13 +232,37 @@
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 200;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// button4
|
||||
//
|
||||
this.button4.Location = new System.Drawing.Point(726, 53);
|
||||
this.button4.Name = "button4";
|
||||
this.button4.Size = new System.Drawing.Size(134, 100);
|
||||
this.button4.TabIndex = 7;
|
||||
this.button4.Text = "Magnet On";
|
||||
this.button4.UseVisualStyleBackColor = true;
|
||||
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||
//
|
||||
// button5
|
||||
//
|
||||
this.button5.Location = new System.Drawing.Point(726, 159);
|
||||
this.button5.Name = "button5";
|
||||
this.button5.Size = new System.Drawing.Size(134, 100);
|
||||
this.button5.TabIndex = 8;
|
||||
this.button5.Text = "Magnet Off";
|
||||
this.button5.UseVisualStyleBackColor = true;
|
||||
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||
//
|
||||
// fIO
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.ClientSize = new System.Drawing.Size(1056, 583);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "fIO";
|
||||
this.Text = "fIO";
|
||||
@@ -280,14 +270,13 @@
|
||||
this.VisibleChanged += new System.EventHandler(this.fIO_VisibleChanged);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private arFrame.Control.GridView tblMain;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
@@ -298,5 +287,8 @@
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.Button button4;
|
||||
private System.Windows.Forms.Button button5;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,6 @@ namespace Project.ViewForm
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
tblMain.SuspendLayout();
|
||||
|
||||
//이름설정 INput #1
|
||||
List<string> namearray = new List<string>(32);
|
||||
@@ -50,25 +49,17 @@ namespace Project.ViewForm
|
||||
}
|
||||
namearray.Add(flagName);
|
||||
}
|
||||
this.tblMain.setTitle(namearray.ToArray());
|
||||
this.tblMain.setTag(tagarray.ToArray());
|
||||
this.tblMain.setItemTextAlign(ContentAlignment.BottomLeft);
|
||||
|
||||
////값설정
|
||||
//List<Boolean> fgValueM = new List<bool>();
|
||||
//List<Boolean> fgValueS = new List<bool>();
|
||||
|
||||
////mainplc
|
||||
//for (byte i = 0; i < 16; i++)
|
||||
// fgValueM.Add(PUB.PLC.GetValueI(i));
|
||||
//for (byte i = 0; i < 16; i++)
|
||||
// fgValueM.Add(PUB.PLC.GetValueO(i));
|
||||
|
||||
//값설정
|
||||
List<Boolean> fgValueM = new List<bool>();
|
||||
List<Boolean> fgValueS = new List<bool>();
|
||||
|
||||
//mainplc
|
||||
for (byte i = 0; i < 16; i++)
|
||||
fgValueM.Add(PUB.PLC.GetValueI(i));
|
||||
for (byte i = 0; i < 16; i++)
|
||||
fgValueM.Add(PUB.PLC.GetValueO(i));
|
||||
|
||||
|
||||
|
||||
tblMain.setValue(fgValueM.ToArray());
|
||||
tblMain.ResumeLayout();
|
||||
|
||||
this.FormClosed += FIO_FormClosed;
|
||||
UpdateControl();
|
||||
@@ -85,8 +76,8 @@ namespace Project.ViewForm
|
||||
if (PUB.XBE.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4);
|
||||
else HWState.setValue(rownum, colIdx++, 2); //
|
||||
|
||||
if (PUB.PLC.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4);
|
||||
else HWState.setValue(rownum, colIdx++, 2); //
|
||||
//if (PUB.PLC.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4);
|
||||
//else HWState.setValue(rownum, colIdx++, 2); //
|
||||
|
||||
if (PUB.BMS.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4);
|
||||
else HWState.setValue(rownum, colIdx++, 2); //
|
||||
@@ -103,13 +94,13 @@ namespace Project.ViewForm
|
||||
var colIdx = 0;
|
||||
HWState.setTitle(0, colIdx++, "AGV");
|
||||
HWState.setTitle(0, colIdx++, "XBE");
|
||||
HWState.setTitle(0, colIdx++, "PLC");
|
||||
//HWState.setTitle(0, colIdx++, "PLC");
|
||||
HWState.setTitle(0, colIdx++, "BAT");
|
||||
|
||||
colIdx = 0;
|
||||
HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_AGV);
|
||||
HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_XBE);
|
||||
HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_PLC);
|
||||
//HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_PLC);
|
||||
HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_BAT);
|
||||
|
||||
HWState.Invalidate();
|
||||
@@ -126,27 +117,7 @@ namespace Project.ViewForm
|
||||
}
|
||||
|
||||
|
||||
private void tblIn1_ItemClick(object sender, arFrame.Control.GridView.ItemClickEventArgs e)
|
||||
{
|
||||
var dataIndex = (byte)e.idx;
|
||||
if (dataIndex >= 16)
|
||||
{
|
||||
var ctl = sender as arFrame.Control.GridView;
|
||||
var pinNoStr = ctl.Tags[e.idx];
|
||||
if (pinNoStr.isEmpty() == true)
|
||||
{
|
||||
Util.MsgE("해당 포트는 핀번호가 설정되지 않았습니다", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
var pinNo = byte.Parse(pinNoStr);
|
||||
var curVal = PUB.PLC.GetValueO((byte)(dataIndex - 16));
|
||||
PUB.PLC.SetOutput(pinNo, !curVal);// .Sendcommand(Device.PLC1.eCommand.SET_DOUTPUT, pinNo, newval);
|
||||
}
|
||||
}
|
||||
else Util.MsgE("해당 주소는 허용되지 않습니다.", true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool tmrun = false;
|
||||
@@ -156,24 +127,11 @@ namespace Project.ViewForm
|
||||
if (tmrun == true) return;
|
||||
tmrun = true;
|
||||
|
||||
label1.Text = string.Format("{0} / {1}",
|
||||
PUB.PLC.ioBinStr, PUB.PLC.SetupStr);
|
||||
label3.Text = PUB.PLC.LastMessage;
|
||||
|
||||
Update_HWStatus();
|
||||
|
||||
List<Boolean> fgValueM = new List<bool>();
|
||||
List<Boolean> fgValueS = new List<bool>();
|
||||
|
||||
//mainplc
|
||||
for (byte i = 0; i < 16; i++)
|
||||
this.tblMain.setValue(i, PUB.PLC.GetValueI(i));
|
||||
|
||||
for (byte i = 0; i < 16; i++)
|
||||
this.tblMain.setValue(i + 16, PUB.PLC.GetValueO(i));
|
||||
|
||||
|
||||
this.tblMain.Invalidate();
|
||||
|
||||
tmrun = false;
|
||||
}
|
||||
@@ -187,18 +145,28 @@ namespace Project.ViewForm
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up);
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
|
||||
}
|
||||
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Stop);
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.STP);
|
||||
}
|
||||
|
||||
private void button3_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN);
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.ON);
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.OFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="button2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
@@ -211,4 +208,7 @@
|
||||
iAXpTl+ARH8vfFW5YszxNxI+Afqdj2aEL3vaoNP9AxkclDhe7/QIAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -7,6 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using AR;
|
||||
using arDev;
|
||||
using COMM;
|
||||
|
||||
@@ -330,25 +331,7 @@ namespace Project.ViewForm
|
||||
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
PUB.AGV.AGVCommand("SCK", "0010");
|
||||
}
|
||||
|
||||
private void button2_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Stop);
|
||||
}
|
||||
|
||||
private void button3_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up);
|
||||
}
|
||||
|
||||
private void button4_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);
|
||||
}
|
||||
|
||||
|
||||
private void arLabel1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user