This commit is contained in:
atvstdla
2025-09-25 08:23:36 +09:00
parent ee122a6daf
commit a34dbecfb9
10 changed files with 1574 additions and 1584 deletions

View File

@@ -62,7 +62,7 @@ namespace Project.Device
_isopen = true;
return _isopen;
}
catch { _isopen = false; return false; }
catch(Exception ex) { _isopen = false; return false; }
}
private string ControlCharReplace(string data)
@@ -219,7 +219,7 @@ namespace Project.Device
// PUB.log.Add($"SATO Recv : " + e.StrValue);
//}
public Boolean TestPrint(Boolean drawbox, string manu = "", string mfgdate = "")
public (Boolean result, string errmessage) TestPrint(Boolean drawbox, string manu = "", string mfgdate = "")
{
var dtstr = DateTime.Now.ToShortDateString();
var printcode = "103077807;Z577603504;105-35282-1105;15000;RC00004A219001W;20210612";
@@ -243,7 +243,7 @@ namespace Project.Device
}
public Boolean Print(Class.Reel reel, Boolean display1drid, Boolean drawOUtBox)
public (Boolean result, string errmessage) Print(Class.Reel reel, Boolean display1drid, Boolean drawOUtBox)
{
string prtData;
prtData = makeZPL_210908(reel, drawOUtBox, out qrData);
@@ -251,19 +251,18 @@ namespace Project.Device
return Print(prtData);
}
public bool Print(string _zpl)
public (Boolean result, string errmessage) Print(string _zpl)
{
this.LastPrintZPL = _zpl;
//if (this.IsOpen == false) return false;
try
{
byte[] cmddata = Utils.StringToByteArray(ControlCharReplace(_zpl));
SATOPrinter.Send(cmddata);
return true;
return (true,"");
}
catch (Exception ex)
{
return false;
return (false,ex.Message);
}
}

View File

