diff --git a/Cs_HMI/.vscode/settings.json b/Cs_HMI/.vscode/settings.json
index 359cd76..d420fa0 100644
--- a/Cs_HMI/.vscode/settings.json
+++ b/Cs_HMI/.vscode/settings.json
@@ -1,3 +1,4 @@
{
- "dotnet.preferCSharpExtension": true
+ "dotnet.preferCSharpExtension": true,
+ "dotnet.defaultSolution": "AGVCSharp.sln"
}
\ No newline at end of file
diff --git a/Cs_HMI/AGVCSharp.sln b/Cs_HMI/AGVCSharp.sln
index 354b1e3..94f2190 100644
--- a/Cs_HMI/AGVCSharp.sln
+++ b/Cs_HMI/AGVCSharp.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.14.36310.24
+# Visual Studio Express 15 for Windows Desktop
+VisualStudioVersion = 15.0.36324.19
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sub", "Sub", "{C423C39A-44E7-4F09-B2F7-7943975FF948}"
EndProject
@@ -36,10 +36,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGVMapEditor", "AGVLogic\AG
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGVSimulator", "AGVLogic\AGVSimulator\AGVSimulator.csproj", "{B2C3D4E5-0000-0000-0000-000000000000}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{C8D5274F-AC00-46C7-1F8D-E88E81087A52}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_BMS", "TestProject\Test_BMS\Test_BMS.csproj", "{CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -170,18 +166,6 @@ Global
{B2C3D4E5-0000-0000-0000-000000000000}.Release|x64.Build.0 = Release|Any CPU
{B2C3D4E5-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|Any CPU
{B2C3D4E5-0000-0000-0000-000000000000}.Release|x86.Build.0 = Release|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x64.ActiveCfg = Debug|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x64.Build.0 = Debug|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x86.ActiveCfg = Debug|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x86.Build.0 = Debug|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|Any CPU.Build.0 = Release|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x64.ActiveCfg = Release|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x64.Build.0 = Release|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x86.ActiveCfg = Release|Any CPU
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -194,7 +178,6 @@ Global
{C5F7A8B2-8D3E-4A1B-9C6E-7F4D5E2A9B1C} = {E5C75D32-5AD6-44DD-8F27-E32023206EBB}
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890} = {E5C75D32-5AD6-44DD-8F27-E32023206EBB}
{B2C3D4E5-0000-0000-0000-000000000000} = {E5C75D32-5AD6-44DD-8F27-E32023206EBB}
- {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E} = {C8D5274F-AC00-46C7-1F8D-E88E81087A52}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B5B1FD72-356F-4840-83E8-B070AC21C8D9}
diff --git a/Cs_HMI/Project/AGV4.csproj b/Cs_HMI/Project/AGV4.csproj
index 08abccd..8a89e0b 100644
--- a/Cs_HMI/Project/AGV4.csproj
+++ b/Cs_HMI/Project/AGV4.csproj
@@ -41,7 +41,7 @@
true
Full
False
- ..\..\..\..\..\amkor\AGV4\
+ ..\..\..\..\..\Amkor\AGV4\
DEBUG;TRACE
prompt
4
@@ -341,6 +341,9 @@
Form
+
+ Form
+
Form
diff --git a/Cs_HMI/Project/AGV4.csproj.bak b/Cs_HMI/Project/AGV4.csproj.bak
deleted file mode 100644
index 7107566..0000000
--- a/Cs_HMI/Project/AGV4.csproj.bak
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- WinExe
- net8.0-windows
- enable
- true
- enable
- x64
- S:\Amkor\AGV4
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- Settings.settings
-
-
-
-
-
- PreserveNewest
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- PreserveNewest
-
-
-
-
-
- ..\DLL\arCommUtil.dll
-
-
- ..\DLL\Winsock Orcas.dll
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Cs_HMI/Project/Device/BMS.cs b/Cs_HMI/Project/Device/BMS.cs
index 921d3fc..1be54ca 100644
--- a/Cs_HMI/Project/Device/BMS.cs
+++ b/Cs_HMI/Project/Device/BMS.cs
@@ -103,6 +103,11 @@ namespace arDev
RaiseMessage(MessageType.Error, $"데이터의 길이가 {MinRecvLength}가 아닙니다 길이={data.Length}");
return false;
}
+ else
+ {
+ var rxstr = string.Join(" ", data.Select(t => t.ToString("X2")));
+ RaiseMessage(MessageType.Recv, $"Querh:{QueryIndex},Data:{rxstr}" );
+ }
if (QueryIndex == 0)
{
diff --git a/Cs_HMI/Project/Device/Xbee _OLD.cs b/Cs_HMI/Project/Device/Xbee _OLD.cs
deleted file mode 100644
index 51e3384..0000000
--- a/Cs_HMI/Project/Device/Xbee _OLD.cs
+++ /dev/null
@@ -1,402 +0,0 @@
-//using System;
-//using System.Collections.Generic;
-//using System.Linq;
-//using System.Text;
-//using System.ComponentModel;
-//using System.Threading;
-//using COMM;
-//using System.Runtime.Remoting.Messaging;
-//using AR;
-
-//namespace Project.Device
-//{
-// public class Xbee_OLD : arDev.arRS232
-// {
-// public Xbee_OLD()
-// {
-
-// }
-
-// public string buffer = string.Empty;
-// public System.Text.StringBuilder newbuffer = new StringBuilder();
-// protected override bool CustomParser(byte[] buf, out byte[] remainBuffer)
-// {
-// //일반 kit 명령은 0x02 kit번호, kit값 0x03
-// //상태 명령은 0x04 메세지데이터 0x05
-
-// Console.WriteLine("custom parse len=" + buf.Length.ToString());
-
-// List sparebuffer = new List();
-// Boolean bComplete = false;
-// for (int i = 0; i < buf.Length; i++)
-// {
-// var incomByte = buf[i];
-// if (bComplete == true) sparebuffer.Add(incomByte);
-// else
-// {
-// if (findSTX == false)
-// {
-// if (incomByte != 0x02)
-// {
-// //버리는데이터
-// }
-// else
-// {
-// findSTX = true;
-// tempBuffer.Clear();
-// tempBuffer.Add(incomByte);
-// }
-// }
-// else
-// {
-// tempBuffer.Add(incomByte);
-
-// if (incomByte == 0x03)
-// {
-// //데이터가 맞게 수신됨
-// LastReceiveBuffer = tempBuffer.ToArray();
-// bComplete = true;
-// findSTX = false;
-// }
-// else if (tempBuffer.Count > 30)
-// {
-// tempBuffer.Clear();
-// findSTX = false;
-// }
-// }
-// }
-// }
-// remainBuffer = sparebuffer.ToArray();
-// return bComplete;
-// }
-
-
-// public override bool ProcessRecvData(byte[] data)
-// {
-// var kitno = (char)(data[1]);
-// var kitval = (char)(data[2]);
-// NewMsgEvent(kitno, kitval);
-// return true;
-// }
-
-// public void NewMsgEvent(char kitNo, char kitVal)
-// {
-// //대상위치 확인
-// ePosition kitPos = ePosition.NONE;
-// if (kitNo == '9') kitPos = ePosition.QC;
-// else if (kitNo == '1') kitPos = ePosition.F1;
-// else if (kitNo == '2') kitPos = ePosition.F2;
-// else if (kitNo == '3') kitPos = ePosition.F3;
-// else if (kitNo == '4') kitPos = ePosition.F4;
-// else
-// {
-// if (kitNo == '0') return;
-// PUB.log.Add($"비허가 키트번호 무시 번호={kitNo},값={kitVal}");
-// return;
-// }
-
-// //if (kitNo= 'F')
-// //{
-// // PUB.Speak("알 수 없는 키트번호 입니다");
-// // PUB.logsys.Add($"키트번호별위치확인실패 값={kitNo}");
-// // return;
-// //}
-
-// //(ePosition)int.Parse(kitNo.ToString());
-// PUB.logxbee.Add(string.Format("Xbee:newMsgEvent:{0},{1}=>{2}", kitNo, kitVal, kitPos));
-// if (PUB.CheckManualChargeMode() == false)
-// {
-// PUB.log.Add($"수동 충전 중이라 콜 기능을 취소 합니다");
-// return;
-// }
-
-// bool FixButton = kitPos == ePosition.NONE;
-// if (kitPos == ePosition.NONE)
-// {
-// if (kitVal == '1') kitPos = ePosition.QC;
-// else if (kitVal == '2') kitPos = ePosition.CHARGE;
-// else if (kitVal == '4') kitPos = ePosition.QC;
-// //else if (kitVal == '3') kitPos = ePosition.QA;
-// else
-// {
-// PUB.log.Add($"AGV버튼 이벤트 실행 값:{kitVal} 취소");
-// return;
-// }
-// kitVal = '1'; //버튼은 무조건 ON상태로 한다
-// }
-
-// //자동상태가 아니라면 오류처리
-// if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false || PUB.sm.Step != StateMachine.eSMStep.RUN)
-// {
-// PUB.log.AddE("'자동실행' 상태가 아니므로 콜/취소 작업을 할 수 없습니다 콜:" + kitPos.ToString() + ",값=" + kitVal.ToString());
-// PUB.Speak(Lang.자동운전상태가아닙니다);
-// return;
-// }
-
-// //충전기를 제외하고 '1'의 값은 호출을 원하는값이다.('0'=취소)
-// if (kitVal == '1')
-// {
-// //qA혹은 Pack 에서 해당 버튼을 눌렀을때의 처리방법
-// //if (PUB.Result.CurrentPos == ePosition.QA && kitPos == ePosition.QA)
-// //{
-// // PUB.logsys.AddE("QA위치에서 QA버튼을 눌렀음 명령 취소함");
-// // PUB.Speak("현재 위치는 QA 입니다.");
-// // return;
-// //}
-
-// //상/하차 작업중이 아니라면 콜을 받는다
-// if (PUB.sm.RunStep != StateMachine.ERunStep.GOUP && PUB.sm.RunStep != StateMachine.ERunStep.GODOWN)
-// {
-// //call을 받으려면 대상위 (2=QC,3,4,5,6,7)
-// //콜을 요청하는 곳 (2=QC,3=FVI-1,4,5,6,7==FVI-5)
-// //1번은 충전기
-
-// //콜버튼으로 대상위치를 다시 결정한다.
-// //대상번호는 콜번호에서 +2을 하면 된다.
-// //대상번호 PK=1,QA2=2,QA1=3,QC=4
-// //QC의경우 콜Kit번호는 2이므로, 이동대상은 +2인 4가 되어야 함
-// //콜번호와 RFID대상번호는 2의 오차가 발생함, 현재 설치된 RFID를 모두 변경할 수 없어서 이렇게 운용함
-
-
-// RaiseMessage(MessageType.Normal, string.Format("CALL확정 Kit={0},대상위치={1}", kitNo, kitPos));
-
-// PUB.AGV.data.CallNo = int.Parse(kitNo.ToString());
-// PUB.AGV.data.CallString = kitNo.ToString();
-
-// PUB.Result.CommandKit = kitNo;
-// PUB.Result.TargetPos = kitPos;
-// SendToKit(kitNo, '1', (PUB.IsCanCALL() ? '1' : '0')); //콜확정을 클라이언트에 알림
-
-// PUB.Speak(kitPos.ToString() + Lang.위치로이동합니다);
-
-// //상태머신을 변경한다 (충전 OFF상태로 간다, 충전상태가 아니면 바로 이동하게됨)
-// //Pub.sm.ResetRunStep();
-// //Pub.sm.setNewStep(StateMachine.eSMStep.RUN);
-
-// //qa, pack 은 하차 전용이다
-// PUB.sm.ClearRunStep();
-// PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOUP);
-// PUB.sm.SetNewStep(StateMachine.eSMStep.RUN);
-// }
-// else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN && VAR.BOOL[eVarBool.WAIT_COVER_DOWN] == false && VAR.BOOL[eVarBool.WAIT_COVER_UP] == false)
-// {
-// //하차중에 받을 수 있게하자 (단 FVi1 이하일때에는 무시하자) 230710 - 김수곤
-// if (PUB.Result.TargetPos == ePosition.QC && PUB.Result.CurrentPos < ePosition.F1)
-// {
-// PUB.log.Add($"하차중이지만 FVI #1 아래에 있으니 콜을 취소 합니다");
-// SendToKit(kitNo, '0', '0');
-// RaiseMessage(MessageType.Normal, $"QC 추가 콜이지만 위치가 #1번 이하이므로 취소 됩니다. Kit={kitNo},현재={PUB.Result.CurrentPos},대상={PUB.Result.TargetPos}");
-// }
-// else
-// {
-// RaiseMessage(MessageType.Normal, string.Format("CALL확정(추가) Kit={0},대상위치={1}", kitNo, kitPos));
-
-// PUB.AGV.data.CallNo = int.Parse(kitNo.ToString());
-// PUB.AGV.data.CallString = kitNo.ToString();
-
-// PUB.Result.CommandKit = kitNo;
-// PUB.Result.TargetPos = kitPos;
-
-// SendToKit(kitNo, '1', (PUB.IsCanCALL() ? '1' : '0')); //콜확정을 클라이언트에 알림
-
-// PUB.Speak(kitPos.ToString() + Lang.위치로이동합니다);
-
-// //상태머신을 변경한다 (충전 OFF상태로 간다, 충전상태가 아니면 바로 이동하게됨)
-// //Pub.sm.ResetRunStep();
-// //Pub.sm.setNewStep(StateMachine.eSMStep.RUN);
-
-// //qa, pack 은 하차 전용이다
-// PUB.sm.ClearRunStep();
-// PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOUP);
-// PUB.sm.SetNewStep(StateMachine.eSMStep.RUN);
-// }
-
-// }
-// //else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN && PUB.Result.CurrentPos == ePosition.QA)
-// //{
-// // RaiseMessage(MessageType.Normal, string.Format("CALL확정 Kit={0},대상위치={1}", kitNo, kitPos));
-
-// // PUB.Result.CommandKit = kitNo;
-// // PUB.Result.TargetPos = kitPos;
-// // SendToKit(kitNo, '1'); //콜확정을 클라이언트에 알림
-
-// // PUB.Speak(kitPos.ToString() + "위치로 이동 합니다");
-
-// // //상태머신을 변경한다 (충전 OFF상태로 간다, 충전상태가 아니면 바로 이동하게됨)
-// // // Pub.sm.ResetRunStep();
-// // // Pub.sm.setNewStep(StateMachine.eSMStep.RUN);
-
-// // //qa => pack 은 하차 전용이다
-// // //QA에서 PACK이동시에는 바로 N극 멈춤 기능을 사용해도도된다.(자재가 있으며, 커버가 내려가 있으므로 느리게 동작해야함)
-// // PUB.sm.ClearRunStep();
-// // PUB.sm.SetNewRunStep(StateMachine.ERunStep.GODOWN);
-// // PUB.sm.SetNewStep(StateMachine.ESMStep.RUN);
-
-// // PUB.AGV.AGVMoveStop("xbee_newmsgevent", arDev.Narumi.eStopOpt.MarkStop);// (arDev.Narumi.eAgvCmd.MoveStop,.SetNextStop_Mark(true, "xbee godn,qa,pack");
-// // PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up);
-// //}
-// else if (PUB.Result.TargetPos == kitPos) ////현재 지정된 클라이언트가 또 눌렀다
-// {
-// PUB.Result.TargetPos = kitPos;
-// PUB.AGV.data.CallNo = int.Parse(kitNo.ToString());
-// PUB.AGV.data.CallString = kitNo.ToString();
-
-// //상차 대기 중이라면 커버를 자동 올려준다
-// //이것은 QC만 가능하다
-// //QC가 QA혹은 PACK으로 보낼때 사용함
-// if (kitPos == ePosition.QC &&
-// VAR.BOOL[eVarBool.FLAG_LIMITLOW] == true)
-// {
-// RaiseMessage(MessageType.Normal, "QC위치에서 자동으로 커버를 올립니다");
-// //PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up);
-// PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
-// }
-// else
-// {
-// //커버대기상태라면 커버를 자동으로 처리해준다.
-// if (PUB.sm.Step == StateMachine.eSMStep.RUN && (PUB.sm.RunStep == StateMachine.ERunStep.GOUP || PUB.sm.RunStep == StateMachine.ERunStep.GODOWN))
-// {
-
-// if (VAR.BOOL[eVarBool.WAIT_COVER_DOWN] == true)
-// {
-// //var ld = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LD);
-// //var rd = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RD);
-// //if (ld == false || rd == false)
-// //{
-// // PUB.log.Add("사용자 콜버튼 추가 동작 - Z내림");
-// // PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);
-// // PUB.Speak(Lang.커버를내립니다);
-// //}
-// }
-// else if (VAR.BOOL[eVarBool.WAIT_COVER_UP] == true)
-// {
-// //var lu = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU);
-// //var ru = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU);
-
-// //if (lu == false || ru == false)
-// //{
-// // PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up);
-// // PUB.log.Add("사용자 콜버튼 추가 동작 - Z올림");
-// // PUB.Speak(Lang.커버를올립니다);
-// //}
-// }
-// else RaiseMessage(MessageType.Normal, string.Format("이미 CALL이 확정되었습니다 No={0},Pos={1}", kitNo, kitPos));
-// }
-// else RaiseMessage(MessageType.Normal, string.Format("이미 CALL이 확정되었습니다 No={0},Pos={1}", kitNo, kitPos));
-// }
-// SendToKit(kitNo, '1', (PUB.IsCanCALL() ? '1' : '0')); //콜확정을 클라이언트에 알림
-// }
-// else
-// {
-// //다른대상이 이미 선택된 상태이므로 CANCEL 한다.
-// SendToKit(kitNo, '0', (PUB.IsCanCALL() ? '1' : '0'));
-// RaiseMessage(MessageType.Normal, string.Format("다른 CALL이 확정된 상태입니다. 요청KIT={2},확정KIT={0},위치={1}", PUB.Result.TargetPos - 2, PUB.Result.TargetPos, kitNo));
-// }
-// }
-// else if (kitVal == '0') //캔슬버튼을 눌렀다
-// {
-// //목표번호가 캔슬버튼을 눌렀다
-// if (PUB.Result.TargetPos == kitPos)
-// {
-// //상차가 완료되면 TargetPos 가 변경되어 ,더이상 해당 버튼으로는 취소하지 못한다
-// PUB.AGV.data.CallNo = 0;
-// PUB.AGV.data.CallString = "--";
-
-// SendToKit(kitNo, '0', (PUB.IsCanCALL() ? '1' : '0'));
-// RaiseMessage(MessageType.Normal, string.Format("콜 취소 Kit={0}", kitNo));
-// if (PUB.sm.RunStep != StateMachine.ERunStep.GOHOME)
-// {
-// PUB.Result.CommandKit = kitNo;
-// PUB.Result.TargetPos = ePosition.QC;
-// PUB.sm.ClearRunStep();
-// PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOHOME);
-// PUB.sm.SetNewStep(StateMachine.eSMStep.RUN);
-// RaiseMessage(MessageType.Normal, string.Format("콜 취소로 인해 홈으로 이동합니다 Kit={0}", kitNo));
-// }
-
-// }
-// else
-// {
-// //다른놈이 취소 버튼을 눌렀다. ㅋㅋ
-// //아무~ 의미 없다.
-// SendToKit(kitNo, '0', (PUB.IsCanCALL() ? '1' : '0'));
-// RaiseMessage(MessageType.Normal, string.Format("해당 콜취소는 유효하지 않습니다 요청KIT={0},확정KIT={1}", kitNo, PUB.Result.TargetPos - 2));
-// }
-// }
-// else if (kitVal == '2') //BACKWORK시에만 이 값이 전송되게 한다
-// {
-// //QA 이동 명령
-// //발동조건 1. QC 위치에서 GOUP(대기 혹은 상차완료)상태일때 (일반적인경우)
-// //발동조건 2. QC 위치에서 IDLE 상태일때 (GOUP상태로 하지 않고 바로 싫어버린경우)
-// //발동조건 3. 충전중일때
-
-// //if (kitPos != ePosition.QC)
-// //{
-// // RaiseMessage(MessageType.Error, $"back 버튼은 QC버튼만 사용 가능 합니다");
-// // return;
-// //}
-
-// //if (kitPos == ePosition.QC && PUB.Result.CurrentPos != ePosition.QC)
-// //{
-// // RaiseMessage(MessageType.Error, string.Format("QC의 QA버튼은 홈위치에 있어야 사용이 가능 합니다"));
-// // return;
-// //}
-
-// ////명령송신은 QC로 고정한다
-// //PUB.Result.CommandKit = '2';
-// //PUB.Result.TargetPos = ePosition.QA;
-// //PUB.sm.ClearRunStep();
-// //PUB.sm.SetNewRunStep(StateMachine.ERunStep.GODOWN);
-// //PUB.sm.SetNewStep(StateMachine.ESMStep.RUN);
-// //RaiseMessage(MessageType.Normal, string.Format("후진하차 모드 대상위치={0}", ePosition.QA));
-// //PUB.logsys.AddI("QC의 QA리모콘 버튼 작업 입니다");
-// }
-// }
-
-
-// public void SendToKit(char kitNo, char Value, char enbcall)
-// {
-// List buffer = new List
-// {
-// 0x02,
-// (byte)kitNo,
-// (byte)Value,
-// (byte)enbcall,
-// 0x03
-// };
-// WriteData(buffer.ToArray());
-// //RaiseMessage(MessageType.Normal, $"지그비전송 {kitNo}:{Value}:{enbcall}");
-// }
-
-// public string GetStatusString()
-// {
-// return DateTime.Now.ToString();
-// }
-
-// public void SendStatus(String StatusString)
-// {
-
-// ////IO
-
-// char kitno = '0';
-// char kitval = '1';
-// if (PUB.Result.TargetPos == ePosition.F1) kitno = '1';
-// else if (PUB.Result.TargetPos == ePosition.F2) kitno = '2';
-// else if (PUB.Result.TargetPos == ePosition.F3) kitno = '3';
-// else if (PUB.Result.TargetPos == ePosition.F4) kitno = '4';
-// else if (PUB.Result.TargetPos == ePosition.QC) kitno = '9';
-// else
-// {
-// //충전기 충전하는 것으로한다
-// if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == false && VAR.BOOL[eVarBool.FLAG_CHARGEONM] == false)
-// kitval = '0';
-// }
-
-// //콜가능여부도 전송한다
-// var enbcall = PUB.IsCanCALL() ? '1' : '0';
-// SendToKit(kitno, kitval, enbcall);
-
-
-// }
-// }
-//}
diff --git a/Cs_HMI/Project/Device/_DeviceManagement.cs b/Cs_HMI/Project/Device/_DeviceManagement.cs
new file mode 100644
index 0000000..2c26166
--- /dev/null
+++ b/Cs_HMI/Project/Device/_DeviceManagement.cs
@@ -0,0 +1,311 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Media.Animation;
+using AR;
+using arCtl;
+using COMM;
+using Project.StateMachine;
+
+namespace Project
+{
+ ///
+ /// 장치 연결 및 상태 전송을 담당하는 별도 태스크
+ ///
+ public partial class fMain
+ {
+ // 장치 관리 태스크 관련
+ private Task deviceManagementTask;
+ private CancellationTokenSource deviceManagementCts;
+ private volatile bool isDeviceManagementRunning = false;
+
+ ///
+ /// 장치 관리 태스크 시작 (IDLE 상태 진입 시 호출)
+ ///
+ public void StartDeviceManagementTask()
+ {
+ if (isDeviceManagementRunning)
+ {
+ PUB.log.Add("DeviceManagement", "이미 실행 중입니다.");
+ return;
+ }
+
+ isDeviceManagementRunning = true;
+ deviceManagementCts = new CancellationTokenSource();
+
+ deviceManagementTask = Task.Factory.StartNew(
+ () => DeviceManagementWorker(deviceManagementCts.Token),
+ deviceManagementCts.Token,
+ TaskCreationOptions.LongRunning,
+ TaskScheduler.Default
+ );
+
+ PUB.log.Add("DeviceManagement", "장치 관리 태스크 시작");
+ }
+
+ ///
+ /// 장치 관리 태스크 종료
+ ///
+ public void StopDeviceManagementTask()
+ {
+ if (!isDeviceManagementRunning)
+ return;
+
+ isDeviceManagementRunning = false;
+
+ try
+ {
+ deviceManagementCts?.Cancel();
+
+ if (deviceManagementTask != null)
+ {
+ if (!deviceManagementTask.Wait(3000)) // 3초 대기
+ {
+ PUB.log.AddE("DeviceManagement:태스크 종료 대기 시간 초과");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE($"DeviceManagement 종료 중 오류: {ex.Message}");
+ }
+ finally
+ {
+ deviceManagementCts?.Dispose();
+ deviceManagementCts = null;
+ deviceManagementTask = null;
+ PUB.log.Add("DeviceManagement", "장치 관리 태스크 종료");
+ }
+ }
+
+ ///
+ /// 장치 관리 워커 (별도 태스크에서 실행)
+ /// - 장치 연결 관리 (AGV, XBee, BMS)
+ /// - 자동 상태 전송 (XBee, BMS)
+ ///
+ private void DeviceManagementWorker(CancellationToken cancellationToken)
+ {
+ PUB.log.Add("DeviceManagementWorker", "시작");
+
+ DateTime lastXbeStatusSendTime = DateTime.Now;
+ DateTime lastBmsQueryTime = DateTime.Now;
+
+ while (!cancellationToken.IsCancellationRequested && isDeviceManagementRunning)
+ {
+ try
+ {
+ // 상태머신이 IDLE 이상이고 CLOSING 미만일 때만 동작
+ if (PUB.sm.Step >= eSMStep.IDLE && PUB.sm.Step < eSMStep.CLOSING)
+ {
+ // ========== 1. 장치 연결 관리 ==========
+ ManageDeviceConnections();
+
+ // ========== 2. XBee 상태 전송 ==========
+ if (PUB.XBE != null && PUB.XBE.IsOpen)
+ {
+ var tsXbe = DateTime.Now - lastXbeStatusSendTime;
+ if (tsXbe.TotalSeconds >= PUB.setting.interval_xbe)
+ {
+ lastXbeStatusSendTime = DateTime.Now;
+ ThreadPool.QueueUserWorkItem(_ =>
+ {
+ try
+ {
+ PUB.XBE.SendStatus();
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE($"XBee SendStatus 오류: {ex.Message}");
+ }
+ });
+ }
+ }
+
+ // ========== 3. BMS 쿼리 및 배터리 경고 ==========
+ if (PUB.BMS != null && PUB.BMS.IsOpen)
+ {
+ var tsBms = DateTime.Now - lastBmsQueryTime;
+ if (tsBms.TotalSeconds >= PUB.setting.interval_bms)
+ {
+ lastBmsQueryTime = DateTime.Now;
+ ThreadPool.QueueUserWorkItem(_ =>
+ {
+ try
+ {
+ PUB.BMS.SendQuery();
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE($"BMS SendQuery 오류: {ex.Message}");
+ }
+ });
+ }
+
+ // 배터리 경고음
+ try
+ {
+ Update_BatteryWarnSpeak();
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE($"BatteryWarnSpeak 오류: {ex.Message}");
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE($"DeviceManagementWorker 오류: {ex.Message}");
+ }
+
+ // 1초 대기 (또는 취소 요청 시 즉시 종료)
+ try
+ {
+ Task.Delay(1000, cancellationToken).Wait();
+ }
+ catch (OperationCanceledException)
+ {
+ break;
+ }
+ }
+
+ PUB.log.Add("DeviceManagementWorker", "종료");
+ }
+
+ ///
+ /// 장치 연결 상태 관리
+ ///
+ private void ManageDeviceConnections()
+ {
+ try
+ {
+ // AGV 연결
+ ConnectSerialPort(PUB.AGV, PUB.setting.Port_AGV, PUB.setting.Baud_AGV,
+ eVarTime.LastConn_AGV, eVarTime.LastConnTry_AGV, eVarTime.LastRecv_AGV);
+
+ // XBee 연결
+ ConnectSerialPort(PUB.XBE, PUB.setting.Port_XBE, PUB.setting.Baud_XBE,
+ eVarTime.LastConn_XBE, eVarTime.LastConnTry_XBE, eVarTime.LastRecv_XBE);
+
+ // BMS 연결
+ if (PUB.BMS.IsOpen == false)
+ {
+ var ts = VAR.TIME.RUN(eVarTime.LastConn_BAT);
+ if (ts.TotalSeconds > 3)
+ {
+ PUB.log.Add($"BMS 연결 시도: {PUB.setting.Port_BAT}");
+ PUB.BMS.PortName = PUB.setting.Port_BAT;
+ if (PUB.BMS.Open())
+ PUB.log.AddI($"BMS 연결 완료({PUB.setting.Port_BAT})");
+
+ VAR.TIME.Update(eVarTime.LastConn_BAT);
+ VAR.TIME.Update(eVarTime.LastConnTry_BAT);
+ }
+ }
+ else if (PUB.BMS.IsValid == false)
+ {
+ var ts = VAR.TIME.RUN(eVarTime.LastConnTry_BAT);
+ if (ts.TotalSeconds > (PUB.setting.interval_bms * 2.5))
+ {
+ PUB.log.Add("BMS 자동 연결 해제 (응답 없음)");
+ PUB.BMS.Close();
+ VAR.TIME.Set(eVarTime.LastConn_BAT, DateTime.Now.AddSeconds(5));
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE($"ManageDeviceConnections 오류: {ex.Message}");
+ }
+ }
+
+ ///
+ /// 시리얼 포트 연결 (arDev.arRS232)
+ ///
+ void ConnectSerialPort(arDev.arRS232 dev, string port, int baud, eVarTime conn, eVarTime conntry, eVarTime recvtime)
+ {
+ if (dev.IsOpen == false && port.isEmpty() == false)
+ {
+ var tsPLC = VAR.TIME.RUN(conntry);
+ if (tsPLC.TotalSeconds > 5)
+ {
+ VAR.TIME.Update(conntry);
+ try
+ {
+ VAR.TIME.Update(recvtime);
+ dev.PortName = port;
+ dev.BaudRate = baud;
+ if (dev.Open())
+ {
+ PUB.log.Add(port, $"[AGV:{port}:{baud}] 연결 완료");
+ }
+ else
+ {
+ var errmessage = dev.errorMessage;
+ PUB.log.AddE($"[AGV:{port}:{baud}] {errmessage}");
+ }
+ VAR.TIME.Update(conn);
+ VAR.TIME.Update(conntry);
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE(ex.Message);
+ }
+ }
+ }
+ else if (dev.PortName.Equals(port) == false)
+ {
+ PUB.log.Add(port, $"포트 변경({dev.PortName}->{port})으로 연결 종료");
+ dev.Close();
+ VAR.TIME.Update(conntry);
+ }
+ }
+
+ ///
+ /// 시리얼 포트 연결 (Device.Xbee)
+ ///
+ void ConnectSerialPort(Device.Xbee dev, string port, int baud, eVarTime conn, eVarTime conntry, eVarTime recvtime)
+ {
+ if (dev.IsOpen == false && port.isEmpty() == false)
+ {
+ var tsPLC = VAR.TIME.RUN(conntry);
+ if (tsPLC.TotalSeconds > 5)
+ {
+ VAR.TIME.Update(conntry);
+ try
+ {
+ VAR.TIME.Update(recvtime);
+ dev.PortName = port;
+ dev.BaudRate = baud;
+ if (dev.Open())
+ {
+ PUB.log.Add(port, $"[XBEE:{port}:{baud}] 연결 완료");
+ }
+ else
+ {
+ var errmessage = dev.errorMessage;
+ PUB.log.AddE($"[XBEE:{port}:{baud}] {errmessage}");
+ }
+ VAR.TIME.Update(conn);
+ VAR.TIME.Update(conntry);
+ }
+ catch (Exception ex)
+ {
+ PUB.log.AddE(ex.Message);
+ }
+ }
+ }
+ else if (dev.PortName.Equals(port) == false)
+ {
+ PUB.log.Add(port, $"포트 변경({dev.PortName}->{port})으로 연결 종료");
+ dev.Close();
+ VAR.TIME[(int)conntry] = DateTime.Now;
+ }
+ }
+ }
+}
diff --git a/Cs_HMI/Project/Project.sln b/Cs_HMI/Project/Project.sln
new file mode 100644
index 0000000..d3ba9bb
--- /dev/null
+++ b/Cs_HMI/Project/Project.sln
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.2.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGV4", "AGV4.csproj", "{6D0CF7CE-1916-3231-E152-64E6C2B57D2B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6D0CF7CE-1916-3231-E152-64E6C2B57D2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6D0CF7CE-1916-3231-E152-64E6C2B57D2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6D0CF7CE-1916-3231-E152-64E6C2B57D2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6D0CF7CE-1916-3231-E152-64E6C2B57D2B}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {9EAFEBD8-1AC9-4339-BD45-B1F43F120F34}
+ EndGlobalSection
+EndGlobal
diff --git a/Cs_HMI/Project/Properties/AssemblyInfo.cs b/Cs_HMI/Project/Properties/AssemblyInfo.cs
index 2441edb..3a467be 100644
--- a/Cs_HMI/Project/Properties/AssemblyInfo.cs
+++ b/Cs_HMI/Project/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("25.11.14.1530")]
-[assembly: AssemblyFileVersion("25.11.14.1530")]
+[assembly: AssemblyVersion("25.12.04.0000")]
+[assembly: AssemblyFileVersion("25.12.04.0000")]
diff --git a/Cs_HMI/Project/StateMachine/Step/_STEP_CLOSE.cs b/Cs_HMI/Project/StateMachine/Step/_STEP_CLOSE.cs
index 32ac26b..2740d6e 100644
--- a/Cs_HMI/Project/StateMachine/Step/_STEP_CLOSE.cs
+++ b/Cs_HMI/Project/StateMachine/Step/_STEP_CLOSE.cs
@@ -17,6 +17,9 @@ namespace Project
PUB.bShutdown = true;
//if (PUB.PLC != null) PUB.PLC.Dispose();
+ // 장치 관리 태스크 종료
+ StopDeviceManagementTask();
+
PUB.AddEEDB("프로그램 종료");
PUB.log.Add("Program Close");
PUB.log.Flush();
diff --git a/Cs_HMI/Project/StateMachine/_Loop.cs b/Cs_HMI/Project/StateMachine/_Loop.cs
index 025b0c1..c1b4b3a 100644
--- a/Cs_HMI/Project/StateMachine/_Loop.cs
+++ b/Cs_HMI/Project/StateMachine/_Loop.cs
@@ -153,6 +153,9 @@ namespace Project
PUB.Result.SMSG_ProgressEnable = false;
UpdateStatusMessage("준비 완료", Color.Red, Color.Gold);
if (startuptime.Year == 1982) startuptime = DateTime.Now;
+
+ // 장치 관리 태스크 시작 (IDLE 진입 시 한 번만)
+ StartDeviceManagementTask();
}
//자동소거기능
diff --git a/Cs_HMI/Project/StateMachine/_SPS.cs b/Cs_HMI/Project/StateMachine/_SPS.cs
index adacc9e..8a3d287 100644
--- a/Cs_HMI/Project/StateMachine/_SPS.cs
+++ b/Cs_HMI/Project/StateMachine/_SPS.cs
@@ -13,234 +13,25 @@ using Project.StateMachine;
namespace Project
{
-
+ ///
+ /// SPS (Scan Per Second) 이벤트 핸들러
+ /// - 장치 연결 및 상태 전송 기능은 _DeviceManagement.cs로 분리됨
+ ///
public partial class fMain
{
DateTime chargesynctime = DateTime.Now;
DateTime agvsendstarttime = DateTime.Now;
- // 장치 연결 쓰레드 관련
- private Thread deviceConnectionThread;
- private volatile bool isDeviceConnectionRunning = false;
-
- void ConnectSerialPort(arDev.arRS232 dev, string port, int baud, eVarTime conn, eVarTime conntry, eVarTime recvtime)
- {
- if (dev.IsOpen == false && port.isEmpty() == false)
- {
- var tsPLC = VAR.TIME.RUN(conntry);
- if (tsPLC.TotalSeconds > 5)
- {
- VAR.TIME.Update(conntry);
- try
- {
- VAR.TIME.Update(recvtime); //this.LastReceiveTime = DateTime.Now;
- dev.PortName = port;
- dev.BaudRate = baud;
- if (dev.Open())
- {
- PUB.log.Add(port, $"[AGV:{port}:{baud}]연결완료");
- }
- else
- {
- var errmessage = dev.errorMessage;
- PUB.log.AddE($"[AGV:{port}:{baud}] {errmessage}");
- }
- VAR.TIME.Update(conn);
- VAR.TIME.Update(conntry);
- }
- catch (Exception ex)
- {
- PUB.log.AddE(ex.Message);
- }
- }
- }
- else if (dev.PortName.Equals(port) == false)
- {
- PUB.log.Add(port, $"포트변경({dev.PortName}->{port})으로 연결 종료");
- dev.Close();
- VAR.TIME.Update(conntry);
- }
- }
- void ConnectSerialPort(Device.Xbee dev, string port, int baud, eVarTime conn, eVarTime conntry, eVarTime recvtime)
- {
- if (dev.IsOpen == false && port.isEmpty() == false)
- {
- var tsPLC = VAR.TIME.RUN(conntry);
- if (tsPLC.TotalSeconds > 5)
- {
- VAR.TIME.Update(conntry);
- try
- {
- VAR.TIME.Update(recvtime); //this.LastReceiveTime = DateTime.Now;
- dev.PortName = port;
- dev.BaudRate = baud;
- if (dev.Open())
- {
- PUB.log.Add(port, $"[XBEE:{port}:{baud}]연결완료");
- }
- else
- {
- var errmessage = dev.errorMessage;
- PUB.log.AddE($"[XBEE:{port}:{baud}] {errmessage}");
- }
- VAR.TIME.Update(conn);
- VAR.TIME.Update(conntry);
- }
- catch (Exception ex)
- {
- PUB.log.AddE(ex.Message);
- }
- }
- }
- else if (dev.PortName.Equals(port) == false)
- {
- PUB.log.Add(port, $"포트변경({dev.PortName}->{port})으로 연결 종료");
- dev.Close();
- VAR.TIME[(int)conntry] = DateTime.Now; ;
- }
- }
-
- // 장치 연결 쓰레드 시작
- private void StartDeviceConnectionThread()
- {
- if (deviceConnectionThread == null || !deviceConnectionThread.IsAlive)
- {
- isDeviceConnectionRunning = true;
- deviceConnectionThread = new Thread(DeviceConnectionWorker);
- deviceConnectionThread.IsBackground = true;
- deviceConnectionThread.Name = "DeviceConnectionThread";
- deviceConnectionThread.Start();
- PUB.log.Add("DeviceConnection", "장치 연결 쓰레드 시작");
- }
- }
-
- // 장치 연결 쓰레드 종료
- private void StopDeviceConnectionThread()
- {
- if (deviceConnectionThread != null && deviceConnectionThread.IsAlive)
- {
- isDeviceConnectionRunning = false;
- if (!deviceConnectionThread.Join(2000)) // 2초 대기
- {
- try
- {
- deviceConnectionThread.Abort();
- }
- catch { }
- }
- PUB.log.Add("DeviceConnection", "장치 연결 쓰레드 종료");
- }
- }
-
- // 장치 연결 처리 워커 (별도 쓰레드에서 실행)
- private void DeviceConnectionWorker()
- {
- PUB.log.Add($"Start DeviceConnectionWorker");
- while (isDeviceConnectionRunning)
- {
- try
- {
- if (PUB.sm.Step >= eSMStep.IDLE && PUB.sm.Step < eSMStep.CLOSING)
- {
- //agv connect
- ConnectSerialPort(PUB.AGV, PUB.setting.Port_AGV, PUB.setting.Baud_AGV,
- eVarTime.LastConn_AGV, eVarTime.LastConnTry_AGV, eVarTime.LastRecv_AGV);
-
- //xbee connect
- ConnectSerialPort(PUB.XBE, PUB.setting.Port_XBE, PUB.setting.Baud_XBE,
- eVarTime.LastConn_XBE, eVarTime.LastConnTry_XBE, eVarTime.LastRecv_XBE);
-
- //bms connect
- if (PUB.BMS.IsOpen == false)
- {
- var ts = VAR.TIME.RUN(eVarTime.LastConn_BAT);
- if (ts.TotalSeconds > 3)
- {
- PUB.log.Add($"bms connect to {PUB.setting.Port_BAT}");
- PUB.BMS.PortName = PUB.setting.Port_BAT;
- if (PUB.BMS.Open())
- PUB.log.AddI($"BMS Connected({PUB.setting.Port_BAT})");
-
- VAR.TIME.Update(eVarTime.LastConn_BAT);
- VAR.TIME.Update(eVarTime.LastConnTry_BAT);
- }
- }
- else if (PUB.BMS.IsValid == false)
- {
- var ts = VAR.TIME.RUN(eVarTime.LastConnTry_BAT);
- if (ts.TotalSeconds > (PUB.setting.interval_bms * 2.5))
- {
- Console.WriteLine("bms auto disconnect");
- PUB.BMS.Close();
- VAR.TIME.Set(eVarTime.LastConn_BAT, DateTime.Now.AddSeconds(5));
- }
- }
- }
- }
- catch (Exception ex)
- {
- PUB.log.AddE($"DeviceConnection: {ex.Message}");
- }
-
- // 1초 대기 후 다시 체크
- Thread.Sleep(1000);
- }
- }
-
void sm_SPS(object sender, EventArgs e)
{
if (PUB.sm.Step < eSMStep.IDLE || PUB.sm.Step >= eSMStep.CLOSING) return;
- //return;
+ // SPS는 이제 간단한 작업만 수행
+ // 장치 연결 및 상태 전송은 별도 태스크(_DeviceManagement.cs)에서 처리
try
{
- // 장치 연결 쓰레드가 실행 중이 아니면 시작 (한 번만)
- if (!isDeviceConnectionRunning)
- {
- StartDeviceConnectionThread();
- }
-
- //지그비상태전송 (비동기로 실행)
- if (PUB.XBE != null && PUB.XBE.IsOpen)
- {
- //일정간격으로 상태를 전송한다
- if (PUB.XBE.LastStatusSendTime.Year == 1982) PUB.XBE.LastStatusSendTime = DateTime.Now.AddSeconds(1);
- var ts = DateTime.Now - PUB.XBE.LastStatusSendTime;
- if (ts.TotalSeconds >= PUB.setting.interval_xbe)
- {
-
- System.Threading.ThreadPool.QueueUserWorkItem(_ =>
- {
- try { PUB.XBE.SendStatus(); }
- catch { /* 무시 */ }
- finally { PUB.XBE.LastStatusSendTime = DateTime.Now; }
- });
- }
- }
-
- //배터리쿼리 (비동기로 실행)
- if (PUB.BMS != null && PUB.BMS.IsOpen)
- {
- if (PUB.BMS.lastSendTime.Year == 1982) PUB.BMS.lastSendTime = DateTime.Now.AddSeconds(1);
- var ts = DateTime.Now - PUB.BMS.lastSendTime;
- if (ts.TotalSeconds >= PUB.setting.interval_bms)
- {
- //PUB.BMS.lastSendTime = DateTime.Now;
- //System.Threading.ThreadPool.QueueUserWorkItem(_ =>
- //{
- // try { PUB.BMS.SendQuery(); }
- // catch { /* 무시 */ }
- // finally { PUB.BMS.lastSendTime = DateTime.Now; }
- //});
- }
-
- // Update_BatteryWarnSpeak도 비동기로
- //System.Threading.ThreadPool.QueueUserWorkItem(_ =>
- //{
- try { Update_BatteryWarnSpeak(); }
- catch { /* 무시 */ }
- //});
- }
+ // 여기에 SPS에서 처리해야 할 간단한 작업만 남김
+ // 현재는 비어있음 - 필요한 경우 추가
}
catch (Exception ex)
{
diff --git a/Cs_HMI/Project/ViewForm/fAgv.Designer.cs b/Cs_HMI/Project/ViewForm/fAgv.Designer.cs
index c3715d3..cb33828 100644
--- a/Cs_HMI/Project/ViewForm/fAgv.Designer.cs
+++ b/Cs_HMI/Project/ViewForm/fAgv.Designer.cs
@@ -46,8 +46,18 @@
this.button1 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
+ this.button9 = new System.Windows.Forms.Button();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.button16 = new System.Windows.Forms.Button();
+ this.button10 = new System.Windows.Forms.Button();
+ this.button11 = new System.Windows.Forms.Button();
+ this.button12 = new System.Windows.Forms.Button();
+ this.button13 = new System.Windows.Forms.Button();
+ this.button14 = new System.Windows.Forms.Button();
+ this.button15 = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
+ this.panel2.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
@@ -69,7 +79,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
- this.tableLayoutPanel1.Size = new System.Drawing.Size(1050, 510);
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(1050, 461);
this.tableLayoutPanel1.TabIndex = 6;
//
// richTextBox1
@@ -78,7 +88,7 @@
this.richTextBox1.Location = new System.Drawing.Point(3, 3);
this.richTextBox1.Name = "richTextBox1";
this.tableLayoutPanel1.SetRowSpan(this.richTextBox1, 2);
- this.richTextBox1.Size = new System.Drawing.Size(256, 454);
+ this.richTextBox1.Size = new System.Drawing.Size(256, 404);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
//
@@ -88,7 +98,7 @@
this.richTextBox2.Location = new System.Drawing.Point(265, 3);
this.richTextBox2.Name = "richTextBox2";
this.tableLayoutPanel1.SetRowSpan(this.richTextBox2, 2);
- this.richTextBox2.Size = new System.Drawing.Size(256, 454);
+ this.richTextBox2.Size = new System.Drawing.Size(256, 404);
this.richTextBox2.TabIndex = 1;
this.richTextBox2.Text = "";
//
@@ -98,7 +108,7 @@
this.richTextBox3.Location = new System.Drawing.Point(527, 3);
this.richTextBox3.Name = "richTextBox3";
this.tableLayoutPanel1.SetRowSpan(this.richTextBox3, 2);
- this.richTextBox3.Size = new System.Drawing.Size(256, 454);
+ this.richTextBox3.Size = new System.Drawing.Size(256, 404);
this.richTextBox3.TabIndex = 1;
this.richTextBox3.Text = "";
//
@@ -108,7 +118,7 @@
this.richTextBox4.Location = new System.Drawing.Point(789, 3);
this.richTextBox4.Name = "richTextBox4";
this.tableLayoutPanel1.SetRowSpan(this.richTextBox4, 2);
- this.richTextBox4.Size = new System.Drawing.Size(258, 454);
+ this.richTextBox4.Size = new System.Drawing.Size(258, 404);
this.richTextBox4.TabIndex = 1;
this.richTextBox4.Text = "";
//
@@ -117,9 +127,9 @@
this.tableLayoutPanel1.SetColumnSpan(this.label1, 2);
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.ForeColor = System.Drawing.Color.White;
- this.label1.Location = new System.Drawing.Point(3, 460);
+ this.label1.Location = new System.Drawing.Point(3, 410);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(518, 50);
+ this.label1.Size = new System.Drawing.Size(518, 51);
this.label1.TabIndex = 2;
this.label1.Text = "label1";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -141,9 +151,9 @@
this.panel1.Controls.Add(this.button8);
this.panel1.Controls.Add(this.button4);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panel1.Location = new System.Drawing.Point(3, 513);
+ this.panel1.Location = new System.Drawing.Point(3, 522);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(1050, 67);
+ this.panel1.Size = new System.Drawing.Size(1050, 58);
this.panel1.TabIndex = 7;
//
// lbIP
@@ -151,9 +161,9 @@
this.lbIP.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbIP.Font = new System.Drawing.Font("Tahoma", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.lbIP.ForeColor = System.Drawing.Color.White;
- this.lbIP.Location = new System.Drawing.Point(300, 0);
+ this.lbIP.Location = new System.Drawing.Point(252, 0);
this.lbIP.Name = "lbIP";
- this.lbIP.Size = new System.Drawing.Size(250, 67);
+ this.lbIP.Size = new System.Drawing.Size(398, 58);
this.lbIP.TabIndex = 8;
this.lbIP.Text = "000.000.000.000";
this.lbIP.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -161,9 +171,9 @@
// button7
//
this.button7.Dock = System.Windows.Forms.DockStyle.Right;
- this.button7.Location = new System.Drawing.Point(550, 0);
+ this.button7.Location = new System.Drawing.Point(650, 0);
this.button7.Name = "button7";
- this.button7.Size = new System.Drawing.Size(100, 67);
+ this.button7.Size = new System.Drawing.Size(80, 58);
this.button7.TabIndex = 6;
this.button7.Text = "Go - Front\r\nManual";
this.button7.UseVisualStyleBackColor = true;
@@ -172,9 +182,9 @@
// button6
//
this.button6.Dock = System.Windows.Forms.DockStyle.Right;
- this.button6.Location = new System.Drawing.Point(650, 0);
+ this.button6.Location = new System.Drawing.Point(730, 0);
this.button6.Name = "button6";
- this.button6.Size = new System.Drawing.Size(100, 67);
+ this.button6.Size = new System.Drawing.Size(80, 58);
this.button6.TabIndex = 5;
this.button6.Text = "Go - Back\r\nManual";
this.button6.UseVisualStyleBackColor = true;
@@ -183,9 +193,9 @@
// button5
//
this.button5.Dock = System.Windows.Forms.DockStyle.Right;
- this.button5.Location = new System.Drawing.Point(750, 0);
+ this.button5.Location = new System.Drawing.Point(810, 0);
this.button5.Name = "button5";
- this.button5.Size = new System.Drawing.Size(100, 67);
+ this.button5.Size = new System.Drawing.Size(80, 58);
this.button5.TabIndex = 4;
this.button5.Text = "Stop(Mark)";
this.button5.UseVisualStyleBackColor = true;
@@ -194,9 +204,9 @@
// button3
//
this.button3.Dock = System.Windows.Forms.DockStyle.Left;
- this.button3.Location = new System.Drawing.Point(200, 0);
+ this.button3.Location = new System.Drawing.Point(168, 0);
this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(100, 67);
+ this.button3.Size = new System.Drawing.Size(84, 58);
this.button3.TabIndex = 2;
this.button3.Text = "Charge Off";
this.button3.UseVisualStyleBackColor = true;
@@ -205,9 +215,9 @@
// button2
//
this.button2.Dock = System.Windows.Forms.DockStyle.Left;
- this.button2.Location = new System.Drawing.Point(100, 0);
+ this.button2.Location = new System.Drawing.Point(84, 0);
this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(100, 67);
+ this.button2.Size = new System.Drawing.Size(84, 58);
this.button2.TabIndex = 1;
this.button2.Text = "Charge On";
this.button2.UseVisualStyleBackColor = true;
@@ -218,7 +228,7 @@
this.button1.Dock = System.Windows.Forms.DockStyle.Left;
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(100, 67);
+ this.button1.Size = new System.Drawing.Size(84, 58);
this.button1.TabIndex = 0;
this.button1.Text = "Reset";
this.button1.UseVisualStyleBackColor = true;
@@ -227,9 +237,9 @@
// button8
//
this.button8.Dock = System.Windows.Forms.DockStyle.Right;
- this.button8.Location = new System.Drawing.Point(850, 0);
+ this.button8.Location = new System.Drawing.Point(890, 0);
this.button8.Name = "button8";
- this.button8.Size = new System.Drawing.Size(100, 67);
+ this.button8.Size = new System.Drawing.Size(80, 58);
this.button8.TabIndex = 7;
this.button8.Text = "Run";
this.button8.UseVisualStyleBackColor = true;
@@ -238,20 +248,125 @@
// button4
//
this.button4.Dock = System.Windows.Forms.DockStyle.Right;
- this.button4.Location = new System.Drawing.Point(950, 0);
+ this.button4.Location = new System.Drawing.Point(970, 0);
this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(100, 67);
+ this.button4.Size = new System.Drawing.Size(80, 58);
this.button4.TabIndex = 3;
this.button4.Text = "Stop";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
+ // button9
+ //
+ this.button9.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button9.Location = new System.Drawing.Point(324, 0);
+ this.button9.Name = "button9";
+ this.button9.Size = new System.Drawing.Size(115, 58);
+ this.button9.TabIndex = 9;
+ this.button9.Text = "GDS Center Scope";
+ this.button9.UseVisualStyleBackColor = true;
+ this.button9.Click += new System.EventHandler(this.button9_Click);
+ //
+ // panel2
+ //
+ this.panel2.Controls.Add(this.button15);
+ this.panel2.Controls.Add(this.button14);
+ this.panel2.Controls.Add(this.button11);
+ this.panel2.Controls.Add(this.button12);
+ this.panel2.Controls.Add(this.button13);
+ this.panel2.Controls.Add(this.button9);
+ this.panel2.Controls.Add(this.button10);
+ this.panel2.Controls.Add(this.button16);
+ this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panel2.Location = new System.Drawing.Point(3, 464);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(1050, 58);
+ this.panel2.TabIndex = 8;
+ //
+ // button16
+ //
+ this.button16.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button16.Location = new System.Drawing.Point(0, 0);
+ this.button16.Name = "button16";
+ this.button16.Size = new System.Drawing.Size(162, 58);
+ this.button16.TabIndex = 0;
+ this.button16.Text = "백턴유지시간";
+ this.button16.UseVisualStyleBackColor = true;
+ this.button16.Click += new System.EventHandler(this.button16_Click);
+ //
+ // button10
+ //
+ this.button10.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button10.Location = new System.Drawing.Point(162, 0);
+ this.button10.Name = "button10";
+ this.button10.Size = new System.Drawing.Size(162, 58);
+ this.button10.TabIndex = 1;
+ this.button10.Text = "GateOut Off Time";
+ this.button10.UseVisualStyleBackColor = true;
+ this.button10.Click += new System.EventHandler(this.button10_Click);
+ //
+ // button11
+ //
+ this.button11.Dock = System.Windows.Forms.DockStyle.Right;
+ this.button11.Location = new System.Drawing.Point(810, 0);
+ this.button11.Name = "button11";
+ this.button11.Size = new System.Drawing.Size(80, 58);
+ this.button11.TabIndex = 11;
+ this.button11.Text = "Up";
+ this.button11.UseVisualStyleBackColor = true;
+ this.button11.Click += new System.EventHandler(this.button11_Click);
+ //
+ // button12
+ //
+ this.button12.Dock = System.Windows.Forms.DockStyle.Right;
+ this.button12.Location = new System.Drawing.Point(890, 0);
+ this.button12.Name = "button12";
+ this.button12.Size = new System.Drawing.Size(80, 58);
+ this.button12.TabIndex = 12;
+ this.button12.Text = "Stop";
+ this.button12.UseVisualStyleBackColor = true;
+ this.button12.Click += new System.EventHandler(this.button12_Click);
+ //
+ // button13
+ //
+ this.button13.Dock = System.Windows.Forms.DockStyle.Right;
+ this.button13.Location = new System.Drawing.Point(970, 0);
+ this.button13.Name = "button13";
+ this.button13.Size = new System.Drawing.Size(80, 58);
+ this.button13.TabIndex = 10;
+ this.button13.Text = "Down";
+ this.button13.UseVisualStyleBackColor = true;
+ this.button13.Click += new System.EventHandler(this.button13_Click);
+ //
+ // button14
+ //
+ this.button14.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button14.Location = new System.Drawing.Point(439, 0);
+ this.button14.Name = "button14";
+ this.button14.Size = new System.Drawing.Size(84, 58);
+ this.button14.TabIndex = 13;
+ this.button14.Text = "Mag On";
+ this.button14.UseVisualStyleBackColor = true;
+ this.button14.Click += new System.EventHandler(this.button14_Click);
+ //
+ // button15
+ //
+ this.button15.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button15.Location = new System.Drawing.Point(523, 0);
+ this.button15.Name = "button15";
+ this.button15.Size = new System.Drawing.Size(84, 58);
+ this.button15.TabIndex = 14;
+ this.button15.Text = "Mag Off";
+ this.button15.UseVisualStyleBackColor = true;
+ this.button15.Click += new System.EventHandler(this.button15_Click);
+ //
// fAgv
//
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.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "fAgv";
@@ -261,6 +376,7 @@
this.VisibleChanged += new System.EventHandler(this.fAgv_VisibleChanged);
this.tableLayoutPanel1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
+ this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -284,5 +400,14 @@
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lbIP;
+ private System.Windows.Forms.Button button9;
+ private System.Windows.Forms.Panel panel2;
+ private System.Windows.Forms.Button button16;
+ private System.Windows.Forms.Button button10;
+ private System.Windows.Forms.Button button15;
+ private System.Windows.Forms.Button button14;
+ private System.Windows.Forms.Button button11;
+ private System.Windows.Forms.Button button12;
+ private System.Windows.Forms.Button button13;
}
}
\ No newline at end of file
diff --git a/Cs_HMI/Project/ViewForm/fAgv.cs b/Cs_HMI/Project/ViewForm/fAgv.cs
index 6e1dbbf..b262f01 100644
--- a/Cs_HMI/Project/ViewForm/fAgv.cs
+++ b/Cs_HMI/Project/ViewForm/fAgv.cs
@@ -135,5 +135,57 @@ namespace Project.ViewForm
{
PUB.AGV.AGVMoveRun();
}
+
+ private void button9_Click(object sender, EventArgs e)
+ {
+ PUB.AGV.TurnGDSCenterScope();
+ if (PUB.sm.Step == StateMachine.eSMStep.RUN)
+ PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE);
+ }
+
+ private void button16_Click(object sender, EventArgs e)
+ {
+ var inputbox = AR.UTIL.InputBox("input value","100");
+ if (inputbox.Item1 == false) return;
+ if (int.TryParse(inputbox.Item2, out int value) == false) return;
+ PUB.AGV.SetBackturnTime(value);
+ if (PUB.sm.Step == StateMachine.eSMStep.RUN)
+ PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE);
+ }
+
+ private void button10_Click(object sender, EventArgs e)
+ {
+ var inputbox = AR.UTIL.InputBox("input value","50");
+ if (inputbox.Item1 == false) return;
+ if (int.TryParse(inputbox.Item2, out int value) == false) return;
+ PUB.AGV.SetGateOutOffTime(value);
+ if (PUB.sm.Step == StateMachine.eSMStep.RUN)
+ PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE);
+ }
+
+ private void button14_Click(object sender, EventArgs e)
+ {
+ PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.ON);
+ }
+
+ private void button15_Click(object sender, EventArgs e)
+ {
+ PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.OFF);
+ }
+
+ private void button11_Click(object sender, EventArgs e)
+ {
+ PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
+ }
+
+ private void button13_Click(object sender, EventArgs e)
+ {
+ PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN);
+ }
+
+ private void button12_Click(object sender, EventArgs e)
+ {
+ PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.STP);
+ }
}
}
diff --git a/Cs_HMI/Project/ViewForm/fIO.Designer.cs b/Cs_HMI/Project/ViewForm/fIO.Designer.cs
index 5509aff..c002c3f 100644
--- a/Cs_HMI/Project/ViewForm/fIO.Designer.cs
+++ b/Cs_HMI/Project/ViewForm/fIO.Designer.cs
@@ -29,30 +29,21 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- 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));
+ 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();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.HWState = 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.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();
//
// tableLayoutPanel1
@@ -76,31 +67,31 @@
//
this.HWState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.HWState.BorderSize = 0;
- 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 = "오류(유효)";
+ 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 = "오류(유효)";
this.HWState.ColorList = new arFrame.Control.ColorListItem[] {
- colorListItem25,
- colorListItem26,
- colorListItem27,
- colorListItem28,
- colorListItem29,
- colorListItem30};
+ colorListItem1,
+ colorListItem2,
+ colorListItem3,
+ colorListItem4,
+ colorListItem5,
+ colorListItem6};
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)));
@@ -179,84 +170,17 @@
//
// panel3
//
- 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
- //
- this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
- this.panel2.Controls.Add(this.button2);
- this.panel2.Controls.Add(this.button3);
- this.panel2.Controls.Add(this.button1);
- this.panel2.Location = new System.Drawing.Point(925, 15);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(99, 315);
- this.panel2.TabIndex = 6;
- //
- // button2
- //
- this.button2.Dock = System.Windows.Forms.DockStyle.Fill;
- 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, 115);
- this.button2.TabIndex = 1;
- this.button2.UseVisualStyleBackColor = true;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // button3
- //
- 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, 215);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(99, 100);
- this.button3.TabIndex = 2;
- this.button3.UseVisualStyleBackColor = true;
- this.button3.Click += new System.EventHandler(this.button3_Click_1);
- //
- // button1
- //
- this.button1.Dock = System.Windows.Forms.DockStyle.Top;
- this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image")));
- this.button1.Location = new System.Drawing.Point(0, 0);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(99, 100);
- this.button1.TabIndex = 0;
- 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;
@@ -270,8 +194,6 @@
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);
}
@@ -283,12 +205,6 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel panel1;
private arFrame.Control.GridView HWState;
- private System.Windows.Forms.Panel panel2;
- 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;
}
}
\ No newline at end of file
diff --git a/Cs_HMI/Project/ViewForm/fIO.resx b/Cs_HMI/Project/ViewForm/fIO.resx
index 5c09ea0..aac33d5 100644
--- a/Cs_HMI/Project/ViewForm/fIO.resx
+++ b/Cs_HMI/Project/ViewForm/fIO.resx
@@ -117,97 +117,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
-
- iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAA/ZJREFUWEfd
- WLtOG0EUtZR0ST4jDyVR8gE0GNtrGxKlwKYAFOAHMA9DxRsaCl6/kR5RpiH4AY0DOBgpiYkjmoCR2LUp
- smhzzjLgRwZ7/QpWjnSk9e7M3OOZO3PvHdt/i4jd/jrsco1uezwbEY8nGVGUTMjp1Ek+4913fgu5XCNs
- K7o1FpstLY8iLtd4xO1O7XR0qIcDAxfHwaCRnp01tMVFI7u0ZJLPfHc8NmYc9vdn2RZ9foSdzuDH1taH
- Yrj6AYPeDytKEOLUeG9v5mRy0rhYWbHO5WWDfeI9PRpmXeXMc0wxfG3YUpRnUUU53O3qUs/m5+UCKiDH
- 2PX51Kjbndi0258KM9UBS/IO4rSfw8OXMmO1MBUIXGJFtFBb21thrjJEHI4+/MtMemZGaqAePJ2eNqIe
- TybidL4XZq3BnDmIO1tYkA5cT3LJKXLL4XgjzJeG8DmtkTNXzNOpKYPLjVV7ImTIwZ3FDdEInytH+KSO
- VTsoubu5/T/7/eeyAf4FY36/hpkcEXIKIQ5ha0fJ6uoVZd9ktNj+bG7OQBQ6lx7mEDfOQ1jWsYAwpMfj
- hr63Z1mkHosZeiJhXKytSb/nM97drTHiCFk5MHydwFllnW4oxF3DikiKu4YVkYw48MUjIesKDOaMlwxJ
- sk75zDdIlBJZSdsbQsN2e7v2SVFeCnnmuRdk4Jd2kNCK4arECTLBgKYhIc9mY1rErETW+DaWElCLOJJa
- oGldyDMFJpkeyRqXokxIreLINEIgNH0V8uCDiBzM4WSNy7FYUD6qEUeq0IL0ThXybDZmwVkLG+Q2ykRW
- K47MIOmFD/4W8hokcH+/fgKbfombfpPgxwYL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fManual.Designer.cs b/Cs_HMI/Project/ViewForm/fManual.Designer.cs
index 1187632..78998e8 100644
--- a/Cs_HMI/Project/ViewForm/fManual.Designer.cs
+++ b/Cs_HMI/Project/ViewForm/fManual.Designer.cs
@@ -41,6 +41,12 @@
this.btErrReset = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel2 = new System.Windows.Forms.Panel();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.btBack180 = new System.Windows.Forms.Button();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.btRight180 = new System.Windows.Forms.Button();
+ this.panel10 = new System.Windows.Forms.Panel();
+ this.btLeft180 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.radpbs2 = new AGVControl.MyRadioButton();
@@ -70,6 +76,7 @@
this.guideSensor1 = new Narumi.UC.GuideSensor();
this.tableLayoutPanel1.SuspendLayout();
this.panel2.SuspendLayout();
+ this.groupBox3.SuspendLayout();
this.groupBox1.SuspendLayout();
this.grpSpeed.SuspendLayout();
this.grpBunki.SuspendLayout();
@@ -384,6 +391,7 @@
//
// panel2
//
+ this.panel2.Controls.Add(this.groupBox3);
this.panel2.Controls.Add(this.button1);
this.panel2.Controls.Add(this.groupBox1);
this.panel2.Controls.Add(this.grpSpeed);
@@ -396,13 +404,87 @@
this.panel2.TabIndex = 9;
this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
//
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.btBack180);
+ this.groupBox3.Controls.Add(this.panel1);
+ this.groupBox3.Controls.Add(this.btRight180);
+ this.groupBox3.Controls.Add(this.panel10);
+ this.groupBox3.Controls.Add(this.btLeft180);
+ this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox3.Location = new System.Drawing.Point(0, 450);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Padding = new System.Windows.Forms.Padding(10, 5, 5, 10);
+ this.groupBox3.Size = new System.Drawing.Size(404, 67);
+ this.groupBox3.TabIndex = 11;
+ this.groupBox3.TabStop = false;
+ //
+ // btBack180
+ //
+ this.btBack180.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.btBack180.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btBack180.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.btBack180.Font = new System.Drawing.Font("맑은 고딕", 10F, System.Drawing.FontStyle.Bold);
+ this.btBack180.ForeColor = System.Drawing.Color.Black;
+ this.btBack180.Location = new System.Drawing.Point(270, 19);
+ this.btBack180.Name = "btBack180";
+ this.btBack180.Size = new System.Drawing.Size(129, 38);
+ this.btBack180.TabIndex = 15;
+ this.btBack180.Text = "백후 180도 회전";
+ this.btBack180.UseVisualStyleBackColor = false;
+ this.btBack180.Click += new System.EventHandler(this.btBack180_Click);
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
+ this.panel1.Location = new System.Drawing.Point(261, 19);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(9, 38);
+ this.panel1.TabIndex = 14;
+ //
+ // btRight180
+ //
+ this.btRight180.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.btRight180.Dock = System.Windows.Forms.DockStyle.Left;
+ this.btRight180.Font = new System.Drawing.Font("맑은 고딕", 10F, System.Drawing.FontStyle.Bold);
+ this.btRight180.ForeColor = System.Drawing.Color.Black;
+ this.btRight180.Location = new System.Drawing.Point(140, 19);
+ this.btRight180.Name = "btRight180";
+ this.btRight180.Size = new System.Drawing.Size(121, 38);
+ this.btRight180.TabIndex = 6;
+ this.btRight180.Text = "180도 우회전";
+ this.btRight180.UseVisualStyleBackColor = false;
+ this.btRight180.Click += new System.EventHandler(this.btRight180_Click);
+ //
+ // panel10
+ //
+ this.panel10.Dock = System.Windows.Forms.DockStyle.Left;
+ this.panel10.Location = new System.Drawing.Point(131, 19);
+ this.panel10.Name = "panel10";
+ this.panel10.Size = new System.Drawing.Size(9, 38);
+ this.panel10.TabIndex = 12;
+ //
+ // btLeft180
+ //
+ this.btLeft180.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.btLeft180.Dock = System.Windows.Forms.DockStyle.Left;
+ this.btLeft180.Font = new System.Drawing.Font("맑은 고딕", 10F, System.Drawing.FontStyle.Bold);
+ this.btLeft180.ForeColor = System.Drawing.Color.Black;
+ this.btLeft180.Location = new System.Drawing.Point(10, 19);
+ this.btLeft180.Name = "btLeft180";
+ this.btLeft180.Size = new System.Drawing.Size(121, 38);
+ this.btLeft180.TabIndex = 7;
+ this.btLeft180.Text = "180도 좌회전";
+ this.btLeft180.UseVisualStyleBackColor = false;
+ this.btLeft180.Click += new System.EventHandler(this.btLeft180_Click);
+ //
// button1
//
- this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.button1.Dock = System.Windows.Forms.DockStyle.Top;
this.button1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.button1.Location = new System.Drawing.Point(0, 380);
this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(404, 137);
+ this.button1.Size = new System.Drawing.Size(404, 70);
this.button1.TabIndex = 10;
this.button1.Text = "설정 적용";
this.button1.UseVisualStyleBackColor = true;
@@ -847,6 +929,7 @@
this.VisibleChanged += new System.EventHandler(this.fManual_VisibleChanged);
this.tableLayoutPanel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
+ this.groupBox3.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.grpSpeed.ResumeLayout(false);
this.grpBunki.ResumeLayout(false);
@@ -896,5 +979,11 @@
private System.Windows.Forms.Button button1;
private arCtl.arLabel arLabel1;
private System.Windows.Forms.Panel panel12;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.Button btBack180;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Button btRight180;
+ private System.Windows.Forms.Panel panel10;
+ private System.Windows.Forms.Button btLeft180;
}
}
\ No newline at end of file
diff --git a/Cs_HMI/Project/ViewForm/fManual.cs b/Cs_HMI/Project/ViewForm/fManual.cs
index 1c21c44..8cac475 100644
--- a/Cs_HMI/Project/ViewForm/fManual.cs
+++ b/Cs_HMI/Project/ViewForm/fManual.cs
@@ -351,5 +351,24 @@ namespace Project.ViewForm
AR.UTIL.MsgI($"주행속도({PUB.setting.SPD_DRIVE})가 '고속' 속도에 연결되었습니다.\n" +
$"창을 이동하거나 '설정적용'을 누르면 원래속도({PUB.setting.SPD_H})로 변경 됩니다");
}
+
+ private void btLeft180_Click(object sender, EventArgs e)
+ {
+ //[STX] C T L 0 0 0 0 A 3 [ETX]
+ PUB.AGV.AGVMoveLeft180Turn();
+
+ }
+
+ private void btRight180_Click(object sender, EventArgs e)
+ {
+ //[STX] C T R 0 0 0 0 A 9 [ETX]
+ PUB.AGV.AGVMoveRight180Turn();
+ }
+
+ private void btBack180_Click(object sender, EventArgs e)
+ {
+ //[STX] C T B 0 0 0 0 9 9 [ETX]
+ PUB.AGV.AGVMoveBack180Turn();
+ }
}
}
diff --git a/Cs_HMI/Project/fMain.Designer.cs b/Cs_HMI/Project/fMain.Designer.cs
index 0bc4f29..8253637 100644
--- a/Cs_HMI/Project/fMain.Designer.cs
+++ b/Cs_HMI/Project/fMain.Designer.cs
@@ -131,6 +131,7 @@ namespace Project
this.mapFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.editorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.demoListLotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.refreshListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -143,7 +144,6 @@ namespace Project
this.arPanel2 = new arCtl.arPanel();
this.arPanel1 = new arCtl.arPanel();
this.ctlPos1 = new Project.CtlPos();
- this.editorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panRight.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.panel4.SuspendLayout();
@@ -167,7 +167,7 @@ namespace Project
this.MenuLift.FlatAppearance.BorderSize = 0;
this.MenuLift.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.MenuLift.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold);
- this.MenuLift.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))));
+ this.MenuLift.ForeColor = System.Drawing.Color.Red;
this.MenuLift.Location = new System.Drawing.Point(285, 0);
this.MenuLift.Name = "MenuLift";
this.MenuLift.Size = new System.Drawing.Size(92, 50);
@@ -175,6 +175,7 @@ namespace Project
this.MenuLift.Text = "LIFT";
this.toolTip1.SetToolTip(this.MenuLift, "I/O 및 FLAG를 확인 합니다");
this.MenuLift.UseVisualStyleBackColor = true;
+ this.MenuLift.Visible = false;
this.MenuLift.Click += new System.EventHandler(this.MenuLift_Click);
//
// MenuMAN
@@ -1690,7 +1691,7 @@ namespace Project
this.toolStripMenuItem5,
this.refreshListToolStripMenuItem});
this.cmDebug.Name = "cmVision";
- this.cmDebug.Size = new System.Drawing.Size(229, 346);
+ this.cmDebug.Size = new System.Drawing.Size(229, 324);
//
// mapFileToolStripMenuItem
//
@@ -1705,17 +1706,24 @@ namespace Project
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
- this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.saveToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// loadToolStripMenuItem
//
this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
- this.loadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.loadToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
this.loadToolStripMenuItem.Text = "Load";
this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
//
+ // editorToolStripMenuItem
+ //
+ this.editorToolStripMenuItem.Name = "editorToolStripMenuItem";
+ this.editorToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
+ this.editorToolStripMenuItem.Text = "Editor";
+ this.editorToolStripMenuItem.Click += new System.EventHandler(this.editorToolStripMenuItem_Click);
+ //
// demoListLotToolStripMenuItem
//
this.demoListLotToolStripMenuItem.Name = "demoListLotToolStripMenuItem";
@@ -2188,13 +2196,6 @@ namespace Project
this.ctlPos1.Text = "ctlPos1";
this.ctlPos1.Visible = false;
//
- // editorToolStripMenuItem
- //
- this.editorToolStripMenuItem.Name = "editorToolStripMenuItem";
- this.editorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.editorToolStripMenuItem.Text = "Editor";
- this.editorToolStripMenuItem.Click += new System.EventHandler(this.editorToolStripMenuItem_Click);
- //
// fMain
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
diff --git a/Cs_HMI/Project/fMain.cs b/Cs_HMI/Project/fMain.cs
index 27a4550..61ce600 100644
--- a/Cs_HMI/Project/fMain.cs
+++ b/Cs_HMI/Project/fMain.cs
@@ -115,8 +115,7 @@ namespace Project
private void __Closing(object sender, FormClosingEventArgs e)
{
- // 장치 연결 쓰레드 종료
- StopDeviceConnectionThread();
+ // 장치 관리 태스크는 _STEP_CLOSING_START에서 종료됨
PUB.popup.needClose = true;
if (remoteClose == true)
diff --git a/Cs_HMI/SubProject/AGV/Command.cs b/Cs_HMI/SubProject/AGV/Command.cs
index 346fbb6..eab8dee 100644
--- a/Cs_HMI/SubProject/AGV/Command.cs
+++ b/Cs_HMI/SubProject/AGV/Command.cs
@@ -65,7 +65,7 @@ namespace arDev
{
return AddCommand(cmd + data);
}
-
+
public bool LiftControl(LiftCommand cmd)
{
return AddCommand(eAgvCmd.LiftControl, cmd.ToString());
@@ -77,6 +77,33 @@ namespace arDev
else
return AddCommand(eAgvCmd.ChargeOf, chargetID.ToString("0000"));
}
+ public bool SetBackturnTime(int time)
+ {
+ return AddCommand(eAgvCmd.BackTrunResumeTime, time.ToString("0000"));
+ }
+ public bool SetGateOutOffTime(int time)
+ {
+ return AddCommand(eAgvCmd.GateoutTime, time.ToString("0000"));
+ }
+
+ public bool TurnGDSCenterScope()
+ {
+ return AddCommand(eAgvCmd.TurnGDSCenterScope);
+ }
+ public bool AGVMoveLeft180Turn()
+ {
+ return AddCommand(eAgvCmd.TurnLeft);
+ }
+ public bool AGVMoveRight180Turn()
+ {
+ return AddCommand(eAgvCmd.TurnRight);
+ }
+ public bool AGVMoveBack180Turn()
+ {
+ return AddCommand(eAgvCmd.TurnBack);
+ }
+
+
public bool AGVErrorReset()
{
@@ -100,10 +127,10 @@ namespace arDev
value = value.PadLeft(4, '0');
return AddCommand($"SCH{value}");
}
- public bool AGVGateOutTimer(int value)
- {
- return AddCommand($"SGT{value:0000}");
- }
+ //public bool AGVGateOutTimer(int value)
+ //{
+ // return AddCommand($"SGT{value:0000}");
+ //}
///
/// 정지감속주기 및 상수
///
@@ -137,6 +164,8 @@ namespace arDev
};
return AddCommand(cmds);
}
+
+
protected bool AddCommand(params string[] cmds)
{
bool ret = true;
@@ -203,15 +232,15 @@ namespace arDev
RaiseMessage(arRS232.MessageType.Normal, "충전명령전송");
break;
- case eAgvCmd.GoTurnLeft:
+ case eAgvCmd.TurnLeft:
cmdString = $"CTL0000";
retval = AddCommand(cmdString);
break;
- case eAgvCmd.GoTurnRight:
+ case eAgvCmd.TurnRight:
cmdString = $"CTR0000";
retval = AddCommand(cmdString);
break;
- case eAgvCmd.goTurnBack:
+ case eAgvCmd.TurnBack:
cmdString = $"CTB0000";
retval = AddCommand(cmdString);
break;
@@ -240,7 +269,18 @@ namespace arDev
cmdString = "CRS0000";
retval = AddCommand(cmdString);
break;
-
+ case eAgvCmd.TurnGDSCenterScope:
+ cmdString = "SGS1000";
+ retval = AddCommand(cmdString);
+ break;
+ case eAgvCmd.BackTrunResumeTime:
+ cmdString = $"SST{param}";
+ retval = AddCommand(cmdString);
+ break;
+ case eAgvCmd.GateoutTime:
+ cmdString = $"SGT{param}";
+ retval = AddCommand(cmdString);
+ break;
}
return retval;
}
diff --git a/Cs_HMI/SubProject/AGV/EnumData.cs b/Cs_HMI/SubProject/AGV/EnumData.cs
index 2f0fcd5..0c4a93f 100644
--- a/Cs_HMI/SubProject/AGV/EnumData.cs
+++ b/Cs_HMI/SubProject/AGV/EnumData.cs
@@ -141,17 +141,17 @@ namespace arDev
///
/// CMD : CTL0000
///
- GoTurnLeft,
+ TurnLeft,
///
/// CMD : CTR0000
///
- GoTurnRight,
+ TurnRight,
///
/// CMD : CTB0000
///
- goTurnBack,
+ TurnBack,
///
/// CMD : CBZ
@@ -175,6 +175,12 @@ namespace arDev
SetSpeed,
CPUReset,
+
+ TurnGDSCenterScope,
+
+ BackTrunResumeTime,
+ GateoutTime,
+
}
public enum eForm
{
diff --git a/Cs_HMI/SubProject/EnigProtocol b/Cs_HMI/SubProject/EnigProtocol
index 8877cb1..4f360f3 160000
--- a/Cs_HMI/SubProject/EnigProtocol
+++ b/Cs_HMI/SubProject/EnigProtocol
@@ -1 +1 @@
-Subproject commit 8877cb1a9dbf97228ebb3fd57ca0004fef77fe24
+Subproject commit 4f360f33a7abbd77c517ca2492ccbde53e687099
diff --git a/Cs_HMI/TestProject/Test.sln b/Cs_HMI/TestProject/Test.sln
index f257d59..88ae4b3 100644
--- a/Cs_HMI/TestProject/Test.sln
+++ b/Cs_HMI/TestProject/Test.sln
@@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Port", "Test_Port\Test
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{530A4517-6210-422B-8CB4-B7D194EE70BE}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMS", "..\SubProject\BMS\BMS.csproj", "{7A94C30C-6772-4F71-BF9C-0DF071A1BC70}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommData", "..\SubProject\CommData\CommData.csproj", "{14E8C9A5-013E-49BA-B435-EFEFC77DD623}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ENIGProtocol", "..\SubProject\EnigProtocol\enigprotocol\ENIGProtocol.csproj", "{9365803B-933D-4237-93C7-B502C855A71C}"
@@ -43,10 +41,6 @@ Global
{CCFA2CE7-A539-4ADC-B803-F759284C3463}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCFA2CE7-A539-4ADC-B803-F759284C3463}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCFA2CE7-A539-4ADC-B803-F759284C3463}.Release|Any CPU.Build.0 = Release|Any CPU
- {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|Any CPU.Build.0 = Release|Any CPU
{14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -64,7 +58,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {7A94C30C-6772-4F71-BF9C-0DF071A1BC70} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
{14E8C9A5-013E-49BA-B435-EFEFC77DD623} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
{9365803B-933D-4237-93C7-B502C855A71C} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
{8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
diff --git a/Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs b/Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs
index d8beccf..48a4224 100644
--- a/Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs
+++ b/Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs
@@ -47,7 +47,7 @@
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(131, 20);
this.comboBox1.TabIndex = 0;
- this.comboBox1.Text = "com15";
+ this.comboBox1.Text = "com6";
//
// button1
//
diff --git a/Cs_HMI/TestProject/Test_BMS/Form1.cs b/Cs_HMI/TestProject/Test_BMS/Form1.cs
index 5b215d5..a41f1ff 100644
--- a/Cs_HMI/TestProject/Test_BMS/Form1.cs
+++ b/Cs_HMI/TestProject/Test_BMS/Form1.cs
@@ -18,22 +18,15 @@ namespace Test_BMS
InitializeComponent();
bms = new arDev.BMS();
bms.BMSDataReceive += Bms_BMSDataReceive;
+ bms.BMSCellDataReceive += Bms_BMSCellDataReceive;
bms.Message += Bms_Message;
+ this.Text = $"{Application.ProductName} ver{Application.ProductVersion}";
}
- private void Bms_Message(object sender, arRS232.MessageEventArgs e)
+ private void Bms_BMSCellDataReceive(object sender, arDev.BMSCelvoltageEventArgs e)
{
- var sb = new System.Text.StringBuilder();
- if (e.Data != null)
- {
- foreach (var b in e.Data)
- sb.Append(" " + b.ToString("X2"));
- }
- else sb.Append(e.Message);
- if (e.MsgType == arRS232.MessageType.Error)
- addmsg(e.Message);
- else
- addmsg($"{e.MsgType}:{sb}");
+ var valuestr = string.Join(" ", e.voltage.Select(t => t.ToString()));
+ addmsg($"voltage:{valuestr}");
}
private void Bms_BMSDataReceive(object sender, EventArgs e)
@@ -43,7 +36,32 @@ namespace Test_BMS
addmsg("Recv:" + msg);
}
-
+
+
+ private void Bms_Message(object sender, arDev.arRS232.MessageEventArgs e)
+ {
+ var sb = new System.Text.StringBuilder();
+ if (e.Data != null)
+ {
+ foreach (var b in e.Data)
+ sb.Append(" " + b.ToString("X2"));
+ }
+ else sb.Append(e.Message);
+
+ if (e.MsgType == arDev.arRS232.MessageType.Error)
+ addmsg(e.Message);
+ else if(e.MsgType == arDev.arRS232.MessageType.Send)
+ {
+ addmsg($"Tx:{sb}");
+ }
+ else if(e.MsgType == arDev.arRS232.MessageType.Recv)
+ {
+ addmsg($"Rx:{sb}");
+ }
+ else
+ addmsg($"{e.MsgType}:{sb}");
+ }
+
void addmsg(string m)
{
if (logTextBox1.InvokeRequired)
diff --git a/Cs_HMI/TestProject/Test_BMS/Test_BMS.csproj b/Cs_HMI/TestProject/Test_BMS/Test_BMS.csproj
index f109c0c..007c0e8 100644
--- a/Cs_HMI/TestProject/Test_BMS/Test_BMS.csproj
+++ b/Cs_HMI/TestProject/Test_BMS/Test_BMS.csproj
@@ -18,7 +18,7 @@
true
full
false
- ..\..\..\..\..\..\Amkor\AGV4\Test\
+ ..\..\..\..\..\..\Amkor\AGV4\Test\BMS\
DEBUG;TRACE
prompt
4
@@ -50,6 +50,12 @@
+
+ BMS.cs
+
+
+ BMSInformationEventArgs.cs
+
Form