2024-04-09 16:53:02 +08:00

114 lines
3.1 KiB
C++

#pragma once
#include "Machine.h"
class HBD1000 :public Machine
{
public:
enum LoadInResult {
In_NoResult=0,
In_Intercept,
In_Success,
In_CylinderDisconnectCleanBoxError,
In_CylinderReachPrintError,
In_CylinderPrintLoadError,
In_MoldConnectCylinderError
};
enum LoadInProcStep {
In_Start=0,
In_CylinderDisconnectCleanBox,
In_CylinderReachPrint,
In_CylinderPrintLoad,
In_MoldConnectCylinder
};
enum LoadOutResult {
Out_NoResult = 0,
Out_Intercept,
Out_Success,
Out_MoldDisconnectCylinderError,
Out_CylinderPrintUnloadError,
Out_CylinderReachCleanError,
Out_CylinderConnectCleanBoxError
};
enum LoadOutProcStep {
Out_Start = 0,
Out_MoldDisconnectCylinder,
Out_CylinderPrintUnload,
Out_CylinderReachClean,
Out_CylinderConnectCleanBox
};
enum CylinderState
{
CylinderInMid = 0,
CylinderInPrintUnLoaded,
CylinderInPrintLoaded,
CylinderInCleanOutsidePlatformUnConnectBox,
CylinderInCleanOutsidePlatformConnectedBox,
CylinderInCleanInsidePlatformUnConnectBox,
CylinderInCleanInsidePlatformConnectedBox
};
HBD1000(MachineTypeCfg::MachineTypeId type);
~HBD1000();
//void CheckIO_NEW(vector<string>&ins, IOCfgWrapper* iocfgWrapper);
//AxisCfg* CreateMoldAxisCfg();
//AxisCfg* CreateLoadAxisCfg();
//AxisCfg* CreateArmAxisCfg();
//AxisCfg* CreateSupplyAxisCfg();
//AxisCfg* CreateCleanAxisCfg();
//void DrawSignal(bool* isshow);
//void DrawAxisCfg();
//void DrawPowderCtrl(bool* winShow);
//void DrawServoState(bool* winShow);
virtual void CheckIO();
void InitSignal(SignalStateWrapper* ssw, void* cc);
void InitSysParam(SysParamWrapper* spw, void* cc);
//void InitPLCCommand(vector<S7Command*>& vecs);
void GetAlarmState(SignalState& signalState);
bool CheckPrintMoldReady();
bool CheckPrintHigh(float jobhigh);
private:
/*static*/ void CheckIO_V0(/*vector<string>&ins, IOCfgWrapper* iocfgWrapper, string str, int type*/);
/*static*/ void CheckIO_V1(/*vector<string>&ins, IOCfgWrapper* iocfgWrapper, string str, int type*/);
/*static*/ void CheckIO_V2(/*vector<string>&ins, IOCfgWrapper* iocfgWrapper, string str, int type*/);
/*static*/ void CheckIO_V3(/*vector<string>&ins, IOCfgWrapper* iocfgWrapper, string str, int type*/);
/*static*/ void CheckIO_V4(/*vector<string>& ins, IOCfgWrapper* iocfgWrapper, string str, int type*/);
//static void ProcReadPLC(void* pobject, Command* pcommand);
//static void ProcReadPLCData(void* pobject, Command* pcommand);
bool IsLoadAxisCanMoveLeft();
string GetLoadAxisCanotMoveLeftInfo();
bool IsLoadAxisCanMoveRight();
string GetLoadAxisCanotMoveRightInfo();
bool IsArmCanMoveBack();
string GetArmCanotMoveBackInfo();
bool IsArmCanMoveFront();
string GetArmCanotMoveFrontInfo();
bool IsMoldCanMoveUp();
bool IsMoldCanMoveDown();
string GetMoldCanotUpInfo();
string GetMoldCanotDownInfo();
//void LoadInRun();
//void LoadOutRun();
public:
static const int IO_V0;
static const int IO_V1;
static const int IO_V2;
static const int IO_V3;
static const int IO_V4;
private:
static const unsigned int READ_INFO_ITEM_COUNT = 7;
static const unsigned int READ_DATA_ITEM_COUNT = 1;
};