@@ -231,7 +231,7 @@ namespace Project
}
catch (Exception ex)
{
PUB.log.AddE($"Printer(L) {ex.Message}");
}
}
else
@@ -260,7 +260,9 @@ namespace Project
PUB.PrinterR.Open();
PrintRConTime = DateTime.Now;
}
catch (Exception ex) { }
catch (Exception ex) {
PUB.log.AddE($"Printer(R) {ex.Message}");
}
}
else
{

View File

@@ -31,21 +31,33 @@
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Model_Motion));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.ds1 = new Project.DataSet1();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.dvPosition = new arCtl.arDatagridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pidx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MotIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PosIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.posTitleDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btPos = new System.Windows.Forms.DataGridViewButtonColumn();
this.btspeed = new System.Windows.Forms.DataGridViewButtonColumn();
this.btacc = new System.Windows.Forms.DataGridViewButtonColumn();
this.btdcc = new System.Windows.Forms.DataGridViewButtonColumn();
this.btGo = new System.Windows.Forms.DataGridViewButtonColumn();
this.btSet = new System.Windows.Forms.DataGridViewButtonColumn();
this.bsPosData = new System.Windows.Forms.BindingSource(this.components);
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
@@ -135,18 +147,6 @@
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton11 = new System.Windows.Forms.ToolStripSplitButton();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pidx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MotIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PosIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.posTitleDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btPos = new System.Windows.Forms.DataGridViewButtonColumn();
this.btspeed = new System.Windows.Forms.DataGridViewButtonColumn();
this.btacc = new System.Windows.Forms.DataGridViewButtonColumn();
this.btdcc = new System.Windows.Forms.DataGridViewButtonColumn();
this.btGo = new System.Windows.Forms.DataGridViewButtonColumn();
this.btSet = new System.Windows.Forms.DataGridViewButtonColumn();
((System.ComponentModel.ISupportInitialize)(this.ds1)).BeginInit();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
@@ -236,7 +236,7 @@
this.dvPosition.DataSource = this.bsPosData;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle6.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle6.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
@@ -265,6 +265,135 @@
this.dvPosition.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.arDatagridView2_CellClick);
this.dvPosition.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dvPosition_DataError);
//
// Column1
//
this.Column1.DataPropertyName = "idx";
this.Column1.HeaderText = "idx";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Visible = false;
this.Column1.Width = 33;
//
// pidx
//
this.pidx.DataPropertyName = "pidx";
this.pidx.HeaderText = "pidx";
this.pidx.Name = "pidx";
this.pidx.ReadOnly = true;
this.pidx.Visible = false;
this.pidx.Width = 41;
//
// MotIndex
//
this.MotIndex.DataPropertyName = "MotIndex";
this.MotIndex.HeaderText = "MotIndex";
this.MotIndex.Name = "MotIndex";
this.MotIndex.ReadOnly = true;
this.MotIndex.Visible = false;
this.MotIndex.Width = 74;
//
// PosIndex
//
this.PosIndex.DataPropertyName = "PosIndex";
this.PosIndex.HeaderText = "PosIndex";
this.PosIndex.Name = "PosIndex";
this.PosIndex.ReadOnly = true;
this.PosIndex.Visible = false;
this.PosIndex.Width = 71;
//
// posTitleDataGridViewTextBoxColumn1
//
this.posTitleDataGridViewTextBoxColumn1.DataPropertyName = "PosTitle";
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
this.posTitleDataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle1;
this.posTitleDataGridViewTextBoxColumn1.HeaderText = "Title";
this.posTitleDataGridViewTextBoxColumn1.Name = "posTitleDataGridViewTextBoxColumn1";
this.posTitleDataGridViewTextBoxColumn1.ReadOnly = true;
this.posTitleDataGridViewTextBoxColumn1.Width = 61;
//
// Description
//
this.Description.DataPropertyName = "Description";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.Font = new System.Drawing.Font("맑은 고딕", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.Description.DefaultCellStyle = dataGridViewCellStyle2;
this.Description.HeaderText = "Description";
this.Description.Name = "Description";
this.Description.ReadOnly = true;
this.Description.Width = 103;
//
// btPos
//
this.btPos.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btPos.DataPropertyName = "Position";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Format = "N3";
this.btPos.DefaultCellStyle = dataGridViewCellStyle3;
this.btPos.HeaderText = "Position";
this.btPos.Name = "btPos";
this.btPos.ReadOnly = true;
this.btPos.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btPos.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// btspeed
//
this.btspeed.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btspeed.DataPropertyName = "Speed";
this.btspeed.HeaderText = "Speed";
this.btspeed.Name = "btspeed";
this.btspeed.ReadOnly = true;
this.btspeed.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btspeed.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.btspeed.Width = 50;
//
// btacc
//
this.btacc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btacc.DataPropertyName = "SpeedAcc";
this.btacc.HeaderText = "Acc";
this.btacc.Name = "btacc";
this.btacc.ReadOnly = true;
this.btacc.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btacc.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.btacc.Text = "Acc";
this.btacc.Width = 50;
//
// btdcc
//
this.btdcc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btdcc.DataPropertyName = "SpeedDcc";
this.btdcc.HeaderText = "Dcc";
this.btdcc.Name = "btdcc";
this.btdcc.ReadOnly = true;
this.btdcc.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btdcc.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.btdcc.Text = "Dcc";
this.btdcc.Width = 50;
//
// btGo
//
this.btGo.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
this.btGo.DefaultCellStyle = dataGridViewCellStyle4;
this.btGo.HeaderText = "Go";
this.btGo.Name = "btGo";
this.btGo.ReadOnly = true;
this.btGo.Text = "Go";
this.btGo.Width = 50;
//
// btSet
//
this.btSet.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.Blue;
this.btSet.DefaultCellStyle = dataGridViewCellStyle5;
this.btSet.HeaderText = "Set";
this.btSet.Name = "btSet";
this.btSet.ReadOnly = true;
this.btSet.Text = "Set";
this.btSet.Width = 50;
//
// bsPosData
//
this.bsPosData.DataMember = "MCModel";
@@ -307,7 +436,7 @@
//
this.bindingNavigatorCountItem.ForeColor = System.Drawing.Color.Black;
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(26, 22);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "Total item count";
//
@@ -378,7 +507,7 @@
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(51, 22);
this.toolStripButton1.Size = new System.Drawing.Size(59, 22);
this.toolStripButton1.Text = "Speed";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
@@ -388,7 +517,7 @@
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(63, 22);
this.toolStripButton2.Size = new System.Drawing.Size(93, 22);
this.toolStripButton2.Text = "Acceleration";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click_2);
//
@@ -398,7 +527,7 @@
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(63, 22);
this.toolStripButton3.Size = new System.Drawing.Size(93, 22);
this.toolStripButton3.Text = "Deceleration";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click_1);
//
@@ -640,6 +769,11 @@
0,
0,
0});
this.nudPosRel.Minimum = new decimal(new int[] {
99999999,
0,
0,
-2147483648});
this.nudPosRel.MotionIndex = -1;
this.nudPosRel.Name = "nudPosRel";
this.nudPosRel.Size = new System.Drawing.Size(98, 26);
@@ -696,7 +830,7 @@
this.chkJogMoveForce.ForeColor = System.Drawing.Color.Indigo;
this.chkJogMoveForce.Location = new System.Drawing.Point(0, 0);
this.chkJogMoveForce.Name = "chkJogMoveForce";
this.chkJogMoveForce.Size = new System.Drawing.Size(84, 33);
this.chkJogMoveForce.Size = new System.Drawing.Size(94, 33);
this.chkJogMoveForce.TabIndex = 59;
this.chkJogMoveForce.Text = "Force Jog";
this.chkJogMoveForce.UseVisualStyleBackColor = true;
@@ -724,6 +858,11 @@
0,
0,
0});
this.nudPosAbs.Minimum = new decimal(new int[] {
99999999,
0,
0,
-2147483648});
this.nudPosAbs.MotionIndex = -1;
this.nudPosAbs.Name = "nudPosAbs";
this.nudPosAbs.Size = new System.Drawing.Size(98, 26);
@@ -1353,7 +1492,7 @@
this.btAdd.Image = global::Project.Properties.Resources.icons8_add_40;
this.btAdd.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btAdd.Name = "btAdd";
this.btAdd.Size = new System.Drawing.Size(99, 52);
this.btAdd.Size = new System.Drawing.Size(97, 52);
this.btAdd.Text = "Add(&A)";
this.btAdd.Click += new System.EventHandler(this.toolStripButton6_Click);
//
@@ -1362,7 +1501,7 @@
this.btEdit.Image = global::Project.Properties.Resources.icons8_edit_48;
this.btEdit.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btEdit.Name = "btEdit";
this.btEdit.Size = new System.Drawing.Size(107, 52);
this.btEdit.Size = new System.Drawing.Size(102, 52);
this.btEdit.Text = "Rename";
this.btEdit.Click += new System.EventHandler(this.btEdit_Click);
//
@@ -1371,7 +1510,7 @@
this.btDel.Image = global::Project.Properties.Resources.icons8_delete_40;
this.btDel.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btDel.Name = "btDel";
this.btDel.Size = new System.Drawing.Size(100, 52);
this.btDel.Size = new System.Drawing.Size(108, 52);
this.btDel.Text = "Delete(&D)";
this.btDel.Click += new System.EventHandler(this.toolStripButton7_Click);
//
@@ -1379,7 +1518,7 @@
//
this.btSave.Image = ((System.Drawing.Image)(resources.GetObject("btSave.Image")));
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(98, 52);
this.btSave.Size = new System.Drawing.Size(97, 52);
this.btSave.Text = "Save(&S)";
this.btSave.Click += new System.EventHandler(this.toolStripButton8_Click);
//
@@ -1388,7 +1527,7 @@
this.btCopy.Image = ((System.Drawing.Image)(resources.GetObject("btCopy.Image")));
this.btCopy.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btCopy.Name = "btCopy";
this.btCopy.Size = new System.Drawing.Size(83, 52);
this.btCopy.Size = new System.Drawing.Size(87, 52);
this.btCopy.Text = "Copy";
this.btCopy.Click += new System.EventHandler(this.btCopy_Click);
//
@@ -1417,7 +1556,7 @@
this.toolStripButton11.Image = global::Project.Properties.Resources.icons8_move_right_40;
this.toolStripButton11.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton11.Name = "toolStripButton11";
this.toolStripButton11.Size = new System.Drawing.Size(119, 52);
this.toolStripButton11.Size = new System.Drawing.Size(137, 52);
this.toolStripButton11.Text = "Group Move";
this.toolStripButton11.ButtonClick += new System.EventHandler(this.toolStripButton11_ButtonClick);
this.toolStripButton11.Click += new System.EventHandler(this.toolStripButton11_Click);
@@ -1426,139 +1565,10 @@
//
this.ToolStripMenuItem.Image = global::Project.Properties.Resources.icons8_save_to_grid_40;
this.ToolStripMenuItem.Name = "그룹설정ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(154, 54);
this.ToolStripMenuItem.Size = new System.Drawing.Size(184, 54);
this.ToolStripMenuItem.Text = "Group Settings";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// Column1
//
this.Column1.DataPropertyName = "idx";
this.Column1.HeaderText = "idx";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Visible = false;
this.Column1.Width = 33;
//
// pidx
//
this.pidx.DataPropertyName = "pidx";
this.pidx.HeaderText = "pidx";
this.pidx.Name = "pidx";
this.pidx.ReadOnly = true;
this.pidx.Visible = false;
this.pidx.Width = 41;
//
// MotIndex
//
this.MotIndex.DataPropertyName = "MotIndex";
this.MotIndex.HeaderText = "MotIndex";
this.MotIndex.Name = "MotIndex";
this.MotIndex.ReadOnly = true;
this.MotIndex.Visible = false;
this.MotIndex.Width = 74;
//
// PosIndex
//
this.PosIndex.DataPropertyName = "PosIndex";
this.PosIndex.HeaderText = "PosIndex";
this.PosIndex.Name = "PosIndex";
this.PosIndex.ReadOnly = true;
this.PosIndex.Visible = false;
this.PosIndex.Width = 71;
//
// posTitleDataGridViewTextBoxColumn1
//
this.posTitleDataGridViewTextBoxColumn1.DataPropertyName = "PosTitle";
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
this.posTitleDataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle1;
this.posTitleDataGridViewTextBoxColumn1.HeaderText = "Title";
this.posTitleDataGridViewTextBoxColumn1.Name = "posTitleDataGridViewTextBoxColumn1";
this.posTitleDataGridViewTextBoxColumn1.ReadOnly = true;
this.posTitleDataGridViewTextBoxColumn1.Width = 61;
//
// Description
//
this.Description.DataPropertyName = "Description";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.Font = new System.Drawing.Font("맑은 고딕", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.Description.DefaultCellStyle = dataGridViewCellStyle2;
this.Description.HeaderText = "Description";
this.Description.Name = "Description";
this.Description.ReadOnly = true;
this.Description.Width = 103;
//
// btPos
//
this.btPos.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btPos.DataPropertyName = "Position";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Format = "N3";
this.btPos.DefaultCellStyle = dataGridViewCellStyle3;
this.btPos.HeaderText = "Position";
this.btPos.Name = "btPos";
this.btPos.ReadOnly = true;
this.btPos.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btPos.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// btspeed
//
this.btspeed.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btspeed.DataPropertyName = "Speed";
this.btspeed.HeaderText = "Speed";
this.btspeed.Name = "btspeed";
this.btspeed.ReadOnly = true;
this.btspeed.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btspeed.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.btspeed.Width = 50;
//
// btacc
//
this.btacc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btacc.DataPropertyName = "SpeedAcc";
this.btacc.HeaderText = "Acc";
this.btacc.Name = "btacc";
this.btacc.ReadOnly = true;
this.btacc.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btacc.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.btacc.Text = "Acc";
this.btacc.Width = 50;
//
// btdcc
//
this.btdcc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.btdcc.DataPropertyName = "SpeedDcc";
this.btdcc.HeaderText = "Dcc";
this.btdcc.Name = "btdcc";
this.btdcc.ReadOnly = true;
this.btdcc.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.btdcc.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.btdcc.Text = "Dcc";
this.btdcc.Width = 50;
//
// btGo
//
this.btGo.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
this.btGo.DefaultCellStyle = dataGridViewCellStyle4;
this.btGo.HeaderText = "Go";
this.btGo.Name = "btGo";
this.btGo.ReadOnly = true;
this.btGo.Text = "Go";
this.btGo.Width = 50;
//
// btSet
//
this.btSet.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.Blue;
this.btSet.DefaultCellStyle = dataGridViewCellStyle5;
this.btSet.HeaderText = "Set";
this.btSet.Name = "btSet";
this.btSet.ReadOnly = true;
this.btSet.Text = "Set";
this.btSet.Width = 50;
//
// Model_Motion
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

View File

@@ -303,11 +303,11 @@
<data name="btCopy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD1SURBVFhH7dAxCsJAEAXQ3E4EbbXRCyiewVaIvZ3oAWy9
ggYUi5BOsLS1TZM1A2Mju9kkf9Yizoff7cw8NupsequTQTtYJxdeJx868HgVrUvz4+W2GMbnhFfKRgJ4
yHIzKpH9OLnyWrlIAI/3IhxSClgLSY/RznepFeIqzXyAXiQ9RkLz083NLPaZFWPrN7ASKQFMn7mZlMhZ
zZ+0AZ1ICSAdbYKkGV+ZJwekNv1JV4MBqRLIoEAqigwOpCJIcaCvNkRVaYZ5ONAXBaJRIBoFolEgGgWi
USAaBaJRIBoFoqH9bcq83wD5VLso8C+AocunupYoegNn74NeMo6A3wAAAABJRU5ErkJggg==
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD1SURBVFhH7dAxCsJAEAXQ3E4EbbXRCyiewVaIvZWgB7D1
ChpQLEI6wdLWNk3WDIyN7GaT/FmLOB9+tzPz2Kiz6a1OBu1gnVx4nXzowONVtC7Nj5fbYhifE14pGwng
IcvNqET24+TKa+UiATzei3BIKWAtJD1GO9+lVoirNPMBepH0GAnNTzc3s9hnVoyt38BKpAQwfeZmUiJn
NX/SBnQiJYB0tAmSZnxlnhyQ2vQnXQ0GpEoggwKpKDI4kIogxYG+2hBVpRnm4UBfFIhGgWgUiEaBaBSI
RoFoFIhGgWgUiIb2tynzfgPkU+2iwL8Ahi6f6lqi6A3RmINXQmh9mwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@@ -326,15 +326,21 @@ namespace Project.Dialog
private void button3_Click_1(object sender, EventArgs e)
{
PUB.PrinterL.TestPrint(AR.SETTING.Data.DrawOutbox, "ATK4EE1", "");
var rlt = PUB.PrinterL.TestPrint(AR.SETTING.Data.DrawOutbox, "ATK4EE1", "");
var zpl = PUB.PrinterL.LastPrintZPL;
if (rlt.result == false)
PUB.log.AddE($"Temp Print L: {rlt.errmessage}" + PUB.PrinterL.LastPrintZPL);
else
PUB.log.Add("Temp Print L: " + PUB.PrinterL.LastPrintZPL);
}
private void button4_Click_1(object sender, EventArgs e)
{
PUB.PrinterR.TestPrint(AR.SETTING.Data.DrawOutbox, "ATK4EE1", "");
var rlt = PUB.PrinterR.TestPrint(AR.SETTING.Data.DrawOutbox, "ATK4EE1", "");
var zpl = PUB.PrinterR.LastPrintZPL;
if (rlt.result == false)
PUB.log.AddE($"Temp Print R: {rlt.errmessage}" + PUB.PrinterR.LastPrintZPL);
else
PUB.log.Add("Temp Print R: " + PUB.PrinterR.LastPrintZPL);
}
@@ -373,32 +379,30 @@ namespace Project.Dialog
{
//왼쪽 -5mm
var pos = MOT.GetLMPos(eLMLoc.READY);
var vel = AR.SETTING.Data.MoveYForPaperVaccumeVel;
var acc = AR.SETTING.Data.MoveYForPaperVaccumeAcc;
MOT.Move(eAxis.PL_MOVE, pos.Position + AR.SETTING.Data.MoveYForPaperVaccumeValue, vel, acc, false, false, false);
MOT.Move(eAxis.PL_MOVE, -5, 100, 500, true, false, false);//, vel, acc, false, false, false);
}
private void button14_Click(object sender, EventArgs e)
{
//왼쪽 +5mm
//왼쪽 Ready Position
var pos = MOT.GetLMPos(eLMLoc.READY);
MOT.Move(eAxis.PL_MOVE, pos.Position, 50, 200, false, false, false);
PUB.log.Add("user:PL_MOVE:to ready");
}
private void button15_Click_1(object sender, EventArgs e)
{
//오른쪽 -5mm
var pos = MOT.GetRMPos(eRMLoc.READY);
var vel = AR.SETTING.Data.MoveYForPaperVaccumeVel;
var acc = AR.SETTING.Data.MoveYForPaperVaccumeAcc;
MOT.Move(eAxis.PR_MOVE, pos.Position + AR.SETTING.Data.MoveYForPaperVaccumeValue, vel, acc, false, false, false);
MOT.Move(eAxis.PR_MOVE, -5, 100, 500, false, false, false);// pos.Position + AR.SETTING.Data.MoveYForPaperVaccumeValue, vel, acc, false, false, false);
}
private void button16_Click_2(object sender, EventArgs e)
{
//오른쪽 +5mm
//오른쪽 Ready Position
var pos = MOT.GetRMPos(eRMLoc.READY);
MOT.Move(eAxis.PR_MOVE, pos.Position, 50, 200, false, false, false);
PUB.log.Add("user:pr_move:to ready");
}
private void button17_Click(object sender, EventArgs e)
@@ -419,10 +423,10 @@ namespace Project.Dialog
if (cur == false)
{
//내려도되는지 검사해야한다.
if(PUB.mot.IsHomeSet((int)eAxis.PL_MOVE))
if (PUB.mot.IsHomeSet((int)eAxis.PL_MOVE))
{
var pos = MOT.GetLMPos(eLMLoc.READY);
if(MOT.getPositionMatch(pos))
if (MOT.getPositionMatch(pos))
{
PUB.log.AddE($"Cannot lower cylinder (L) because it is at standby position");
}

View File

@@ -100,9 +100,11 @@ namespace Project.Dialog
var cnt = (int)nudCnt.Value;
for (int i = 0; i < cnt; i++)
{
if (Printer.Print(zpl) == false)
var prn = Printer.Print(zpl);
if (prn.result == false)
{
//인쇄실패시 처리하지 않음
PUB.log.AddE(prn.errmessage);
UTIL.MsgE("Cannot proceed further due to printing failure");
break;
}

View File

@@ -68,7 +68,11 @@ namespace Project.Dialog
{
//right
if (PUB.PrinterR.IsOpen)
PUB.PrinterR.Print(this.richTextBox1.Text);
{
var prn = PUB.PrinterR.Print(this.richTextBox1.Text);
if (prn.result == false) PUB.log.AddE(prn.errmessage);
}
else PUB.log.AddAT("Printer R not connected");
}
@@ -76,7 +80,10 @@ namespace Project.Dialog
{
//left
if (PUB.PrinterL.IsOpen)
PUB.PrinterL.Print(this.richTextBox1.Text);
{
var prn = PUB.PrinterL.Print(this.richTextBox1.Text);
if (prn.result == false) PUB.log.AddE(prn.errmessage);
}
else
PUB.log.AddAT("Printer L not connected");
}

View File

@@ -112,7 +112,7 @@ namespace Project
{
var prn = Printer.Print(zpl);
//PUB.PrintSend(true, zpl); //PUB.PrintL.Write(zpl);
if (prn == false)
if (prn.result == false)
{
PUB.Result.SetResultMessage(eResult.HARDWARE, eECode.PRINTL, eNextStep.ERROR);
return false;
@@ -127,10 +127,9 @@ namespace Project
{
var prn = Printer.Print(zpl);
//PUB.PrintSend(false, zpl); //PUB.PrintR.Write(zpl);
if (prn == false)
if (prn.result == false)
{
PUB.log.AddE(prn.errmessage);
PUB.Result.SetResultMessage(eResult.HARDWARE, eECode.PRINTR, eNextStep.ERROR);
return false;
}

View File

@@ -38,7 +38,7 @@ namespace AR
R_CONV1 = 0x34, R_CONV3 = 0x36, R_CONV4 = 0x37,
R_CYLUP = 0x38, R_CYLDN,
L_CYLUP = 0x3A, L_CYLDN,
L_CYLDN = 0x3A, L_CYLUP,
L_EXT_READY = 0x3E,
R_EXT_READY = 0x3F,
@@ -75,11 +75,8 @@ namespace AR
PICK_VAC1 = 0x23, PICK_VAC2, PICK_VAC3, PICK_VAC4,
SVR_PWR_0 = 0x28, SVR_PWR_1, SVR_PWR_2, SVR_PWR_3, SVR_PWR_4, SVR_PWR_5, SVR_PWR_6,
R_CYLDN = 0x38, L_CYLDN = 0x39,
PRINTL_FWD = 0x38, R_CYLDN = 0x39,
LEFT_CONV = 0x3A, RIGHT_CONV = 0x3B,
PRINTL_FWD = 0x3D,
PRINTR_FWD = 0x3C,
//SVR_EMG_0 = 0x30, SVR_EMG_1, SVR_EMG_2, SVR_EMG_3, SVR_EMG_4, SVR_EMG_5, SVR_EMG_6,
PRINTR_FWD = 0x3C, L_CYLDN = 0x3D,
}
}

View File

@@ -16,9 +16,7 @@ namespace AR
{
this.filename = UTIL.MakePath("Data", "Setting.xml");
}
public string WebAPI_R1 { get; set; }
public string WebAPI_R2 { get; set; }
public string WebAPI_R3 { get; set; }
#region "log"
@@ -198,20 +196,6 @@ namespace AR
public Boolean Disable_SidQtyCheck { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean Disable_Axis0 { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean Disable_Axis1 { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean Disable_Axis2 { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean Disable_Axis3 { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean Disable_Axis4 { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean Disable_Axis5 { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean Disable_Axis6 { get; set; }
[Category("Advanced Parameter"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public Boolean EnableDebugMode { get; set; }
@@ -386,10 +370,6 @@ namespace AR
#endregion
[Category("Joystick"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public int Jostick_vid { get; set; }
[Category("Joystick"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))]
public int Jostick_pid { get; set; }
[DisplayName("Barcode Position Rotation (Rear)")]
public float RearBarcodeRotate { get; set; }
@@ -469,15 +449,8 @@ namespace AR
if (WMS_CENTER_CD.isEmpty()) WMS_CENTER_CD = "V1";
if (WMS_PROGRAM_ID.isEmpty()) WMS_PROGRAM_ID = "LABEL ATTACH";
if (WMS_REG_USERID.isEmpty()) WMS_REG_USERID = "ATVLA1";
if (WebAPI_R1.isEmpty()) WebAPI_R1 = "http://10.131.32.31:9001";
if (WebAPI_R2.isEmpty()) WebAPI_R2 = "http://10.131.32.24:9001";
if (WebAPI_R3.isEmpty()) WebAPI_R3 = "http://10.131.32.22:9001";
if (swplc_size < 1) swplc_size = 100;
if (swplc_name.isEmpty()) swplc_name = "swplc";
if (StatusInterval < 10) StatusInterval = 300; //5분간격
var currentpath = AppDomain.CurrentDomain.BaseDirectory;
@@ -521,9 +494,6 @@ namespace AR
PortAlignDownTimeU = 1.0f;
}
if (Jostick_vid == 0) Jostick_vid = 121;
if (Jostick_pid == 0) Jostick_pid = 17;
if (PrintLWaitMS == 0) PrintLWaitMS = 1500;
if (PrintRWaitMS == 0) PrintRWaitMS = 1500;