Compare commits

..

No commits in common. "5b220d7f548221c06616854d24ff098dd2ee2ded" and "91fc1657f2201499e2fb206adc1a3a981012c6d4" have entirely different histories.

5 changed files with 65 additions and 17 deletions

View File

@ -206,6 +206,8 @@ namespace INT69DB_2A.Controls
this.labelCH3Mode.Text = "Printer";
else if (item.Serial3Mode == 5)
this.labelCH3Mode.Text = "OPT4";
else if (item.Serial3Mode == 6)
this.labelCH3Mode.Text = "OPT5";
else
this.labelCH3Mode.Text = "None";
}

View File

@ -347,6 +347,7 @@ namespace INT69DB_2A
f3_OPT3,
f4_Printer,
f5_OPT4,
f6_OPT5,
}
public enum EthernetMode
@ -357,6 +358,7 @@ namespace INT69DB_2A
f3_OPT3,
f4_Modbus,
f5_OPT4,
f6_OPT5,
}
public enum UserGroup

View File

@ -316,6 +316,13 @@ namespace INT69DB_2A.Forms
else if (this.ParentForm.SystemConfig.EquipmentMode == 2)
data = this.ParentForm.Protocol_OPT4(1, this.ParentForm.CollectionWeightData[0]);
}
else if (this.ParentForm.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5)
{
if (this.ParentForm.SystemConfig.EquipmentMode == 1)
data = this.ParentForm.Protocol_OPT5(this.ParentForm.CollectionWeightData);
else if (this.ParentForm.SystemConfig.EquipmentMode == 2)
data = this.ParentForm.Protocol_OPT5(1, this.ParentForm.CollectionWeightData[0]);
}
switch (this.ParentForm.SystemConfig.EthernetOperationMode)
{
@ -374,6 +381,13 @@ namespace INT69DB_2A.Forms
else if (this.ParentForm.SystemConfig.EquipmentMode == 2)
data = this.ParentForm.Protocol_OPT4(1, this.ParentForm.CollectionWeightData[0]);
}
else if (this.ParentForm.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5)
{
if (this.ParentForm.SystemConfig.EquipmentMode == 1)
data = this.ParentForm.Protocol_OPT5(this.ParentForm.CollectionWeightData);
else if (this.ParentForm.SystemConfig.EquipmentMode == 2)
data = this.ParentForm.Protocol_OPT5(1, this.ParentForm.CollectionWeightData[0]);
}
switch (this.ParentForm.SystemConfig.EthernetOperationMode)
{
@ -565,6 +579,19 @@ namespace INT69DB_2A.Forms
this.labelProtocolDescriptionEthernet_2.Text = "LANE[2],GRD[1],WEIGHT[6],ETX[1]]";
}
}
else if (this.comboBoxMode.SelectedIndex == (int)DataStore.EthernetMode.f6_OPT5)
{
if (this.ParentForm.SystemConfig.EquipmentMode == 1 || this.ParentForm.SystemConfig.EquipmentMode == 3)
{
this.labelProtocolDescriptionEthernet_1.Text = "STX[1],ID[5],NO[4],Pass Count[7],NG Count[7],";
this.labelProtocolDescriptionEthernet_2.Text = "Total Count[9],{GRD[1],WEIGHT[6]} * n,ETX[1]";
}
else if (this.ParentForm.SystemConfig.EquipmentMode == 2)
{
this.labelProtocolDescriptionEthernet_1.Text = "STX[1],ID[5],NO[4],Pass Count[7],NG Count[7],";
this.labelProtocolDescriptionEthernet_2.Text = "Total Count[9],LANE[2],GRD[1],WEIGHT[6],ETX[1]]";
}
}
else
{
this.labelProtocolDescriptionEthernet_1.Text = "-";
@ -1587,6 +1614,13 @@ namespace INT69DB_2A.Forms
else if (this.ParentForm.SystemConfig.EquipmentMode == 2)
this.ParentForm.UartCom3Write(this.ParentForm.Protocol_OPT4_NotStxEtx(1, this.ParentForm.CollectionWeightData[0]));
}
else if (this.ParentForm.SystemConfig.Serial3Mode == (int)DataStore.SerialMode.f6_OPT5)
{
if (this.ParentForm.SystemConfig.EquipmentMode == 1 || this.ParentForm.SystemConfig.EquipmentMode == 3)
this.ParentForm.UartCom3Write(this.ParentForm.Protocol_OPT5_NotStxEtx(this.ParentForm.CollectionWeightData));
else if (this.ParentForm.SystemConfig.EquipmentMode == 2)
this.ParentForm.UartCom3Write(this.ParentForm.Protocol_OPT5_NotStxEtx(1, this.ParentForm.CollectionWeightData[0]));
}
}
private void comboBoxSerial3BaudRate_SelectedIndexChanged(object sender, EventArgs e)

View File

