From 1d723c3fe9787ae6f079f3e94cd9a53f20cac985 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 18 三月 2025 17:55:07 +0800
Subject: [PATCH] 1.开始编写流程控件模块,添加LoadPort, 烘烤等其它机器。 2.实现pin接口,准备加入到各个机器中;
---
SourceCode/Bond/Servo/Servo.vcxproj | 16 +
SourceCode/Bond/Servo/CVacuumBake.cpp | 47 +++
SourceCode/Bond/Servo/CFliper.cpp | 47 +++
SourceCode/Bond/Servo/CPanelMaster.cpp | 2
SourceCode/Bond/Servo/CEFEM.h | 4
SourceCode/Bond/Servo/CMaster.h | 5
SourceCode/Bond/Servo/CPanelEquipment.cpp | 2
SourceCode/Bond/Servo/CBakeCooling.cpp | 47 +++
SourceCode/Bond/Servo/CPanelAttributes.cpp | 2
SourceCode/Bond/Servo/CBakeCooling.h | 22 +
SourceCode/Bond/Servo/CEquipment.cpp | 7
SourceCode/Bond/Servo/CAligner.h | 22 +
SourceCode/Bond/Servo/CMaster.cpp | 195 ++++++++++++
SourceCode/Bond/Servo/CBonder.h | 4
SourceCode/Bond/Servo/CPin.h | 41 ++
SourceCode/Bond/Servo/CLoadPort.h | 22 +
SourceCode/Bond/Servo/CLoadPort.cpp | 48 +++
SourceCode/Bond/Servo/CMeasurement.h | 22 +
SourceCode/Bond/Servo/CVacuumBake.h | 22 +
SourceCode/Bond/Servo/CSample.h | 12
SourceCode/Bond/Servo/CMeasurement.cpp | 47 +++
SourceCode/Bond/Servo/Servo.vcxproj.filters | 16 +
SourceCode/Bond/Servo/CAligner.cpp | 47 +++
SourceCode/Bond/Servo/CPin.cpp | 130 ++++++++
SourceCode/Bond/Servo/CEFEM.cpp | 10
SourceCode/Bond/Servo/CEquipment.h | 4
SourceCode/Bond/Servo/CBonder.cpp | 10
SourceCode/Bond/Servo/CFliper.h | 22 +
SourceCode/Bond/Servo/CSample.cpp | 15 +
29 files changed, 868 insertions(+), 22 deletions(-)
diff --git a/SourceCode/Bond/Servo/CAligner.cpp b/SourceCode/Bond/Servo/CAligner.cpp
new file mode 100644
index 0000000..cc10715
--- /dev/null
+++ b/SourceCode/Bond/Servo/CAligner.cpp
@@ -0,0 +1,47 @@
+#include "stdafx.h"
+#include "CAligner.h"
+
+namespace SERVO {
+ CAligner::CAligner() : CEquipment()
+ {
+
+ }
+
+ CAligner::~CAligner()
+ {
+
+ }
+
+ const char* CAligner::getClassName()
+ {
+ static char* pszName = "CAligner";
+ return pszName;
+ }
+
+ void CAligner::init()
+ {
+ CEquipment::init();
+ }
+
+ void CAligner::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CAligner::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CAligner>initPins");
+ }
+
+ void CAligner::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CAligner::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CAligner.h b/SourceCode/Bond/Servo/CAligner.h
new file mode 100644
index 0000000..9ff7d5f
--- /dev/null
+++ b/SourceCode/Bond/Servo/CAligner.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CAligner :
+ public CEquipment
+ {
+ public:
+ CAligner();
+ virtual ~CAligner();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CBakeCooling.cpp b/SourceCode/Bond/Servo/CBakeCooling.cpp
new file mode 100644
index 0000000..deac272
--- /dev/null
+++ b/SourceCode/Bond/Servo/CBakeCooling.cpp
@@ -0,0 +1,47 @@
+#include "stdafx.h"
+#include "CBakeCooling.h"
+
+namespace SERVO {
+ CBakeCooling::CBakeCooling() : CEquipment()
+ {
+
+ }
+
+ CBakeCooling::~CBakeCooling()
+ {
+
+ }
+
+ const char* CBakeCooling::getClassName()
+ {
+ static char* pszName = "CBakeCooling";
+ return pszName;
+ }
+
+ void CBakeCooling::init()
+ {
+ CEquipment::init();
+ }
+
+ void CBakeCooling::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CBakeCooling::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CBakeCooling>initPins");
+ }
+
+ void CBakeCooling::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CBakeCooling::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CBakeCooling.h b/SourceCode/Bond/Servo/CBakeCooling.h
new file mode 100644
index 0000000..6e3009a
--- /dev/null
+++ b/SourceCode/Bond/Servo/CBakeCooling.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CBakeCooling :
+ public CEquipment
+ {
+ public:
+ CBakeCooling();
+ virtual ~CBakeCooling();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
index 11d90d8..03774a9 100644
--- a/SourceCode/Bond/Servo/CBonder.cpp
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -1,8 +1,9 @@
#include "stdafx.h"
#include "CBonder.h"
+
namespace SERVO {
- CBonder::CBonder()
+ CBonder::CBonder() : CEquipment()
{
}
@@ -28,6 +29,13 @@
CEquipment::term();
}
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CBonder::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CBonder>initPins");
+ }
+
void CBonder::onTimer(UINT nTimerid)
{
CEquipment::onTimer(nTimerid);
diff --git a/SourceCode/Bond/Servo/CBonder.h b/SourceCode/Bond/Servo/CBonder.h
index 3cf9c78..846e49d 100644
--- a/SourceCode/Bond/Servo/CBonder.h
+++ b/SourceCode/Bond/Servo/CBonder.h
@@ -1,18 +1,20 @@
#pragma once
#include "CEquipment.h"
+
namespace SERVO {
class CBonder :
public CEquipment
{
public:
CBonder();
- ~CBonder();
+ virtual ~CBonder();
public:
virtual const char* getClassName();
virtual void init();
virtual void term();
+ virtual void initPins();
virtual void onTimer(UINT nTimerid);
virtual void serialize(CArchive& ar);
};
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index eff68be..00d065e 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -1,8 +1,9 @@
#include "stdafx.h"
#include "CEFEM.h"
+
namespace SERVO {
- CEFEM::CEFEM()
+ CEFEM::CEFEM() : CEquipment()
{
}
@@ -28,6 +29,13 @@
CEquipment::term();
}
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CEFEM::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CEFEM>initPins");
+ }
+
void CEFEM::onTimer(UINT nTimerid)
{
CEquipment::onTimer(nTimerid);
diff --git a/SourceCode/Bond/Servo/CEFEM.h b/SourceCode/Bond/Servo/CEFEM.h
index b77770e..19d9899 100644
--- a/SourceCode/Bond/Servo/CEFEM.h
+++ b/SourceCode/Bond/Servo/CEFEM.h
@@ -1,18 +1,20 @@
#pragma once
#include "CEquipment.h"
+
namespace SERVO {
class CEFEM :
public CEquipment
{
public:
CEFEM();
- ~CEFEM();
+ virtual ~CEFEM();
public:
virtual const char* getClassName();
virtual void init();
virtual void term();
+ virtual void initPins();
virtual void onTimer(UINT nTimerid);
virtual void serialize(CArchive& ar);
virtual void getAttributeVector(CAttributeVector& attrubutes);
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 7ef517b..deaee05 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -95,6 +95,7 @@
void CEquipment::init()
{
+ initPins();
for (auto item : m_mapStep) {
item.second->init();
}
@@ -372,4 +373,10 @@
if (index >= VCR_MAX) return FALSE;
return m_bVCREnable[index];
}
+
+ int CEquipment::recvSample(CPin* pPin, CSample* pSample)
+ {
+ LOGI("<CEquipment>recvSample, pin:%s", pPin->getName().c_str());
+ return 0;
+ }
}
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index ad84bee..02f9345 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -1,6 +1,8 @@
#pragma once
#include "Log.h"
#include "CCLinkIEControl.h"
+#include "CSample.h"
+#include "CPin.h"
#include "CEqModeStep.h"
#include "CEqStatusStep.h"
#include "CEqAlarmStep.h"
@@ -75,9 +77,11 @@
std::map<unsigned int, CStep*>& getSteps();
virtual void init();
virtual void term();
+ virtual void initPins() = 0;
virtual void onTimer(UINT nTimerid);
virtual void serialize(CArchive& ar);
virtual void onReceiveLBData(const char* pszData, size_t size);
+ virtual int recvSample(CPin* pPin, CSample* pSample);
// 以下为从CC-Link读取到的Bit标志位检测函数
diff --git a/SourceCode/Bond/Servo/CFliper.cpp b/SourceCode/Bond/Servo/CFliper.cpp
new file mode 100644
index 0000000..8858147
--- /dev/null
+++ b/SourceCode/Bond/Servo/CFliper.cpp
@@ -0,0 +1,47 @@
+#include "stdafx.h"
+#include "CFliper.h"
+
+namespace SERVO {
+ CFliper::CFliper() : CEquipment()
+ {
+
+ }
+
+ CFliper::~CFliper()
+ {
+
+ }
+
+ const char* CFliper::getClassName()
+ {
+ static char* pszName = "CFliper";
+ return pszName;
+ }
+
+ void CFliper::init()
+ {
+ CEquipment::init();
+ }
+
+ void CFliper::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CFliper::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CFliper>initPins");
+ }
+
+ void CFliper::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CFliper::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CFliper.h b/SourceCode/Bond/Servo/CFliper.h
new file mode 100644
index 0000000..b66ab9d
--- /dev/null
+++ b/SourceCode/Bond/Servo/CFliper.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CFliper :
+ public CEquipment
+ {
+ public:
+ CFliper();
+ virtual ~CFliper();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
new file mode 100644
index 0000000..bda1be4
--- /dev/null
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -0,0 +1,48 @@
+#include "stdafx.h"
+#include "CLoadPort.h"
+
+
+namespace SERVO {
+ CLoadPort::CLoadPort() : CEquipment()
+ {
+
+ }
+
+ CLoadPort::~CLoadPort()
+ {
+
+ }
+
+ const char* CLoadPort::getClassName()
+ {
+ static char* pszName = "CLoadPort";
+ return pszName;
+ }
+
+ void CLoadPort::init()
+ {
+ CEquipment::init();
+ }
+
+ void CLoadPort::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CLoadPort::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CLoadPort>initPins");
+ }
+
+ void CLoadPort::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CLoadPort::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CLoadPort.h b/SourceCode/Bond/Servo/CLoadPort.h
new file mode 100644
index 0000000..15b2607
--- /dev/null
+++ b/SourceCode/Bond/Servo/CLoadPort.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CLoadPort :
+ public CEquipment
+ {
+ public:
+ CLoadPort();
+ virtual ~CLoadPort();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index 10379b0..8e84ca4 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -73,18 +73,9 @@
// 初始化添加各子设备
addEFEM(listener);
+ addBonder(0, listener);
+ addBonder(1, listener);
- /*
- {
- CBonder* pBonder = new CBonder();
- pBonder->setName("Bonder 1");
- pBonder->setDescription("Bonder 1.");
- pBonder->setReadBitBlock(0x4600, 0x4bff);
- pBonder->setStation(1, 3);
- addEquipment(pBonder);
- LOGE("已添加“Bonder 1”.");
- }
- */
// 定时器
g_pMaster = this;
@@ -105,7 +96,7 @@
return 0;
}
- int CMaster::addEquipment(CEquipment* pEquipment)
+ int CMaster::addToEquipmentList(CEquipment* pEquipment)
{
EquipmentListener listener;
listener.onAlive = [&](void* pEquipment, BOOL bAlive) -> void {
@@ -141,6 +132,26 @@
return nullptr;
}
+ /* 添加LoadPort1
+ * index -- 0~3
+ */
+ int CMaster::addLoadPort(int index, StepListener& listener)
+ {
+ ASSERT(index == 0 || index == 1 || index == 2 || index == 3);
+ char szName[62];
+ sprintf_s(szName, 64, "LoadPort %d", index + 1);
+ CLoadPort* pEquipment = new CLoadPort();
+ pEquipment->setName(szName);
+ pEquipment->setDescription(szName);
+ addToEquipmentList(pEquipment);
+
+ pEquipment->init();
+ LOGE("已添加“%s”.", pEquipment->getName().c_str());
+
+
+ return 0;
+ }
+
int CMaster::addEFEM(StepListener& listener)
{
CEFEM* pEquipment = new CEFEM();
@@ -150,7 +161,7 @@
pEquipment->setDescription("EFEM(ROBOT).");
pEquipment->setReadBitBlock(0x4000, 0x45ff);
pEquipment->setStation(0, 255);
- addEquipment(pEquipment);
+ addToEquipmentList(pEquipment);
// 添加 step
@@ -229,7 +240,7 @@
pStep->setName(STEP_PROCESS);
pStep->setListener(listener);
pStep->setWriteSignalDev(0x37);
- pStep->setProcessDev(0x1864);
+ pStep->setProcessDev(0x5864);
if (pEquipment->addStep(0x367, pStep) != 0) {
delete pStep;
}
@@ -300,6 +311,162 @@
return 0;
}
+ /* 添加bonder1 或 bonder2
+ * index -- 0, bonder1
+ * index -- 1, bonder2
+ */
+ int CMaster::addBonder(int index, StepListener& listener)
+ {
+ ASSERT(index == 0 || index == 1);
+ CBonder* pEquipment = new CBonder();
+ pEquipment->setName(index == 0 ? "Bonder 1" : "Bonder 2");
+ pEquipment->setDescription(index == 0 ? "Bonder 1." : "Bonder 2.");
+ pEquipment->setStation(1, index == 0 ? 3 : 4);
+ pEquipment->setReadBitBlock(index == 0 ? 0x4600 : 0x4c00,
+ index == 0 ? 0x4c00 : 0x5200);
+ addToEquipmentList(pEquipment);
+
+
+ // 添加 step
+ {
+ CEqModeStep* pStep = new CEqModeStep();
+ pStep->setName(STEP_MODE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x330 : 0x630);
+ pStep->setModeDev(index == 0 ? 0x6a8c : 0x848c);
+ if (pEquipment->addStep(0x360, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqStatusStep* pStep = new CEqStatusStep();
+ pStep->setName(STEP_STATUS);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x331 : 0x631);
+ pStep->setStatusDev(index == 0 ? 0x6a68 : 0x8a68);
+ if (pEquipment->addStep(0x361, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK1);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x332 : 0x632);
+ pStep->setAlarmDev(index == 0 ? 0x6c1d : 0x8c1d);
+ if (pEquipment->addStep(0x362, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK2);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x333 : 0x633);
+ pStep->setAlarmDev(index == 0 ? 0x6c4a : 0x8c4a);
+ if (pEquipment->addStep(0x363, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK3);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x334 : 0x634);
+ pStep->setAlarmDev(index == 0 ? 0x6c77 : 0x8c77);
+ if (pEquipment->addStep(0x364, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK4);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x335 : 0x635);
+ pStep->setAlarmDev(index == 0 ? 0x6ca4 : 0x8ca4);
+ if (pEquipment->addStep(0x365, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK5);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x336 : 0x636);
+ pStep->setAlarmDev(index == 0 ? 0x6cd1 : 0x8cd1);
+ if (pEquipment->addStep(0x366, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqProcessStep* pStep = new CEqProcessStep();
+ pStep->setName(STEP_PROCESS);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x337 : 0x637);
+ pStep->setProcessDev(index == 0 ? 0x7864 : 0x9864);
+ if (pEquipment->addStep(0x367, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqCimModeChangeStep* pStep = new CEqCimModeChangeStep();
+ pStep->setName(STEP_CIM_MODE_CHANGE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x350 : 0x650);
+ pStep->setCimModeDev(index == 0 ? 0x965 : 0x12b5);
+ if (pEquipment->addStep(0x350, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqCimMessageCmdStep* pStep = new CEqCimMessageCmdStep();
+ pStep->setName(STEP_CIM_MESSAGE_CMD);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x351 : 0x651);
+ pStep->setCimMessageDev(index == 0 ? 0x950 : 0x12a0);
+ if (pEquipment->addStep(0x351, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqCimMessageClearStep* pStep = new CEqCimMessageClearStep();
+ pStep->setName(STEP_CIM_MESSAGE_CLEAR);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x352 : 0x652);
+ pStep->setClearCimMessageDev(index == 0 ? 0x963 : 0x12b3);
+ if (pEquipment->addStep(0x352, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqDateTimeSetCmdStep* pStep = new CEqDateTimeSetCmdStep();
+ pStep->setName(STEP_DATETIME_SET_CMD);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x353 : 0x653);
+ pStep->setDateTimeDev(index == 0 ? 0x966 : 0x12b6);
+ if (pEquipment->addStep(0x353, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqModeChangeStep* pStep = new CEqModeChangeStep();
+ pStep->setName(STEP_EQ_MODE_CHANGE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x355 : 0x655);
+ pStep->setEqModeDev(index == 0 ? 0x96E : 0x12be);
+ if (pEquipment->addStep(0x355, pStep) != 0) {
+ delete pStep;
+ }
+ }
+
+
+ pEquipment->init();
+ LOGE("已添加“%s”.", pEquipment->getName().c_str());
+
+
+ return 0;
+ }
+
void CMaster::onTimer(UINT nTimerid)
{
for (auto item : m_listEquipment) {
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 0fefda3..dc96b8d 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -3,6 +3,7 @@
#include "CEquipment.h"
#include "CEFEM.h"
#include "CBonder.h"
+#include "CLoadPort.h"
#include "CCLinkIEControl.h"
@@ -32,8 +33,10 @@
CEquipment* getEquipment(int id);
private:
- int addEquipment(CEquipment* pEquipment);
+ int addToEquipmentList(CEquipment* pEquipment);
+ int addLoadPort(int index, StepListener& listener);
int addEFEM(StepListener& listener);
+ int addBonder(int index, StepListener& listener);
private:
MasterListener m_listener;
diff --git a/SourceCode/Bond/Servo/CMeasurement.cpp b/SourceCode/Bond/Servo/CMeasurement.cpp
new file mode 100644
index 0000000..7722a21
--- /dev/null
+++ b/SourceCode/Bond/Servo/CMeasurement.cpp
@@ -0,0 +1,47 @@
+#include "stdafx.h"
+#include "CMeasurement.h"
+
+namespace SERVO {
+ CMeasurement::CMeasurement() : CEquipment()
+ {
+
+ }
+
+ CMeasurement::~CMeasurement()
+ {
+
+ }
+
+ const char* CMeasurement::getClassName()
+ {
+ static char* pszName = "CMeasurement";
+ return pszName;
+ }
+
+ void CMeasurement::init()
+ {
+ CEquipment::init();
+ }
+
+ void CMeasurement::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CMeasurement::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CMeasurement>initPins");
+ }
+
+ void CMeasurement::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CMeasurement::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CMeasurement.h b/SourceCode/Bond/Servo/CMeasurement.h
new file mode 100644
index 0000000..67b072e
--- /dev/null
+++ b/SourceCode/Bond/Servo/CMeasurement.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CMeasurement :
+ public CEquipment
+ {
+ public:
+ CMeasurement();
+ virtual ~CMeasurement();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CPanelAttributes.cpp b/SourceCode/Bond/Servo/CPanelAttributes.cpp
index 1c33774..f278435 100644
--- a/SourceCode/Bond/Servo/CPanelAttributes.cpp
+++ b/SourceCode/Bond/Servo/CPanelAttributes.cpp
@@ -161,7 +161,7 @@
y += 8;
- GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 13, rcClient.Height() - 3 - y);
+ GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 8, rcClient.Height() - 3 - y);
}
#define ATTRIBUTES_PANEL_MIN_WIDTH 88
diff --git a/SourceCode/Bond/Servo/CPanelEquipment.cpp b/SourceCode/Bond/Servo/CPanelEquipment.cpp
index 490babd..dcab95c 100644
--- a/SourceCode/Bond/Servo/CPanelEquipment.cpp
+++ b/SourceCode/Bond/Servo/CPanelEquipment.cpp
@@ -173,7 +173,7 @@
y += rcItem.Height();
y += 8;
- GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 13, rcClient.Height() - 3 - y);
+ GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 8, rcClient.Height() - 3 - y);
}
#define EQUIPMENT_PANEL_MIN_WIDTH 88
diff --git a/SourceCode/Bond/Servo/CPanelMaster.cpp b/SourceCode/Bond/Servo/CPanelMaster.cpp
index b27ea82..82c5361 100644
--- a/SourceCode/Bond/Servo/CPanelMaster.cpp
+++ b/SourceCode/Bond/Servo/CPanelMaster.cpp
@@ -118,7 +118,7 @@
pItem->GetWindowRect(&rcItem);
pItem->MoveWindow(12, (rcClient.Height() - rcItem.Height()) / 2, rcClient.Width() - 24, rcItem.Height());
- m_treeCtrl.MoveWindow(5, 5, rcClient.Width() - 13, rcClient.Height() - 10);
+ m_treeCtrl.MoveWindow(5, 5, rcClient.Width() - 8, rcClient.Height() - 10);
}
diff --git a/SourceCode/Bond/Servo/CPin.cpp b/SourceCode/Bond/Servo/CPin.cpp
new file mode 100644
index 0000000..ee11e1a
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPin.cpp
@@ -0,0 +1,130 @@
+#include "stdafx.h"
+#include "CPin.h"
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ CPin::CPin()
+ {
+ m_pEquipment = nullptr;
+ m_pConnectedPin = nullptr;
+ }
+
+ CPin::CPin(CEquipment* pEquipment, PinType type, char* pszName)
+ {
+ m_type = type;
+ m_strName = pszName;
+ m_pEquipment = pEquipment;
+ m_pConnectedPin = nullptr;
+ }
+
+ CPin::~CPin()
+ {
+
+ }
+
+ std::string& CPin::getName()
+ {
+ return m_strName;
+ }
+
+ int CPin::getType()
+ {
+ return m_type;
+ }
+
+ BOOL CPin::isConnected()
+ {
+ return m_pConnectedPin != NULL;
+ }
+
+ CPin* CPin::getConnectedPin()
+ {
+ return m_pConnectedPin;
+ }
+
+ CEquipment* CPin::getEquipment()
+ {
+ return m_pEquipment;
+ }
+
+ // 接受连接
+ // pPin -- 指定要连接的pin
+ // 返回 >= 0连接成功
+ int CPin::accpetConnect(CPin* pPin)
+ {
+ assert(pPin);
+
+
+ // 是否已经连接
+ if (m_pConnectedPin != NULL) {
+ return -1;
+ }
+
+ // 必须是一个输入一个输出(一个公一个母)
+ if (m_type == pPin->getType()) {
+ return -2;
+ }
+ m_pConnectedPin = pPin;
+
+
+ return 0;
+ }
+
+ int CPin::connectPin(CPin* pPin)
+ {
+ assert(pPin);
+
+
+ // 是否已经连接
+ if (m_pConnectedPin != NULL) {
+ return -1;
+ }
+
+
+ // 必须是一个输入一个输出(一个公一个母)
+ if (m_type == pPin->getType()) {
+ return -2;
+ }
+
+
+ // 对方接受连接?
+ int nRet = pPin->accpetConnect(this);
+ if (nRet < 0) {
+ return nRet;
+ }
+ m_pConnectedPin = pPin;
+
+
+ return 0;
+ }
+
+ int CPin::disconnect()
+ {
+ if (m_pConnectedPin == NULL) {
+ return -1;
+ }
+
+ assert(m_pConnectedPin->m_pConnectedPin == this);
+ m_pConnectedPin->m_pConnectedPin = NULL;
+ m_pConnectedPin = NULL;
+
+ return 0;
+ }
+
+ int CPin::sendSample(CSample* pSample)
+ {
+ if (m_pConnectedPin != NULL) {
+ m_pConnectedPin->recvSample(pSample);
+ }
+
+ return 0;
+ }
+
+ int CPin::recvSample(CSample* pSample)
+ {
+ assert(m_pEquipment);
+ m_pEquipment->recvSample(this, pSample);
+ return 0;
+ }
+}
diff --git a/SourceCode/Bond/Servo/CPin.h b/SourceCode/Bond/Servo/CPin.h
new file mode 100644
index 0000000..a4872e8
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPin.h
@@ -0,0 +1,41 @@
+#pragma once
+#include "CSample.h"
+
+
+namespace SERVO {
+ // PIN类型
+ enum PinType {
+ OUTPUT = 0,
+ INPUT = 1,
+ };
+
+ class CEquipment;
+ class CPin
+ {
+ public:
+ CPin();
+ CPin(CEquipment* pEquipment, PinType type, char* pszName);
+ virtual ~CPin();
+
+ public:
+ virtual std::string& getName();
+ int getType();
+ virtual int disconnect();
+ virtual int accpetConnect(CPin* pPin);
+ virtual int connectPin(CPin* pPin);
+ virtual BOOL isConnected();
+ virtual CPin* getConnectedPin();
+ virtual CEquipment* getEquipment();
+
+ public:
+ int recvSample(CSample* pSample);
+ int sendSample(CSample* pSample);
+
+ private:
+ std::string m_strName;
+ PinType m_type;
+ CEquipment* m_pEquipment;
+ CPin* m_pConnectedPin;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CSample.cpp b/SourceCode/Bond/Servo/CSample.cpp
new file mode 100644
index 0000000..7f83c48
--- /dev/null
+++ b/SourceCode/Bond/Servo/CSample.cpp
@@ -0,0 +1,15 @@
+#include "stdafx.h"
+#include "CSample.h"
+
+
+namespace SERVO {
+ CSample::CSample()
+ {
+
+ }
+
+ CSample::~CSample()
+ {
+
+ }
+}
diff --git a/SourceCode/Bond/Servo/CSample.h b/SourceCode/Bond/Servo/CSample.h
new file mode 100644
index 0000000..6981192
--- /dev/null
+++ b/SourceCode/Bond/Servo/CSample.h
@@ -0,0 +1,12 @@
+#pragma once
+
+
+namespace SERVO {
+ class CSample
+ {
+ public:
+ CSample();
+ virtual ~CSample();
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CVacuumBake.cpp b/SourceCode/Bond/Servo/CVacuumBake.cpp
new file mode 100644
index 0000000..41dee7d
--- /dev/null
+++ b/SourceCode/Bond/Servo/CVacuumBake.cpp
@@ -0,0 +1,47 @@
+#include "stdafx.h"
+#include "CVacuumBake.h"
+
+namespace SERVO {
+ CVacuumBake::CVacuumBake() : CEquipment()
+ {
+
+ }
+
+ CVacuumBake::~CVacuumBake()
+ {
+
+ }
+
+ const char* CVacuumBake::getClassName()
+ {
+ static char* pszName = "CVacuumBake";
+ return pszName;
+ }
+
+ void CVacuumBake::init()
+ {
+ CEquipment::init();
+ }
+
+ void CVacuumBake::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CVacuumBake::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CVacuumBake>initPins");
+ }
+
+ void CVacuumBake::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CVacuumBake::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CVacuumBake.h b/SourceCode/Bond/Servo/CVacuumBake.h
new file mode 100644
index 0000000..c6953c1
--- /dev/null
+++ b/SourceCode/Bond/Servo/CVacuumBake.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CVacuumBake :
+ public CEquipment
+ {
+ public:
+ CVacuumBake();
+ virtual ~CVacuumBake();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj b/SourceCode/Bond/Servo/Servo.vcxproj
index 96cc98d..9afb38a 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj
+++ b/SourceCode/Bond/Servo/Servo.vcxproj
@@ -199,8 +199,10 @@
<ClInclude Include="AlarmManager.h" />
<ClInclude Include="ApredTreeCtrl2.h" />
<ClInclude Include="BlButton.h" />
+ <ClInclude Include="CAligner.h" />
<ClInclude Include="CAttribute.h" />
<ClInclude Include="CAttributeVector.h" />
+ <ClInclude Include="CBakeCooling.h" />
<ClInclude Include="CBonder.h" />
<ClInclude Include="CCLinkPerformance\CCLinkIEControl.h" />
<ClInclude Include="CCLinkPerformance\PerformanceMelsec.h" />
@@ -214,11 +216,17 @@
<ClInclude Include="CEqProcessStep.h" />
<ClInclude Include="CEqStatusStep.h" />
<ClInclude Include="CEqVCREnableStep.h" />
+ <ClInclude Include="CFliper.h" />
+ <ClInclude Include="CLoadPort.h" />
+ <ClInclude Include="CMeasurement.h" />
<ClInclude Include="CPanelAttributes.h" />
<ClInclude Include="CPanelEquipment.h" />
<ClInclude Include="CPanelMaster.h" />
+ <ClInclude Include="CPin.h" />
<ClInclude Include="CReadStep.h" />
+ <ClInclude Include="CSample.h" />
<ClInclude Include="CStep.h" />
+ <ClInclude Include="CVacuumBake.h" />
<ClInclude Include="CWriteStep.h" />
<ClInclude Include="DevicePropertyDlg.h" />
<ClInclude Include="CEFEM.h" />
@@ -251,8 +259,10 @@
<ClCompile Include="AlarmManager.cpp" />
<ClCompile Include="ApredTreeCtrl2.cpp" />
<ClCompile Include="BlButton.cpp" />
+ <ClCompile Include="CAligner.cpp" />
<ClCompile Include="CAttribute.cpp" />
<ClCompile Include="CAttributeVector.cpp" />
+ <ClCompile Include="CBakeCooling.cpp" />
<ClCompile Include="CBonder.cpp" />
<ClCompile Include="CCLinkPerformance\CCLinkIEControl.cpp" />
<ClCompile Include="CCLinkPerformance\PerformanceMelsec.cpp" />
@@ -266,11 +276,17 @@
<ClCompile Include="CEqProcessStep.cpp" />
<ClCompile Include="CEqStatusStep.cpp" />
<ClCompile Include="CEqVCREnableStep.cpp" />
+ <ClCompile Include="CFliper.cpp" />
+ <ClCompile Include="CLoadPort.cpp" />
+ <ClCompile Include="CMeasurement.cpp" />
<ClCompile Include="CPanelAttributes.cpp" />
<ClCompile Include="CPanelEquipment.cpp" />
<ClCompile Include="CPanelMaster.cpp" />
+ <ClCompile Include="CPin.cpp" />
<ClCompile Include="CReadStep.cpp" />
+ <ClCompile Include="CSample.cpp" />
<ClCompile Include="CStep.cpp" />
+ <ClCompile Include="CVacuumBake.cpp" />
<ClCompile Include="CWriteStep.cpp" />
<ClCompile Include="DevicePropertyDlg.cpp" />
<ClCompile Include="CEFEM.cpp" />
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj.filters b/SourceCode/Bond/Servo/Servo.vcxproj.filters
index eea77ce..097ffe3 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj.filters
+++ b/SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -58,6 +58,14 @@
<ClCompile Include="CEqCimMessageClearStep.cpp" />
<ClCompile Include="CEqDateTimeSetCmdStep.cpp" />
<ClCompile Include="CEqVCREnableStep.cpp" />
+ <ClCompile Include="CPin.cpp" />
+ <ClCompile Include="CSample.cpp" />
+ <ClCompile Include="CLoadPort.cpp" />
+ <ClCompile Include="CAligner.cpp" />
+ <ClCompile Include="CFliper.cpp" />
+ <ClCompile Include="CMeasurement.cpp" />
+ <ClCompile Include="CBakeCooling.cpp" />
+ <ClCompile Include="CVacuumBake.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="AlarmManager.h" />
@@ -114,6 +122,14 @@
<ClInclude Include="CEqCimMessageClearStep.h" />
<ClInclude Include="CEqDateTimeSetCmdStep.h" />
<ClInclude Include="CEqVCREnableStep.h" />
+ <ClInclude Include="CPin.h" />
+ <ClInclude Include="CSample.h" />
+ <ClInclude Include="CLoadPort.h" />
+ <ClInclude Include="CAligner.h" />
+ <ClInclude Include="CFliper.h" />
+ <ClInclude Include="CMeasurement.h" />
+ <ClInclude Include="CBakeCooling.h" />
+ <ClInclude Include="CVacuumBake.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Servo.rc" />
--
Gitblit v1.9.3