139 lines
3.5 KiB
C++
139 lines
3.5 KiB
C++
/*
|
|
*
|
|
*
|
|
* DIFF_SEPTAL_POSITION 隔膜位置由20改为50的主泵动作时间
|
|
*/
|
|
#ifndef INKJETPRINTER_H
|
|
#define INKJETPRINTER_H
|
|
|
|
#define SPEEDOVER //超速停止
|
|
|
|
|
|
#include <QTabWidget>
|
|
#include <QTimer>
|
|
#include <QTime>
|
|
#include "Tftp/filetranseceiver.h"
|
|
#include "ParaSettingUI.h"
|
|
#include "modbus/modbustcp.h"
|
|
#include <QCloseEvent>
|
|
#include "dlgshowmsg.h"
|
|
#include <QThread>
|
|
#include <QMessageBox>
|
|
|
|
namespace Ui {
|
|
class InkJetPrinter;
|
|
}
|
|
|
|
|
|
#define MAX_PRESSURE_RELEASE_DIFF 25
|
|
#define MAX_PRESSURE_DIFF 50
|
|
#define MAX_VISICOSITY_RATIO 110 //105%
|
|
#define DIFF_SEPTAL_POSITION 50
|
|
#define MAX_VISICOSITY_VALUE_OVERFLOW_NUM 3 //连续超过此值会进行粘度调整
|
|
#define MAX_ALLOW_VISICOSITY_OVERFLOW_NUM 120 //连续超那么多次,会被认为粘度故障
|
|
|
|
class PicScene;
|
|
|
|
class InkJetPrinter : public QTabWidget,public ParaSettingUI
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit InkJetPrinter(QWidget *parent = 0);
|
|
~InkJetPrinter();
|
|
void pressureAdj(int);
|
|
FileTranseceiver* fileTransceiv;
|
|
FileTranseceiver* tcpTransceiv;
|
|
// void processCommands();
|
|
#ifdef MODBUS
|
|
// class ModbusSerial *modbus;
|
|
class ModbusTcp *modbus;
|
|
QThread m_thread;
|
|
#endif
|
|
|
|
public slots:
|
|
void onchangeEditMode(int);
|
|
void onChangeTab(QString);
|
|
//void onPrintErrorStatus(QString s);
|
|
void onPrintErrorStatus(QString s, unsigned int res);
|
|
|
|
void close_jd_timer();
|
|
void handlePushButtonStartPressed(bool);
|
|
void handleInitedPID();
|
|
|
|
void onModbusWriteCalendar();
|
|
void resetPressureCnt();
|
|
void pressureAdjustForsystemseeting();
|
|
|
|
private:
|
|
Ui::InkJetPrinter *ui;
|
|
DlgShowMsg *dlgShowMsg;
|
|
//MainWindow *mainWindow;
|
|
QTimer* viscosity_timer;
|
|
QTimer* timer;
|
|
QTimer* jd_timer;
|
|
QTime t1;
|
|
void autoControlHeater();
|
|
void autoControlValvePump();
|
|
void detectAndcontrolReclaimTank();
|
|
void refreshModbusStatus(void);
|
|
void checkPressureControl();
|
|
void showMessage(QString);
|
|
|
|
Q_SIGNALS:
|
|
|
|
// void updateQRcode();
|
|
// void startPrint();
|
|
// void pausePrint();
|
|
// void stopPrint();
|
|
|
|
void setReclaimTankCurrentPos(int);
|
|
void reclaimTankOpenDone();
|
|
void reclaimTankCloseDone();
|
|
void reclaimTankBlock(); //回收槽卡住
|
|
//void changeEditMode(int);
|
|
void SpeedOver(int mode);
|
|
void updateCnt1GroupDisp(bool);void updateCnt2GroupDisp(bool);
|
|
void updataPara2UI();
|
|
void sendPicScene(PicScene* pPicScene);
|
|
void openFile(QString filePath,bool insertFlag);
|
|
|
|
private slots:
|
|
void OnSpeedOver(int mode);
|
|
void jd_timerHandler();
|
|
void timerHandler();
|
|
void onInkJetPrinterCurrentChanged(int index);
|
|
void onReclaimTankBlock();
|
|
void onAuthChanged(int auth);
|
|
void onConfigChanged();
|
|
void OnFinished(int event);
|
|
void OnBoxFinished(int event);
|
|
void DacAdjustStore();
|
|
void fpgaDebugWriteByte();
|
|
void fpgaDebugReadByte();
|
|
void fpgaDebugWriteWord();
|
|
void fpgaDebugReadWord();
|
|
void fpgaDebugWriteDWord();
|
|
void fpgaDebugReadDWord();
|
|
void recievedFile2Save(QString fileName);
|
|
void viscosity_timerHandler();
|
|
void disableTabClick();
|
|
private:
|
|
|
|
QLabel *t_label;
|
|
QMessageBox *msgtest,*msgBox1;
|
|
void closeEvent(QCloseEvent *event);
|
|
void resizeEvent(QResizeEvent *);
|
|
void checkMixValveOpen();
|
|
void checkMixValveClose();
|
|
void cycleValveRunForSelfCheck();
|
|
void cnt1GroupCheck(void);void cnt2GroupCheck(void);
|
|
void loadVoltageValue();
|
|
char jd_res;
|
|
bool pushButtonStartFlag;
|
|
|
|
unsigned char rWarnViscoReady;
|
|
};
|
|
|
|
#endif // INKJETPRINTER_H
|