충돌 해결

master
CJY 2025-12-23 09:25:02 +09:00
parent 12ba390d12
commit 91fc1657f2
8 changed files with 35 additions and 47 deletions

Binary file not shown.

Binary file not shown.

View File

@ -44,6 +44,9 @@ namespace INT69DB_2A.Forms
public bool FlagDllSerial; // DllSerial 사용여부 public bool FlagDllSerial; // DllSerial 사용여부
private string TransferNum; // 수신데이터 ID저장 (재전송 시 사용) private string TransferNum; // 수신데이터 ID저장 (재전송 시 사용)
public bool FlagThreadMessage1; // 플레그 쓰레드 메시지 11 public bool FlagThreadMessage1; // 플레그 쓰레드 메시지 11
public int TotalAllCount; // 스틱1 전체 수량
public int TotalPassCount; // 스틱1 전체 Pass 수량
public int TotalNGCount; // 스틱1 전체 NG 수량
// Motor Download 통신용 변수 // Motor Download 통신용 변수
public int LineNum; public int LineNum;
@ -442,6 +445,9 @@ namespace INT69DB_2A.Forms
this.ColorLogOn = Color.Yellow; this.ColorLogOn = Color.Yellow;
this.TransferNum = "-"; this.TransferNum = "-";
this.FlagThreadMessage1 = false; this.FlagThreadMessage1 = false;
this.TotalAllCount = 0;
this.TotalNGCount = 0;
this.TotalPassCount = 0;
this.PathLaunchFolder = "SD Card\\"; this.PathLaunchFolder = "SD Card\\";
this.PathSystemFileFolder1 = this.PathLaunchFolder + "SystemFile1\\"; this.PathSystemFileFolder1 = this.PathLaunchFolder + "SystemFile1\\";
@ -1511,25 +1517,18 @@ namespace INT69DB_2A.Forms
public string Protocol_OPT5(Collection<WeightData> datas) public string Protocol_OPT5(Collection<WeightData> datas)
{ {
string value = ""; string value = "";
int toTalAll = 0, toTalPass = 0, totalNg = 0;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) StringBuilder sb = new StringBuilder();
{
toTalAll += datas[i].TotalCount;
toTalPass += datas[i].PassCount;
totalNg += datas[i].TotalNGCount;
}
sb.Append((char)0x02); sb.Append((char)0x02);
sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID));
sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber));
value = toTalPass.ToString(); value = this.TotalPassCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = totalNg.ToString(); value = this.TotalNGCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = toTalAll.ToString(); value = this.TotalAllCount.ToString();
sb.Append(value.PadLeft(9, ' ')); sb.Append(value.PadLeft(9, ' '));
if (this.SystemConfig.IsWeightViewForward == true) if (this.SystemConfig.IsWeightViewForward == true)
@ -1583,13 +1582,12 @@ namespace INT69DB_2A.Forms
sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID));
sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber));
value = data.PassCount.ToString(); value = this.TotalPassCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = data.TotalNGCount.ToString(); value = this.TotalNGCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = data.TotalCount.ToString(); value = this.TotalAllCount.ToString();
sb.Append(value.PadLeft(9, ' ')); sb.Append(value.PadLeft(9, ' '));
sb.Append(string.Format("{0:D2}", lane)); sb.Append(string.Format("{0:D2}", lane));
if (data.JudgmentStatus == DataStore.JudgmentStatus.Under) if (data.JudgmentStatus == DataStore.JudgmentStatus.Under)
@ -1612,24 +1610,17 @@ namespace INT69DB_2A.Forms
public string Protocol_OPT5_NotStxEtx(Collection<WeightData> datas) public string Protocol_OPT5_NotStxEtx(Collection<WeightData> datas)
{ {
string value = ""; string value = "";
int toTalAll = 0, toTalPass = 0, totalNg = 0;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) StringBuilder sb = new StringBuilder();
{
toTalAll += datas[i].TotalCount;
toTalPass += datas[i].PassCount;
totalNg += datas[i].TotalNGCount;
}
sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID));
sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber));
value = toTalPass.ToString(); value = this.TotalPassCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = totalNg.ToString(); value = this.TotalNGCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = toTalAll.ToString(); value = this.TotalAllCount.ToString();
sb.Append(value.PadLeft(9, ' ')); sb.Append(value.PadLeft(9, ' '));
if (this.SystemConfig.IsWeightViewForward == true) if (this.SystemConfig.IsWeightViewForward == true)
@ -1681,13 +1672,12 @@ namespace INT69DB_2A.Forms
sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID));
sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber));
value = data.PassCount.ToString(); value = this.TotalPassCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = data.TotalNGCount.ToString(); value = this.TotalNGCount.ToString();
sb.Append(value.PadLeft(7, ' ')); sb.Append(value.PadLeft(7, ' '));
value = data.TotalCount.ToString(); value = this.TotalAllCount.ToString();
sb.Append(value.PadLeft(9, ' ')); sb.Append(value.PadLeft(9, ' '));
sb.Append(string.Format("{0:D2}", lane)); sb.Append(string.Format("{0:D2}", lane));
if (data.JudgmentStatus == DataStore.JudgmentStatus.Under) if (data.JudgmentStatus == DataStore.JudgmentStatus.Under)
@ -3201,6 +3191,9 @@ namespace INT69DB_2A.Forms
case 5: case 5:
this.SendEthernetData(this.Protocol_OPT4_NotStxEtx(datas)); this.SendEthernetData(this.Protocol_OPT4_NotStxEtx(datas));
break; break;
case 6:
this.SendEthernetData(this.Protocol_OPT5_NotStxEtx(datas));
break;
default: default:
break; break;
} }
@ -3335,7 +3328,7 @@ namespace INT69DB_2A.Forms
} }
else if (this.SystemConfig.Serial3Mode == 5) // OPT4 else if (this.SystemConfig.Serial3Mode == 5) // OPT4
this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(this.CollectionWeightData)); this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(this.CollectionWeightData));
else if (this.SystemConfig.Serial3Mode == 6) // OPT5 else if (this.SystemConfig.Serial3Mode == 6) // OPT5
this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(this.CollectionWeightData)); this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(this.CollectionWeightData));
} }
private void TreatSerialCommunication(int lane, WeightData data) private void TreatSerialCommunication(int lane, WeightData data)

