Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
d1e53c9f6d | |
|
|
c4e2f5693a | |
|
|
a026eef9c4 | |
|
|
7b4446fe32 |
|
|
@ -523,7 +523,7 @@
|
|||
this.groupBoxComm.Location = new System.Drawing.Point(3, 575);
|
||||
this.groupBoxComm.Name = "groupBoxComm";
|
||||
this.groupBoxComm.RoundRadius = 5;
|
||||
this.groupBoxComm.Size = new System.Drawing.Size(500, 178);
|
||||
this.groupBoxComm.Size = new System.Drawing.Size(569, 178);
|
||||
this.groupBoxComm.TabIndex = 8;
|
||||
this.groupBoxComm.Text = "통신";
|
||||
this.groupBoxComm.TextColor = System.Drawing.Color.Black;
|
||||
|
|
@ -538,9 +538,9 @@
|
|||
this.labelProtocolDescriptionCOM3_2.Font = new System.Drawing.Font("New Gulim", 9F, System.Drawing.FontStyle.Bold);
|
||||
this.labelProtocolDescriptionCOM3_2.InitVisible = true;
|
||||
this.labelProtocolDescriptionCOM3_2.LineSpacing = 0F;
|
||||
this.labelProtocolDescriptionCOM3_2.Location = new System.Drawing.Point(54, 122);
|
||||
this.labelProtocolDescriptionCOM3_2.Location = new System.Drawing.Point(49, 122);
|
||||
this.labelProtocolDescriptionCOM3_2.Name = "labelProtocolDescriptionCOM3_2";
|
||||
this.labelProtocolDescriptionCOM3_2.Size = new System.Drawing.Size(333, 20);
|
||||
this.labelProtocolDescriptionCOM3_2.Size = new System.Drawing.Size(409, 20);
|
||||
this.labelProtocolDescriptionCOM3_2.TabIndex = 28;
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "COM3 Protocol Description";
|
||||
this.labelProtocolDescriptionCOM3_2.TextHAlign = SmartX.SmartLabel.TextHorAlign.Left;
|
||||
|
|
@ -551,7 +551,7 @@
|
|||
//
|
||||
this.buttonSend.Enabled = false;
|
||||
this.buttonSend.Font = new System.Drawing.Font("New Gulim", 10F, System.Drawing.FontStyle.Regular);
|
||||
this.buttonSend.Location = new System.Drawing.Point(393, 98);
|
||||
this.buttonSend.Location = new System.Drawing.Point(464, 96);
|
||||
this.buttonSend.Name = "buttonSend";
|
||||
this.buttonSend.Size = new System.Drawing.Size(70, 46);
|
||||
this.buttonSend.TabIndex = 26;
|
||||
|
|
@ -568,9 +568,9 @@
|
|||
this.labelProtocolDescriptionCOM3_1.Font = new System.Drawing.Font("New Gulim", 9F, System.Drawing.FontStyle.Bold);
|
||||
this.labelProtocolDescriptionCOM3_1.InitVisible = true;
|
||||
this.labelProtocolDescriptionCOM3_1.LineSpacing = 0F;
|
||||
this.labelProtocolDescriptionCOM3_1.Location = new System.Drawing.Point(54, 96);
|
||||
this.labelProtocolDescriptionCOM3_1.Location = new System.Drawing.Point(49, 96);
|
||||
this.labelProtocolDescriptionCOM3_1.Name = "labelProtocolDescriptionCOM3_1";
|
||||
this.labelProtocolDescriptionCOM3_1.Size = new System.Drawing.Size(333, 20);
|
||||
this.labelProtocolDescriptionCOM3_1.Size = new System.Drawing.Size(409, 20);
|
||||
this.labelProtocolDescriptionCOM3_1.TabIndex = 25;
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "COM3 Protocol Description";
|
||||
this.labelProtocolDescriptionCOM3_1.TextHAlign = SmartX.SmartLabel.TextHorAlign.Left;
|
||||
|
|
@ -581,7 +581,7 @@
|
|||
//
|
||||
this.buttonSave3.Enabled = false;
|
||||
this.buttonSave3.Font = new System.Drawing.Font("New Gulim", 10F, System.Drawing.FontStyle.Regular);
|
||||
this.buttonSave3.Location = new System.Drawing.Point(393, 62);
|
||||
this.buttonSave3.Location = new System.Drawing.Point(464, 62);
|
||||
this.buttonSave3.Name = "buttonSave3";
|
||||
this.buttonSave3.Size = new System.Drawing.Size(70, 30);
|
||||
this.buttonSave3.TabIndex = 2;
|
||||
|
|
@ -593,16 +593,16 @@
|
|||
this.comboBoxSerial3BaudRate.Font = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.comboBoxSerial3BaudRate.Location = new System.Drawing.Point(142, 62);
|
||||
this.comboBoxSerial3BaudRate.Name = "comboBoxSerial3BaudRate";
|
||||
this.comboBoxSerial3BaudRate.Size = new System.Drawing.Size(100, 28);
|
||||
this.comboBoxSerial3BaudRate.Size = new System.Drawing.Size(140, 28);
|
||||
this.comboBoxSerial3BaudRate.TabIndex = 1;
|
||||
this.comboBoxSerial3BaudRate.SelectedIndexChanged += new System.EventHandler(this.comboBoxSerial3_SelectedIndexChanged);
|
||||
//
|
||||
// comboBoxSerial3Mode
|
||||
//
|
||||
this.comboBoxSerial3Mode.Font = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.comboBoxSerial3Mode.Location = new System.Drawing.Point(248, 62);
|
||||
this.comboBoxSerial3Mode.Location = new System.Drawing.Point(288, 62);
|
||||
this.comboBoxSerial3Mode.Name = "comboBoxSerial3Mode";
|
||||
this.comboBoxSerial3Mode.Size = new System.Drawing.Size(139, 28);
|
||||
this.comboBoxSerial3Mode.Size = new System.Drawing.Size(140, 28);
|
||||
this.comboBoxSerial3Mode.TabIndex = 1;
|
||||
this.comboBoxSerial3Mode.SelectedIndexChanged += new System.EventHandler(this.comboBoxSerial3_SelectedIndexChanged);
|
||||
//
|
||||
|
|
@ -616,9 +616,9 @@
|
|||
this.labelStaticCommunicationMode.Font = new System.Drawing.Font("New Gulim", 11F, System.Drawing.FontStyle.Bold);
|
||||
this.labelStaticCommunicationMode.InitVisible = true;
|
||||
this.labelStaticCommunicationMode.LineSpacing = 0F;
|
||||
this.labelStaticCommunicationMode.Location = new System.Drawing.Point(248, 26);
|
||||
this.labelStaticCommunicationMode.Location = new System.Drawing.Point(288, 24);
|
||||
this.labelStaticCommunicationMode.Name = "labelStaticCommunicationMode";
|
||||
this.labelStaticCommunicationMode.Size = new System.Drawing.Size(100, 30);
|
||||
this.labelStaticCommunicationMode.Size = new System.Drawing.Size(140, 30);
|
||||
this.labelStaticCommunicationMode.TabIndex = 0;
|
||||
this.labelStaticCommunicationMode.Text = "모드";
|
||||
this.labelStaticCommunicationMode.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle;
|
||||
|
|
@ -656,7 +656,7 @@
|
|||
this.labelStaticCommunicationSpeed.LineSpacing = 0F;
|
||||
this.labelStaticCommunicationSpeed.Location = new System.Drawing.Point(142, 24);
|
||||
this.labelStaticCommunicationSpeed.Name = "labelStaticCommunicationSpeed";
|
||||
this.labelStaticCommunicationSpeed.Size = new System.Drawing.Size(100, 30);
|
||||
this.labelStaticCommunicationSpeed.Size = new System.Drawing.Size(140, 30);
|
||||
this.labelStaticCommunicationSpeed.TabIndex = 0;
|
||||
this.labelStaticCommunicationSpeed.Text = "Baudrate";
|
||||
this.labelStaticCommunicationSpeed.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle;
|
||||
|
|
|
|||
|
|
@ -433,6 +433,7 @@ namespace INT63DC_2C.Forms
|
|||
this.comboBoxSerial3Mode.Items.Add("-");
|
||||
this.comboBoxSerial3Mode.Items.Add("STD1");
|
||||
this.comboBoxSerial3Mode.Items.Add("STD2");
|
||||
this.comboBoxSerial3Mode.Items.Add("STD3");
|
||||
this.comboBoxSerial3Mode.SelectedIndex = 0;
|
||||
this.comboBoxSerial3Mode.SelectedIndexChanged += new EventHandler(this.comboBoxSerial3_SelectedIndexChanged);
|
||||
}
|
||||
|
|
@ -679,6 +680,38 @@ namespace INT63DC_2C.Forms
|
|||
this.labelEmptyWeight.Text = Helper.StringToDecimalPlaces(value, this.ParentForm.SystemConfig.DecimalPlaces);
|
||||
}
|
||||
|
||||
private void COM3ProtocolDescription()
|
||||
{
|
||||
if (this.comboBoxSerial3Mode.SelectedIndex == 1)
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "STX[1],ID[5],NO[4],{GRD[1],WEIGHT[6]} * n,ETX[1]";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "";
|
||||
}
|
||||
else if (this.comboBoxSerial3Mode.SelectedIndex == 2)
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "STX[1],ID[5],NO[4],UNDER[6],PASS[6],OVER[6],TARE[6]";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "{GRD[1],WEIGHT[6]} * n,ETX[1]";
|
||||
}
|
||||
else if (this.comboBoxSerial3Mode.SelectedIndex == 3)
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "STX[1],ID[5],NO[4],UNDER[6],PASS[6],OVER[6],TARE[6]";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "PASS CNT[7],NG CNT[7],{GRD[1],WEIGHT[6]} * n,ETX[1]";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "COM3协议说明";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "COM3协议说明";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "COM3 Protocol Description";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "COM3 Protocol Description";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateZeroParameterRangeDisplay(DataStore.EquipmentStatus status, Collection<string> values)
|
||||
{
|
||||
if (values == null || values.Count == 0)
|
||||
|
|
@ -837,6 +870,8 @@ namespace INT63DC_2C.Forms
|
|||
value = this.ParentForm.SystemConfig.EmptyWeight;
|
||||
|
||||
this.labelEmptyWeight.Text = Helper.StringToDecimalPlaces(value, this.ParentForm.SystemConfig.DecimalPlaces);
|
||||
|
||||
this.COM3ProtocolDescription();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -1078,29 +1113,7 @@ namespace INT63DC_2C.Forms
|
|||
|
||||
private void comboBoxSerial3_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.comboBoxSerial3Mode.SelectedIndex == 1)
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "STX[1],ID[5],NO[4],";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "{GRD[1],WEIGHT[6]} * n,CHK8[2],ETX[1]";
|
||||
}
|
||||
else if (this.comboBoxSerial3Mode.SelectedIndex == 2)
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "STX[1],ID[5],NO[4],UNDER[6],PASS[6],OVER[6],";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "TARE[6],{GRD[1],WEIGHT[6]} * n,CHK8[2],ETX[1]";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "COM3协议说明";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "COM3协议说明";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelProtocolDescriptionCOM3_1.Text = "COM3 Protocol Description";
|
||||
this.labelProtocolDescriptionCOM3_2.Text = "COM3 Protocol Description";
|
||||
}
|
||||
}
|
||||
this.COM3ProtocolDescription();
|
||||
|
||||
this.buttonSave3.Enabled = true;
|
||||
}
|
||||
|
|
@ -1110,6 +1123,8 @@ namespace INT63DC_2C.Forms
|
|||
this.ParentForm.SerialCH3STD1(this.ParentForm.CollectionWeightData);
|
||||
else if (this.ParentForm.SystemConfig.Serial3Mode == 2)
|
||||
this.ParentForm.SerialCH3STD2(this.ParentForm.CollectionWeightData);
|
||||
else if (this.ParentForm.SystemConfig.Serial3Mode == 3)
|
||||
this.ParentForm.SerialCH3STD3(this.ParentForm.CollectionWeightData);
|
||||
}
|
||||
private void buttonSave3_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1715,7 +1715,8 @@ namespace INT63DC_2C.Forms
|
|||
if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormMainDisplay)
|
||||
{
|
||||
#region Serial 3
|
||||
if (this.SystemConfig.Serial3Mode == 1) // OPT1 - 중량 데이터 피드백
|
||||
|
||||
if (this.SystemConfig.Serial3Mode != 0)
|
||||
{
|
||||
// V1.10.0 아남자동기 수정
|
||||
// FeedbackEmptyTransfer - 제품 안들어 올때 데이터 전송 여부
|
||||
|
|
@ -1737,10 +1738,15 @@ namespace INT63DC_2C.Forms
|
|||
}
|
||||
|
||||
if (cnt == 0)
|
||||
this.SerialCH3STD1(this.CollectionWeightData);
|
||||
{
|
||||
if (this.SystemConfig.Serial3Mode == 1)
|
||||
this.SerialCH3STD1(this.CollectionWeightData);
|
||||
else if (this.SystemConfig.Serial3Mode == 2)
|
||||
this.SerialCH3STD3(this.CollectionWeightData);
|
||||
else
|
||||
this.SerialCH3STD3(this.CollectionWeightData);
|
||||
}
|
||||
}
|
||||
else if (this.SystemConfig.Serial3Mode == 2)
|
||||
this.SerialCH3STD2(this.CollectionWeightData);
|
||||
#endregion
|
||||
|
||||
#region FormMainDisplay
|
||||
|
|
@ -5632,6 +5638,54 @@ namespace INT63DC_2C.Forms
|
|||
if (this.IsCom3LogOpen == true)
|
||||
this.smartFileCom3Log.WriteString(string.Format("Send ({0:yyyy-MM-dd HH:mm:ss}): {1}", DateTime.Now, sb.ToString()));
|
||||
}
|
||||
public void SerialCH3STD3(Collection<WeightData> datas)
|
||||
{
|
||||
string value = "";
|
||||
int toTalPass = 0, toTalNG = 0;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
toTalPass += datas[i].PassCount;
|
||||
toTalNG += datas[i].TotalNGCount;
|
||||
}
|
||||
|
||||
sb.Append(string.Format("IN{0:D3}", this.SystemConfig.UsbID));
|
||||
sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber));
|
||||
sb.Append(this.PadLeft(6, Helper.StringToDecimalPlaces(this.CurrentProductItem.UnderRange, this.SystemConfig.DecimalPlaces)));
|
||||
sb.Append(this.PadLeft(6, Helper.StringToDecimalPlaces(this.CurrentProductItem.PassRange, this.SystemConfig.DecimalPlaces)));
|
||||
sb.Append(this.PadLeft(6, Helper.StringToDecimalPlaces(this.CurrentProductItem.OverRange, this.SystemConfig.DecimalPlaces)));
|
||||
sb.Append(this.PadLeft(6, Helper.StringToDecimalPlaces(this.CurrentProductItem.TareRange, this.SystemConfig.DecimalPlaces)));
|
||||
sb.Append(this.PadLeft(7, toTalPass.ToString()));
|
||||
sb.Append(this.PadLeft(7, toTalNG.ToString()));
|
||||
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Empty)
|
||||
sb.Append("T");
|
||||
else
|
||||
sb.Append("E");
|
||||
|
||||
if (this.SystemConfig.EquipmentColumns == 16)
|
||||
sb.Append(" ");
|
||||
|
||||
value = Helper.DoubleToString(datas[i].Weight, this.SystemConfig.DecimalPlaces);
|
||||
sb.Append(value.PadLeft(6, ' '));
|
||||
}
|
||||
|
||||
SerialMgrComm.serialPortMessage("COM3:", sb.ToString());
|
||||
|
||||
if (this.IsCom3LogOpen == true)
|
||||
this.smartFileCom3Log.WriteString(string.Format("Send ({0:yyyy-MM-dd HH:mm:ss}): {1}", DateTime.Now, sb.ToString()));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Modbus
|
||||
|
|
|
|||
|
|
@ -1764,18 +1764,7 @@ namespace INT63DC_2C.Forms
|
|||
this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level3Manager ||
|
||||
this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
|
||||
{
|
||||
this.buttonProductNo.Enabled = true;
|
||||
this.buttonUnder.Enabled = true;
|
||||
this.buttonPass.Enabled = true;
|
||||
this.buttonOver.Enabled = true;
|
||||
this.buttonTare.Enabled = true;
|
||||
this.panelSubMenu2.Enabled = true;
|
||||
|
||||
this.buttonProductNo.TextColor = this.ColorButtonAccessTrue;
|
||||
this.buttonUnder.TextColor = this.ColorButtonAccessTrue;
|
||||
this.buttonPass.TextColor = this.ColorButtonAccessTrue;
|
||||
this.buttonOver.TextColor = this.ColorButtonAccessTrue;
|
||||
this.buttonTare.TextColor = this.ColorButtonAccessTrue;
|
||||
this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser, this.ParentForm.CurrentUserGroup);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1785,7 +1774,7 @@ namespace INT63DC_2C.Forms
|
|||
this.buttonPass.Enabled = true;
|
||||
this.buttonOver.Enabled = true;
|
||||
this.buttonTare.Enabled = true;
|
||||
this.panelSubMenu2.Enabled = true;
|
||||
this.buttonSubMenu.Enabled = true;
|
||||
|
||||
this.buttonProductNo.TextColor = this.ColorButtonAccessTrue;
|
||||
this.buttonUnder.TextColor = this.ColorButtonAccessTrue;
|
||||
|
|
@ -2369,7 +2358,12 @@ namespace INT63DC_2C.Forms
|
|||
this.buttonPass.Enabled = false;
|
||||
this.buttonOver.Enabled = false;
|
||||
this.buttonTare.Enabled = false;
|
||||
this.panelSubMenu2.Enabled = false;
|
||||
|
||||
// subMenu
|
||||
this.buttonSubMenu.Enabled = false;
|
||||
this.panelSubMenu1.Visible = false;
|
||||
this.panelSubMenu2.Visible = false;
|
||||
this.panelSubMenu3.Visible = false;
|
||||
|
||||
this.buttonProductNo.TextColor = this.ColorButtonAccessFalse;
|
||||
this.buttonUnder.TextColor = this.ColorButtonAccessFalse;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue