77 lines
2.0 KiB
C++
77 lines
2.0 KiB
C++
#pragma once
|
|
#include "../config/bean/IOCfg.h"
|
|
#include "../config/bean/ScannerControlCfg.h"
|
|
#include "SysParam.h"
|
|
#include "SignalState.h"
|
|
#include "Command/CoverParamCommand.h"
|
|
#include "command/PLCInvoker.h"
|
|
#include "../config/bean/MachineCfg.h"
|
|
#include "../config/bean/ExtCfg.h"
|
|
#include "Axis.h"
|
|
|
|
class MachineCtrl
|
|
{
|
|
public:
|
|
|
|
MachineCtrl();
|
|
~MachineCtrl();
|
|
void Init(PLCReveiver* receiver, SysParamWrapper* sysParamWrapper, SignalStateWrapper* alarmStateWrapper, PLCAxis* axis);
|
|
|
|
void StartLaser(bool iswait);
|
|
void StopLaser(bool iswait);
|
|
int GetTimeWhenExit();
|
|
bool IsLaserActive();
|
|
bool IsLaserOn();
|
|
void StopLaserByCfg(ScannerControlCfg* cfg);
|
|
void MachineStartup();
|
|
void MachineStop();
|
|
|
|
void ExecuteCover(float layerThick, short powderCount, bool isCoverDebug, bool isFirst);
|
|
void ExecuteDataSizeY(float miny, float maxy);
|
|
|
|
bool IsCovering() {
|
|
return m_SignalStateWrapper->m_IsCovering->GetValue();
|
|
}
|
|
bool IsCoverFinishedCanPrint() {
|
|
return m_SignalStateWrapper->m_IsCoverFinishedCanPrint->GetValue();
|
|
}
|
|
void ResetCoverFinishedCanPrint() {
|
|
m_SignalStateWrapper->m_IsCoverFinishedCanPrint->SetValue(false);
|
|
}
|
|
void MoldMoveUp(float fvalue, bool iswait);
|
|
void MoldMoveDown(float fvalue, bool iswait);
|
|
|
|
float GetAllowPrintHigh() {
|
|
return m_SysParamWrapper->m_AllowPrintHigh->GetValue();
|
|
}
|
|
private:
|
|
static DWORD WINAPI StopLaserProc(MachineCtrl* _this);
|
|
static DWORD WINAPI StartLaserProc(MachineCtrl* _this);
|
|
void StopLaserRun();
|
|
void StartLaserRun();
|
|
|
|
static DWORD WINAPI StopLaserByCfgProc(MachineCtrl* _this);
|
|
void StopLaserByCfgRun();
|
|
|
|
static DWORD WINAPI StartUpProc(MachineCtrl* _this);
|
|
void StartUpRun();
|
|
|
|
static DWORD WINAPI ShutdownProc(MachineCtrl* _this);
|
|
void ShutdownRun();
|
|
|
|
|
|
private:
|
|
MachineCfg* m_MachineCfg;
|
|
IOCfgWrapper* m_IOCfgWrapper;
|
|
SysParamWrapper* m_SysParamWrapper;
|
|
SignalStateWrapper* m_SignalStateWrapper;
|
|
ScannerControlCfg* m_StopLaserCfg; //按配置关闭激光
|
|
RunCfg* m_RunCfg;
|
|
ExtCfg* m_ExtCfg;
|
|
PLCInvoker* m_Invoker;
|
|
CoverParamCommand* m_CoverParamCommand;
|
|
PLCAxis* m_Axis;
|
|
|
|
};
|
|
|