123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #pragma once
- #include "CModule.h"
- // 枚举定义:料盒的状态
- enum BOX_STATUS {
- Lev_Idle = 1, // 空闲
- Lev_Occupied, // 已占用
- };
- typedef struct
- {
- int iCurrLayers; //当前工作层
- int iLayersTotal; //总层数
- double iTopLev; //最上层高度 um
- double iBottomLev; //最下层高度 um
- XY_DOUBLE_STRUCT stPos; //料盒位置;
- std::vector<BOX_STATUS> iStatas; //每层状态
- int iLength; //料盒长度 um
- int iLeight; //料盒高度 um
- int iWall; //侧壁厚 um
- int iTopWall; //上壁厚 um
- int iBelowWall; //下壁厚 um
- }MATERIAL_BOX_VIEW_STRUCT;
- typedef struct
- {
- MATERIAL_BOX_VIEW_STRUCT stBoxView;
- string strStatas; //每层状态,用逗号分割
- double dSaftPos;
- }MATERIAL_BOX_CONFIG_STRUCT;
- class __declspec(dllexport) CMaterialBox : public CModule
- {
- public:
- CMaterialBox(MODULE_LIST eModuleType);
- ~CMaterialBox(){}
- virtual LONG AllocateAxis(vector<CAxis*> vecAxis) override;
- virtual LONG AllocateIo(vector<CIO*> vecIo) override;
- virtual LONG ToHome() override;
- virtual LONG Sync() override;
- virtual LONG ToSafePosition() override;
- virtual LONG InitResource() override;
- MATERIAL_BOX_VIEW_STRUCT GetMaterialBoxInfo();
- private:
- CAxis* m_pZAxis = nullptr;
- MATERIAL_BOX_CONFIG_STRUCT m_stConfig;
- void DataChangNotice(string strDbName, string strTableName);
- virtual void SetDataChangFunction() override;
- virtual LONG SetParam() override;//保存配置参数
- virtual LONG GetParam() override;//加载配置参数
- };
|