View File

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

View File

@ -57,11 +57,11 @@
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="SmartXCommon, Version=3.2.4.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SmartXCommon, Version=3.2.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.2.4_V3대 마지막버전\SmartX3.2.4_IEC1000_DOTNETCF3.5수동설치파일\SmartXCommon.dll</HintPath> <HintPath>..\Document\DLL\SmartXCommon.dll</HintPath>
</Reference> </Reference>
<Reference Include="SmartX_IEC1000, Version=3.2.4.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SmartX_IEC1000, Version=3.2.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.2.4_V3대 마지막버전\SmartX3.2.4_IEC1000_DOTNETCF3.5수동설치파일\SmartX_IEC1000.dll</HintPath> <HintPath>..\Document\DLL\SmartX_IEC1000.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

View File

@ -26,9 +26,9 @@
- Framework : SmartX Framework V3.2.4(update: 2021.01.20) - Framework : SmartX Framework V3.2.4(update: 2021.01.20)
- MainBoard Ver 10.3.1 - MainBoard Ver 10.3.1
- 일본 산코 전시회 요청 - 일본 산코 전시회 요청
1. 메인화면 서브메뉴 - CUT 히든 메뉴 추가 1. 메인화면 서브메뉴 - CUT 히든 메뉴 추가
기본 CUT 신호, timer로 CUT 신호 기능 기본 CUT 신호, timer로 CUT 신호 기능
2. 소수점 3자리 추가 2. 소수점 3자리 추가
@ Ver 6.4.0 by CJY @ Ver 6.4.0 by CJY
- 2025.08.27 - 2025.08.27
@ -69,11 +69,6 @@
temp = 12 -> 20 수정 temp = 12 -> 20 수정
속도 데이터가 추가 되어있다고함(실제로는 -99990000 이거만 수신됨..) 속도 데이터가 추가 되어있다고함(실제로는 -99990000 이거만 수신됨..)
<<<<<<< HEAD
=======
>>>>>>> 875d61f (@ Ver 6.1.0 by LSJ)
=======
>>>>>>> e80d5a7 (@ Ver 6.1.1 by LSJ)
@ Ver 6.1.0 by LSJ @ Ver 6.1.0 by LSJ
- 2024.12.05 - 2024.12.05
- Ver 6.0.0 Modify - Ver 6.0.0 Modify