10#include <QtSerialPort>
11#include <QModbusClient>
12#include <QModbusDataUnit>
13#include <QModbusRtuSerialMaster>
17#include <QMutexLocker>
19#include <qcustomplot.h>
20#include <QElapsedTimer>
21#include <QApplication>
22#include <QCoreApplication>
26#include <QGraphicsView>
33#include "joinlinedialog.h"
72 void LogMsg(QString str,
bool newLine =
true);
205 void keyPressEvent(QKeyEvent *key);
211 void keyReleaseEvent(QKeyEvent *key);
217 void waitForMSec(
int msec);
224 void panalOnOff(
bool IO);
241 void setTextTempDrop(
bool);
243 void on_pushButton_Connect_clicked();
244 void on_pushButton_AskStatus_clicked();
245 void on_pushButton_SetSV_clicked();
246 void on_pushButton_GetPID_clicked();
247 void on_pushButton_Control_clicked();
248 void on_comboBox_AT_currentIndexChanged(
int index);
249 void on_comboBox_Mode_currentIndexChanged(
int index);
250 void on_comboBox_MemAddress_currentTextChanged(
const QString &arg1);
251 void on_doubleSpinBox_MVlower_valueChanged(
double arg1);
252 void on_doubleSpinBox_MVupper_valueChanged(
double arg1);
253 void on_checkBox_dataSave_toggled(
bool checked);
254 void on_pushButton_Log_toggled(
bool checked);
255 void on_pushButton_RunStop_toggled(
bool checked);
256 void on_actionOpen_File_triggered();
257 void on_action_Setting_parameters_for_TempCheck_triggered();
258 void on_action_Setting_plot_triggered();
259 void on_actionHelp_Page_triggered();
260 void on_action_JoinLINE_triggered();
261 void fillDataAndPlot(
const QDateTime date,
const double PV,
const double SV,
const double MV);
265 void setIntervalAskMV();
266 void setIntervalAskTemp();
267 void setIntervalPlot(
int interval);
270 void setIgnoreRange();
271 void setParametersTempCheckChange(
bool mute =
true);
272 void setIgnoreEnable();
273 double fillDifference(
bool mute =
true);
280 void setColor(
int colorindex = 0);
286 void sendLINE(
const QString& message);
295 QGraphicsScene *scene_{
nullptr};
296 QGraphicsView *view{
nullptr};
301 QString omronPortName{};
304 int intervalPlot_{5000};
305 bool tempControlOnOff{
false};
306 bool tempRecordOnOff{
false};
307 bool comboxEnable{
false};
308 bool spinBoxEnable{
false};
310 QDateTime dateStart_{};
312 QVector<QCPGraphData> pvData{};
313 QVector<QCPGraphData> svData{};
314 QVector<QCPGraphData> mvData{};
315 QVector<double> vtemp_{};
316 QVector<double> valltemp_{};
317 QVector<double> vdifftemp_{};
318 QTimer *clock{
nullptr};
319 QTimer *waitTimer{
nullptr};
320 QTimer *plotTimer_{
nullptr};
322 QString LINEToken_{};
324 QElapsedTimer totalElapse{};
325 bool checkDay{
false};
327 bool bkgColorChangeable_{
true};
331 void addPortName(QList<QSerialPortInfo> info);
342 void setEnabledFalse();
352 void initializeVariables();
357 void updateStatusBoxes();
365 void controlStableMode(
double targetValue,
double tempTorr,
double tempStepSize);
373 void controlFixedTimeMode(
double targetValue,
double tempTorr,
double tempStepSize);
381 void controlFixedRateMode(
double targetValue,
double tempTorr,
double tempStepSize);
389 void controlNormalAndFixedRateMode(
double targetValue,
double tempTorr,
double tempStepSize);
398 double calcRate(
double temp,
double aftertemp,
int min);
The Communication class provides an interface for communicating with he E5CC temperature controller v...
Definition: communication.h:19
Class representing summary information of data.
Definition: datasummary.h:17
The HelpDialog class displays a dialog with help information.
Definition: helpdialog.h:17
The JoinLINEGroup class displays a dialog for joining a LINE group.
Definition: joinlinedialog.h:17
The MainWindow class represents the main window of the application.
Definition: mainwindow.h:52
void updatePID_D(double PID_D)
updatePID_D Slot function to update the PID controller's derivative (D) gain value display
Definition: mainwindow.cpp:1243
void updateTemperature(double temperature)
updateTemperature Slot function to update the temperature display
Definition: mainwindow.cpp:1157
void catchLogMsg(const QString &msg)
catchLogMsg Slot function to catch a log message emitted by a thread and add it to the application lo...
Definition: mainwindow.cpp:1286
void findSeriesPortDevices()
Finds all available serial port devices.
void LogMsg(QString str, bool newLine=true)
Logs a message to the GUI log.
Definition: mainwindow.cpp:124
void updateSV(double SV)
updateSV Slot function to update the set value (SV) display
Definition: mainwindow.cpp:1181
void catchLogMsgWithColor(const QString &msg, QColor color)
catchLogMsg Slot function to catch a log message emitted by a thread and add it to the application lo...
Definition: mainwindow.cpp:1297
void makePlot()
makePlot Slot function to generate plot
Definition: mainwindow.cpp:1039
void catchStartTempChangeCheck(int checknumber)
catchStartTempChangeCheck Slot function to handle the start of a temperature change check
Definition: mainwindow.cpp:1463
void updatePID_I(double PID_I)
updatePID_I Slot function to update the PID controller's integral (I) gain value display
Definition: mainwindow.cpp:1231
void finishSendSV(double SV)
finishSendSV Slot function to handle the completion of sending the set value (SV) to the device
Definition: mainwindow.cpp:1380
void updateMVupper(double MVupper)
updateMVupper Slot function to update the upper limit of the MV display
Definition: mainwindow.cpp:1193
void updateStatus()
updateStatus Slot function to update the status display
Definition: mainwindow.cpp:1270
void catchDanger(int type)
catchDanger Slot function to handle a dangerous situation detected by the Safety class
Definition: mainwindow.cpp:1400
void connectFailed()
connectFailed Slot function to handle device connection failure
Definition: mainwindow.cpp:1335
void updatePID_P(double PID_P)
updatePID_I Slot function to update the PID controller's integral (I) gain value display
Definition: mainwindow.cpp:1219
void finishSendAT(int atFlag)
finishSendAT Slot function to handle the completion of sending AT command to device
Definition: mainwindow.cpp:1355
void updateMVlower(double MVlower)
updateMVlower Slot function to update the lower limit of MV display
Definition: mainwindow.cpp:1207
void updateCheckNumber(int checkNumber)
updateCheckNumber Slot function to update the number of temperature checks that have been performed
Definition: mainwindow.cpp:1255
void connectDevice()
connectDevice Slot function to handle device connection
Definition: mainwindow.cpp:1309
void cathcEscapeTempCheckChange(int sign)
cathcEscapeTempCheckChange Slot function to handle changes in the escape temperature check checkbox
Definition: mainwindow.cpp:1439
void updateMV(double MV)
updateMV Slot function to update the MV display (MV means output power)
Definition: mainwindow.cpp:1169
~MainWindow()
Destructor for MainWindow class.
Definition: mainwindow.cpp:105
The Notify class provides a way to send notifications to different services.
Definition: notify.h:12
The PlotDialog class.
Definition: plotdialog.h:23
The central class of the library.
Definition: qcustomplot.h:3583
The Safety class ensures the safe operation of the system. This class monitors the temperature and ot...
Definition: safety.h:22
Definition: tempdropdialog.h:22
Definition: ui_mainwindow.h:957
Header file for the DataSummary class.
Header file for the HelpDialog class.
The MainWindow class represents the main window of the application.
Definition: joindialog.h:12
The dialog to set parameters of qcustomplot.
The dialog to set parameters of TempDrop.