2024-03-19 17:45:12 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
#include "machine.h"
|
|
|
|
|
|
|
|
|
|
class HBDE1000 :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,
|
|
|
|
|
Out_CylinderReachHandError,
|
|
|
|
|
Out_CylinderDisconnectCleanBoxError
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum LoadOutProcStep {
|
|
|
|
|
Out_Start = 0,
|
|
|
|
|
Out_MoldDisconnectCylinder,
|
|
|
|
|
Out_CylinderPrintUnload,
|
|
|
|
|
Out_CylinderReachClean,
|
|
|
|
|
Out_CylinderConnectCleanBox,
|
|
|
|
|
Out_CylinderReachHand,
|
|
|
|
|
Out_CylinderDisconnectCleanBox
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum CylinderState
|
|
|
|
|
{
|
|
|
|
|
CylinderInMid = 0,
|
|
|
|
|
CylinderInPrintUnLoaded,
|
|
|
|
|
CylinderInPrintLoaded,
|
|
|
|
|
CylinderInCleanUnConnectBox,
|
|
|
|
|
CylinderInCleanConnectedBox,
|
|
|
|
|
CylinderInHand
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
HBDE1000(MachineTypeCfg::MachineTypeId type);
|
|
|
|
|
~HBDE1000();
|
|
|
|
|
|
|
|
|
|
AxisCfg* CreateMoldAxisCfg();
|
|
|
|
|
AxisCfg* CreateLoadAxisCfg();
|
|
|
|
|
AxisCfg* CreateArmAxisCfg();
|
|
|
|
|
AxisCfg* CreateSupplyAxisCfg();
|
|
|
|
|
AxisCfg* CreateCleanAxisCfg();
|
|
|
|
|
|
|
|
|
|
void DrawSignal(bool* isshow);
|
|
|
|
|
void DrawAxisCfg();
|
|
|
|
|
void DrawPowderCtrl(bool* winShow);
|
|
|
|
|
void DrawAnalogExt();
|
|
|
|
|
void DrawServoState(bool* winShow);
|
|
|
|
|
|
2024-03-25 13:22:32 +08:00
|
|
|
|
void InitSignal(SignalStateWrapper* ssw, PLCReveiver* cc);
|
2024-05-22 15:58:54 +08:00
|
|
|
|
//void InitSysParam(SysParamWrapper* spw, PLCReveiver* cc);
|
2024-03-19 17:45:12 +08:00
|
|
|
|
void InitPLCCommand(vector<S7Command*>& vecs);
|
2024-05-17 10:57:17 +08:00
|
|
|
|
void GetAlarmState(SignalState& signalState);
|
2024-05-22 15:58:54 +08:00
|
|
|
|
bool CheckPrintMoldReady();
|
|
|
|
|
void GetDebugRTC(vector<CardSerialPair>& vec);
|
|
|
|
|
void BindLaser();
|
2024-03-19 17:45:12 +08:00
|
|
|
|
private:
|
|
|
|
|
static void CheckIO_V0(vector<string>&ins, IOCfgWrapper* iocfgWrapper, string str, int mtype);
|
2024-03-22 11:28:06 +08:00
|
|
|
|
static void ProcReadPLC(void* pobject, Command* pcommand);
|
|
|
|
|
static void ProcReadPLCData(void* pobject, Command* pcommand);
|
2024-03-19 17:45:12 +08:00
|
|
|
|
|
2024-05-22 15:58:54 +08:00
|
|
|
|
void LoadInRun();
|
|
|
|
|
void LoadOutRun();
|
2024-03-19 17:45:12 +08:00
|
|
|
|
bool IsLoadAxisCanMoveLeft();
|
|
|
|
|
string GetLoadAxisCanotMoveLeftInfo();
|
|
|
|
|
bool IsLoadAxisCanMoveRight();
|
|
|
|
|
string GetLoadAxisCanotMoveRightInfo();
|
|
|
|
|
bool IsArmCanMoveBack();
|
|
|
|
|
string GetArmCanotMoveBackInfo();
|
|
|
|
|
bool IsArmCanMoveFront();
|
|
|
|
|
string GetArmCanotMoveFrontInfo();
|
|
|
|
|
bool IsMoldCanMoveUp();
|
|
|
|
|
bool IsMoldCanMoveDown();
|
|
|
|
|
string GetMoldCanotUpInfo();
|
|
|
|
|
string GetMoldCanotDownInfo();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
static const int IO_V0;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static const unsigned int READ_INFO_ITEM_COUNT = 7;
|
|
|
|
|
static const unsigned int READ_DATA_ITEM_COUNT = 1;
|
|
|
|
|
};
|
|
|
|
|
|