@ -43,13 +43,10 @@ namespace INT69DB_2A.Forms
public string ComPortMainToLCD; // DllSerial Port
public bool FlagDllSerial; // DllSerial 사용여부
private string TransferNum; // 수신데이터 ID저장 (재전송 시 사용)
<<<<<<< HEAD
public bool FlagThreadMessage1; // 플레그 쓰레드 메시지 11
public int TotalAllCount; // 스틱1 전체 수량
public int TotalPassCount; // 스틱1 전체 Pass 수량
public int TotalNGCount; // 스틱1 전체 NG 수량
=======
>>>>>>> 65f9fe0 ( - OPT5 )
// Motor Download 통신용 변수
public int LineNum;
@ -447,13 +444,10 @@ namespace INT69DB_2A.Forms
this.ColorLogOff = Color.Red;
this.ColorLogOn = Color.Yellow;
this.TransferNum = "-";
<<<<<<< HEAD
this.FlagThreadMessage1 = false;
this.TotalAllCount = 0;
this.TotalNGCount = 0;
this.TotalPassCount = 0;
=======
>>>>>>> 65f9fe0 ( - OPT5 )
this.PathLaunchFolder = "SD Card\\";
this.PathSystemFileFolder1 = this.PathLaunchFolder + "SystemFile1\\";
@ -1520,7 +1514,6 @@ namespace INT69DB_2A.Forms
return sb.ToString();
}
<<<<<<< HEAD
public string Protocol_OPT5(Collection<WeightData> datas)
{
string value = "";
@ -1704,8 +1697,6 @@ namespace INT69DB_2A.Forms
return sb.ToString();
}
=======
>>>>>>> 65f9fe0 ( - OPT5 )
public byte[] Protocol_Modbus_Client_Write_Common_Data()
{
int index = 0;
@ -3177,6 +3168,9 @@ namespace INT69DB_2A.Forms
case 5:
this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(datas));
break;
case 6:
this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(datas));
break;
default:
break;
}
@ -3197,6 +3191,9 @@ namespace INT69DB_2A.Forms
case 5:
this.SendEthernetData(this.Protocol_OPT4_NotStxEtx(datas));
break;
case 6:
this.SendEthernetData(this.Protocol_OPT5_NotStxEtx(datas));
break;
default:
break;
}
@ -3286,7 +3283,6 @@ namespace INT69DB_2A.Forms
public void UartCom3Write(string data)
{
this.smartSerialPortCom3.WriteFrame(data, SmartSerialPort.CODETYPES.ASCIICODE);
// 로그
//if (this.IsCom3LogOpen == true)
//this.smartFileCom3Log.WriteString(string.Format("COM3 Send ({0:yyyy-MM-dd HH:mm:ss}): {1}", DateTime.Now, data));
@ -3332,6 +3328,8 @@ namespace INT69DB_2A.Forms
}
else if (this.SystemConfig.Serial3Mode == 5) // OPT4
this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(this.CollectionWeightData));
else if (this.SystemConfig.Serial3Mode == 6) // OPT5
this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(this.CollectionWeightData));
}
private void TreatSerialCommunication(int lane, WeightData data)
{
@ -3352,6 +3350,8 @@ namespace INT69DB_2A.Forms
}
else if (this.SystemConfig.Serial3Mode == 5) // OPT4
this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(lane, data));
else if (this.SystemConfig.Serial3Mode == 6) // OPT5
this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(lane, data));
}
#endregion
#region Ethernet
@ -3394,6 +3394,11 @@ namespace INT69DB_2A.Forms
sendData = this.Protocol_OPT4(this.CollectionWeightData);
this.SendEthernetData(sendData);
}
else if (this.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5)
{
sendData = this.Protocol_OPT5(this.CollectionWeightData);
this.SendEthernetData(sendData);
}
}
private void TreatEthernetCommunication(int lane, WeightData data)
{
@ -3431,6 +3436,11 @@ namespace INT69DB_2A.Forms
sendData = this.Protocol_OPT4(lane, data);
this.SendEthernetData(sendData);
}
else if (this.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5)
{
sendData = this.Protocol_OPT5(lane, data);
this.SendEthernetData(sendData);
}
}
private void SendEthernetData(string etherData)
{

View File

@ -1434,14 +1434,14 @@ namespace INT69DB_2A.Forms
public void SetTotalCount()
{
string totalCNT = "", ngCNT = "";
int totalAll = 0, totalPass = 0, totalNG = 0, totalUnder = 0, totalOver = 0, totalExNG = 0;
int totalUnder = 0, totalOver = 0, totalExNG = 0;
for (int i = 0; i < this.ParentForm.SystemConfig.EquipmentColumns; i++)
{
totalAll += this.ParentForm.CollectionWeightData[i].TotalCount;
totalPass += this.ParentForm.CollectionWeightData[i].PassCount;
this.ParentForm.TotalAllCount += this.ParentForm.CollectionWeightData[i].TotalCount;
this.ParentForm.TotalPassCount += this.ParentForm.CollectionWeightData[i].PassCount;
totalNG += this.ParentForm.CollectionWeightData[i].TotalNGCount;
this.ParentForm.TotalNGCount += this.ParentForm.CollectionWeightData[i].TotalNGCount;
totalUnder += this.ParentForm.CollectionWeightData[i].UnderCount;
totalOver += this.ParentForm.CollectionWeightData[i].OverCount;
totalExNG += this.ParentForm.CollectionWeightData[i].ExNGCount;
@ -1451,10 +1451,10 @@ namespace INT69DB_2A.Forms
switch (this.Mode_TotalCnt)
{
case DataStore.E_TotalCnt.f0_Total:
totalCNT = totalAll.ToString();
totalCNT = this.ParentForm.TotalAllCount.ToString();
break;
case DataStore.E_TotalCnt.f1_Pass:
totalCNT = totalPass.ToString();
totalCNT = this.ParentForm.TotalPassCount.ToString();
break;
default:
break;
@ -1467,7 +1467,7 @@ namespace INT69DB_2A.Forms
switch (this.Mode_TotalCntNG)
{
case DataStore.E_TotalCntNG.f0_NG:
ngCNT = totalNG.ToString();
ngCNT = this.ParentForm.TotalNGCount.ToString();
break;
case DataStore.E_TotalCntNG.f1_Under:
ngCNT = totalUnder.ToString();