From 81409c3f2cf839ffa63b7dbd4637b3ea94be2c88 Mon Sep 17 00:00:00 2001 From: CJ980606 <805250096@qq.com> Date: Tue, 14 May 2024 17:25:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=86=E5=88=AB=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=9E=8B=E5=8F=B7=E5=8A=9F=E8=83=BD=EF=BC=9B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9modbus=20tcp=E4=BB=8E=E6=9C=BA=E5=AF=84=E5=AD=98?= =?UTF-8?q?=E5=99=A8=E5=86=99=E5=85=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cigarette/CaptureThreadHIK.cpp | 5 + Cigarette/Cigarette.vcxproj.user | 8 +- Cigarette/PLC/PLCDevice.cpp | 7 +- Cigarette/PLC/PLCDevice.h | 2 - Cigarette/alg_jd.cpp | 8 - Cigarette/basecamera.h | 2 +- Cigarette/camera_glue.ui | 58 +- Cigarette/cigarette.cpp | 8 + Cigarette/cigarette.ui | 5846 ++++++++++++++++-------------- Cigarette/common.h | 6 +- Cigarette/dialogsetup.cpp | 8 - Cigarette/dialogsetup.ui | 136 +- Cigarette/exportData.cpp | 10 +- Cigarette/main.cpp | 25 + Cigarette/output_statistic.ui | 62 +- Cigarette/syncworkthread.cpp | 23 +- Cigarette/threadSendTCP.cpp | 53 +- Cigarette/threadSendTCP.h | 2 - 18 files changed, 3415 insertions(+), 2854 deletions(-) diff --git a/Cigarette/CaptureThreadHIK.cpp b/Cigarette/CaptureThreadHIK.cpp index ed063d1..0790557 100644 --- a/Cigarette/CaptureThreadHIK.cpp +++ b/Cigarette/CaptureThreadHIK.cpp @@ -10,6 +10,11 @@ extern SyncQueue<_XMLExportDataInfo>* export_XMLData_Info_queue; extern PLCDevice* m_PLCDevice; extern int work_camera_nums; +#ifdef __TCPSend +extern SyncQueue<_TCPSendInfo>* TCP_Info_queue; +extern threadSendTCP tcpSendThread; +#endif + inline void LossCallBackfunction(unsigned int pData, void* pUser) { try { CaptureThreadHIK* CaptureThreadHIKptr = (CaptureThreadHIK*)pUser; diff --git a/Cigarette/Cigarette.vcxproj.user b/Cigarette/Cigarette.vcxproj.user index dc21588..81446aa 100644 --- a/Cigarette/Cigarette.vcxproj.user +++ b/Cigarette/Cigarette.vcxproj.user @@ -10,15 +10,15 @@ PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH) - 2024-04-28T07:53:26.8147850Z + 2024-05-14T07:50:55.2278815Z - 2024-04-28T07:53:26.8795721Z + 2024-05-14T07:50:55.3158777Z - 2024-04-28T07:53:26.9413622Z + 2024-05-14T07:50:55.3628774Z - 2024-04-28T07:53:26.9872078Z + 2024-05-14T07:50:55.4078779Z \ No newline at end of file diff --git a/Cigarette/PLC/PLCDevice.cpp b/Cigarette/PLC/PLCDevice.cpp index e1b2259..88fc3c0 100644 --- a/Cigarette/PLC/PLCDevice.cpp +++ b/Cigarette/PLC/PLCDevice.cpp @@ -35,14 +35,14 @@ bool PLCDevice::init_plc(PLCDevice* PLCptr) bool PLCDevice::init_plc_tcp(PLCDevice* PLCptr) { #ifdef __ModebusServer - PLCptr->g_modbus = modbus_new_tcp("192.168.1.200", 2000); + PLCptr->g_modbus = modbus_new_tcp("192.168.1.180", 2000); modbus_set_debug(PLCptr->g_modbus, 0); // 用flag设置debug调试标志位,flag=1时显示modbus消息的字节 modbus_set_response_timeout(PLCptr->g_modbus, 1, 0); // 设置响应超时 modbus_connect(PLCptr->g_modbus); modbus_set_slave(PLCptr->g_modbus, 1); // 设置从站id uint8_t data; - int ret = modbus_read_bits(PLCptr->g_modbus, 30000, 1, &data); + int ret = modbus_read_bits(PLCptr->g_modbus, 0, 1, &data); // 连接失败 if (-1 == ret) { @@ -55,9 +55,8 @@ bool PLCDevice::init_plc_tcp(PLCDevice* PLCptr) qDebug("TCP connect successful "); } #endif - #ifdef __ModebusClient - PLCptr->g_modbus = modbus_new_tcp("127.0.0.1", 502); + PLCptr->g_modbus = modbus_new_tcp("192.168.1.175", 4444); modbus_set_debug(PLCptr->g_modbus, 0); // 用flag设置debug调试标志位,flag=1时显示modbus消息的字节 modbus_set_response_timeout(PLCptr->g_modbus, 1, 0); // 设置响应超时 // 侦听主站连接 diff --git a/Cigarette/PLC/PLCDevice.h b/Cigarette/PLC/PLCDevice.h index 325d582..ccd075f 100644 --- a/Cigarette/PLC/PLCDevice.h +++ b/Cigarette/PLC/PLCDevice.h @@ -11,7 +11,6 @@ public: //[0]:1=连接,0=断开 uint8_t g_plc_status; - #ifdef __ModebusClient int m_modbusSocket; bool m_initialized; @@ -25,7 +24,6 @@ public: void recieveMessages(); std::thread *modSerThread; #endif - static bool init_plc(PLCDevice* PLCptr); static bool init_plc_tcp(PLCDevice* PLCptr); diff --git a/Cigarette/alg_jd.cpp b/Cigarette/alg_jd.cpp index 1fd8201..1495636 100644 --- a/Cigarette/alg_jd.cpp +++ b/Cigarette/alg_jd.cpp @@ -27,19 +27,11 @@ bool AlgJd::init(QString model_path, QString model_name) image_path = model_path + "/" + "alg_jd.jpg"; } else { -#ifdef __DEBUGPATH - modelWeights = "../model/jd.weights"; - classesFile = "../model/jd.names"; - // Give the configuration and weight files for the model - modelConfiguration = "../model/jd.cfg"; - image_path = "alg_jd.jpg"; -#else modelWeights = "D:/model/jd.weights"; classesFile = "D:/model/jd.names"; // Give the configuration and weight files for the model modelConfiguration = "D:/model/jd.cfg"; image_path = "D:/model/alg_jd.jpg"; -#endif } std::ifstream classNamesFile(classesFile.c_str()); diff --git a/Cigarette/basecamera.h b/Cigarette/basecamera.h index 47dc3e4..8959e04 100644 --- a/Cigarette/basecamera.h +++ b/Cigarette/basecamera.h @@ -2,7 +2,7 @@ #include -#define NumberOfSupportedCameras 3 +#define NumberOfSupportedCameras 2 //˫ #define NumberOfIdentityCameras 8 #define EdgeEvent 1 diff --git a/Cigarette/camera_glue.ui b/Cigarette/camera_glue.ui index ce30ba1..9984035 100644 --- a/Cigarette/camera_glue.ui +++ b/Cigarette/camera_glue.ui @@ -6,8 +6,8 @@ 0 0 - 878 - 226 + 319 + 270 @@ -41,7 +41,7 @@ 290 - 50 + 1810 70 30 @@ -65,7 +65,7 @@ 390 - 50 + 1810 70 30 @@ -89,7 +89,7 @@ 290 - 100 + 1860 70 30 @@ -137,7 +137,7 @@ 390 - 100 + 1860 70 30 @@ -161,7 +161,7 @@ 290 - 150 + 1910 70 30 @@ -209,7 +209,7 @@ 390 - 150 + 1910 70 30 @@ -410,7 +410,7 @@ 290 - 20 + 1780 70 20 @@ -431,7 +431,7 @@ 390 - 20 + 1780 70 20 @@ -451,7 +451,7 @@ - 550 + 50 190 285 25 @@ -470,8 +470,8 @@ - 360 - 190 + 80 + 220 141 31 @@ -492,7 +492,7 @@ 490 - 150 + 1910 70 30 @@ -516,7 +516,7 @@ 490 - 20 + 1780 70 20 @@ -537,7 +537,7 @@ 490 - 100 + 1860 70 30 @@ -561,7 +561,7 @@ 490 - 50 + 1810 70 30 @@ -585,7 +585,7 @@ 590 - 150 + 1910 70 30 @@ -609,7 +609,7 @@ 590 - 20 + 1780 70 20 @@ -630,7 +630,7 @@ 590 - 100 + 1860 70 30 @@ -654,7 +654,7 @@ 590 - 50 + 1810 70 30 @@ -678,7 +678,7 @@ 690 - 150 + 1910 70 30 @@ -702,7 +702,7 @@ 690 - 20 + 1780 70 20 @@ -723,7 +723,7 @@ 690 - 100 + 1860 70 30 @@ -747,7 +747,7 @@ 690 - 50 + 1810 70 30 @@ -771,7 +771,7 @@ 790 - 150 + 1910 70 30 @@ -795,7 +795,7 @@ 790 - 20 + 1780 70 20 @@ -816,7 +816,7 @@ 790 - 100 + 1860 70 30 @@ -840,7 +840,7 @@ 790 - 50 + 1810 70 30 diff --git a/Cigarette/cigarette.cpp b/Cigarette/cigarette.cpp index 49f807e..f7cd328 100644 --- a/Cigarette/cigarette.cpp +++ b/Cigarette/cigarette.cpp @@ -571,6 +571,8 @@ Cigarette::Cigarette(QWidget* parent) BeforeWork(g_sys_conf.shoot);//预热 int ret = m_PLCDevice->write_bit_2_plc(g_modbus_conf.work, 1); ui.label_title->setStyleSheet(tr("background-color: rgb(0, 170, 0);")); + ui.label_title_2->setStyleSheet(tr("background-color: rgb(0, 170, 0);")); + ui.label_title_2->setText(QStringLiteral("运行中")); #ifdef __UDPSend sThread.sendData("Work", g_sys_conf.FeedbackPort); #endif @@ -638,6 +640,8 @@ void Cigarette::start_work() ret = m_PLCDevice->write_bit_2_plc( g_modbus_conf.work, 1);*/ //printf("write:\t%d\n", ret); ui.label_title->setStyleSheet(tr("background-color: rgb(0, 170, 0);")); + ui.label_title_2->setStyleSheet(tr("background-color: rgb(0, 170, 0);")); + ui.label_title_2->setText(QStringLiteral("运行中")); #ifdef __UDPSend sThread.sendData("Work", g_sys_conf.FeedbackPort); #endif @@ -654,6 +658,8 @@ void Cigarette::start_work() //开始按钮 void Cigarette::on_btn_start_released() { + uint16_t data[2] = { 1111,0 }; + m_PLCTCPDevice->write_2_plc(0, 70, data);//条盒 emit sengMsgToClog("Start to work."); if (!g_admin_mode) { @@ -688,6 +694,8 @@ void Cigarette::pause_work() int ret = m_PLCDevice->write_bit_2_plc(g_modbus_conf.work, 0); //printf("write:\t%d\n", ret); ui.label_title->setStyleSheet(tr("background-color: rgb(255, 255, 0);")); + ui.label_title_2->setStyleSheet(tr("background-color: rgb(255, 255, 0);")); + ui.label_title_2->setText(QStringLiteral("未运行")); #ifdef __UDPSend sThread.sendData("NoWork", g_sys_conf.FeedbackPort); #endif diff --git a/Cigarette/cigarette.ui b/Cigarette/cigarette.ui index a495b8d..0659e17 100644 --- a/Cigarette/cigarette.ui +++ b/Cigarette/cigarette.ui @@ -17,44 +17,234 @@ background-color: rgb(55, 55, 55); - + - 380 - 10 - 411 - 41 + 484 + 65 + 0 + 0 + + + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 170 + 1380 + 160 + 110 + + + + background-color: rgb(0, 0, 0); + + + + + + + + + 484 + 230 + 0 + 0 + + + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 610 + 2065 + 90 + 20 + + + + color:white + + + 10 + + + + + + 490 + 1380 + 160 + 110 + + + + background-color: rgb(0, 0, 0); + + + + + + + + + 610 + 2095 + 90 + 20 + + + + color:white + + + 10 + + + + + + 610 + 2035 + 90 + 20 + + + + color:white + + + 10 + + + + + + 484 + 565 + 0 + 0 + + + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 515 + 2035 + 90 + 20 微软雅黑 - 24 + 10 + 75 + true - background-color: rgb(255, 255, 0); + color:white - 装封箱胶点检测系统 + 4#检测个数 - - Qt::AlignCenter + + + + + 515 + 2065 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 4#OK次数 - + - 10 - 60 - 161 - 221 + 515 + 2125 + 90 + 20 微软雅黑 - 14 + 10 75 true @@ -62,1070 +252,1262 @@ color:white + + 4#剔除次数 + + + + + + 185 + 2145 + 511 + 51 + + + + + 微软雅黑 + 10 + + + + color:white + - 操作区 + 4#相机分析结果 - + - 5 - 30 + 10 + 20 70 - 90 + 20 微软雅黑 + 10 - - border-image: url(:/Cigarette/Resources/start.png); - - - - - false + 采集速度: - + 80 - 28 - 70 - 90 + 20 + 61 + 20 微软雅黑 + 11 - - border-image: url(:/Cigarette/Resources/pause.png); - - - - - - - false - - - - - - 5 - 120 - 70 - 90 - - - - - 微软雅黑 - - - - border-image: url(:/Cigarette/Resources/unlock.png); - - - false + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 80 - 120 - 71 - 91 + 220 + 20 + 61 + 20 微软雅黑 + 11 - - border-image: url(:/Cigarette/Resources/setup.png); - - - - - - - false - - - - - - - 10 - 290 - 161 - 441 - - - - - 微软雅黑 - 14 - 75 - true - - - - color:white - - - 设备区 - - - - - 20 - 30 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam1_no.png); - - - - - - 20 - 120 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam2_no.png); - - - + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 10 - 170 - 61 - 16 + 150 + 20 + 70 + 20 微软雅黑 10 - 75 - true - - background-color: rgb(255, 255, 0); - - 联机 - - - Qt::AlignCenter + 胶点个数: - + - 10 - 190 - 61 - 16 + 290 + 20 + 70 + 20 微软雅黑 10 - 75 - true - - background-color: rgb(255, 255, 0); - - 工作 - - - Qt::AlignCenter + 识别时间: - + - 10 - 100 + 360 + 20 61 - 16 + 20 微软雅黑 - 10 - 75 - true + 11 - - background-color: rgb(255, 255, 0); - - 工作 + - Qt::AlignCenter - - - - - - 40 - 390 - 91 - 21 - - - - - 微软雅黑 - 10 - 50 - false - - - - color:white - - - 调试模式 - - - - - - 40 - 410 - 81 - 21 - - - - - 微软雅黑 - 10 - 50 - false - - - - color:white - - - 不剔除 + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 10 - 370 - 61 - 16 + 430 + 20 + 60 + 25 - 微软雅黑 - 10 + SimSun + 18 75 true - background-color: rgb(255, 255, 0); + background-color: rgb(0, 255, 0); - 工作 + OK Qt::AlignCenter - - - - 20 - 300 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam4_no.png); - - - - - - - - - 100 - 120 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam6_no.png); - - - - - - - - - 100 - 300 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam8_no.png); - - - - - - - - - 90 - 350 - 61 - 16 - - - - - 微软雅黑 - 10 - 75 - true - - - - background-color: rgb(255, 255, 0); - - - 联机 - - - Qt::AlignCenter - - - - - - 90 - 370 - 61 - 16 - - - - - 微软雅黑 - 10 - 75 - true - - - - background-color: rgb(255, 255, 0); - - - 工作 - - - Qt::AlignCenter - - - - - - 20 - 210 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam3_no.png); - - - - - - - - - 100 - 30 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam5_no.png); - - - - - - - - - 100 - 210 - 41 - 41 - - - - border-image: url(:/Cigarette/Resources/cam7_no.png); - - - - - - - - - 90 - 80 - 61 - 16 - - - - - 微软雅黑 - 10 - 75 - true - - - - background-color: rgb(255, 255, 0); - - - 联机 - - - Qt::AlignCenter - - - + + + + + 185 + 2035 + 320 + 110 + + + + background-color: rgb(0, 0, 0); + + + + + + + + + 610 + 2125 + 90 + 20 + + + + color:white + + + 10 + + + + + + 515 + 2095 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 4#NG次数 + + + + + + 484 + 400 + 0 + 0 + + + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 1175 + 1700 + 90 + 20 + + + + color:white + + + 10 + + + + + + 1175 + 1595 + 90 + 20 + + + + color:white + + + 10 + + + + + + 750 + 1700 + 320 + 110 + + + + background-color: rgb(0, 0, 0); + + + + + + + + + 1080 + 1790 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 6#剔除次数 + + + + + + 1080 + 1535 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 5#检测个数 + + + + + + 1080 + 2035 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 8#检测个数 + + + + + + 1034 + 65 + 0 + 0 + + + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 1080 + 2125 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 8#剔除次数 + + + + + + 1080 + 1870 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 7#检测个数 + + + + + + 1080 + 1760 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 6#NG次数 + + + + + + 1034 + 230 + 0 + 0 + + + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 1080 + 1595 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 5#NG次数 + + + + + + 1175 + 1930 + 90 + 20 + + + + color:white + + + 10 + + + + + + 1080 + 1900 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 7#OK次数 + + + + + + 970 + 1380 + 160 + 110 + + + + background-color: rgb(0, 0, 0); + + + + + + + + + 750 + 1815 + 510 + 50 + + + + + 微软雅黑 + 10 + + + + color:white + + + 6#相机分析结果 + + 10 - 260 - 61 - 16 - - - - - 微软雅黑 - 10 - 75 - true - - - - background-color: rgb(255, 255, 0); - - - 联机 - - - Qt::AlignCenter - - - - - - 90 - 260 - 61 - 16 - - - - - 微软雅黑 - 10 - 75 - true - - - - background-color: rgb(255, 255, 0); - - - 联机 - - - Qt::AlignCenter - - - - - - 90 - 170 - 61 - 16 + 20 + 70 + 20 微软雅黑 10 - 75 - true - - background-color: rgb(255, 255, 0); - - 联机 - - - Qt::AlignCenter + 采集速度: - + - 10 - 350 + 80 + 20 61 - 16 + 20 微软雅黑 - 10 - 75 - true + 11 - - background-color: rgb(255, 255, 0); - - 联机 + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 10 - 280 + 220 + 20 61 - 16 + 20 微软雅黑 - 10 - 75 - true + 11 - - background-color: rgb(255, 255, 0); - - 工作 + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 90 - 100 - 61 - 16 + 150 + 20 + 70 + 20 微软雅黑 - 10 - 75 - true + 10 - - background-color: rgb(255, 255, 0); - - 工作 - - - Qt::AlignCenter + 胶点个数: - + - 90 - 190 - 61 - 16 + 290 + 20 + 70 + 20 微软雅黑 10 - 75 - true - - background-color: rgb(255, 255, 0); - - 工作 - - - Qt::AlignCenter + 识别时间: - + - 90 - 280 + 360 + 20 61 - 16 + 20 微软雅黑 - 10 - 75 - true + 11 - - background-color: rgb(255, 255, 0); - - 工作 + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 10 - 80 - 61 - 16 + 430 + 20 + 60 + 25 - 微软雅黑 - 10 + SimSun + 18 75 true - background-color: rgb(255, 255, 0); + background-color: rgb(0, 255, 0); - 联机 + OK Qt::AlignCenter - + - 10 - 740 - 1264 - 53 + 1175 + 1760 + 90 + 20 + + + + color:white + + + 10 + + + + + + 750 + 2035 + 320 + 110 + + + + background-color: rgb(0, 0, 0); + + + + + + + + + 1175 + 2035 + 90 + 20 + + + + color:white + + + 10 + + + + + + 750 + 2145 + 511 + 51 微软雅黑 - 12 - 75 - true + 10 + + color:white + - + 8#相机分析结果 - + - 919 - 10 - 71 - 31 + 10 + 20 + 70 + 20 微软雅黑 - 12 - 75 - true + 10 - - color:white + + 采集速度: + + + + + + 80 + 20 + 61 + 20 + + + + + 微软雅黑 + 11 + - 无报警 + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 410 - 10 - 41 - 31 + 220 + 20 + 61 + 20 微软雅黑 - 12 - 75 - true + 11 - - color:white - - 当班 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 740 - 10 - 81 - 31 + 150 + 20 + 70 + 20 微软雅黑 - 12 - 75 - true + 10 - - color:white - - PLC正常 - - - Qt::AlignCenter + 胶点个数: - + - 450 - 5 - 171 - 41 + 290 + 20 + 70 + 20 - - color:white + + + 微软雅黑 + 10 + - - 8 + + 识别时间: - + - 880 - 5 - 41 - 41 + 360 + 20 + 61 + 20 - - border-image: url(:/Cigarette/Resources/alarm.png); + + + 微软雅黑 + 11 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + - + - 690 - 5 - 51 - 41 + 430 + 20 + 60 + 25 + + + SimSun + 18 + 75 + true + + - border-image: url(:/Cigarette/Resources/plc.png); + background-color: rgb(0, 255, 0); - + OK + + + Qt::AlignCenter - + + + + + 750 + 1980 + 510 + 50 + + + + + 微软雅黑 + 10 + + + + color:white + + + 7#相机分析结果 + + - 630 - 5 - 51 - 41 + 10 + 20 + 70 + 20 微软雅黑 - 12 + 10 - - color:white - - 换班 + 采集速度: - + - 1000 - 16 - 250 + 80 + 20 + 61 20 微软雅黑 - 12 - 75 - true + 11 - - color:white - - 运行1年10月25天9时15分 + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 10 - 10 - 101 - 31 + 220 + 20 + 61 + 20 微软雅黑 - 12 - 75 - true + 11 - - color:white - - 登陆用户: + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 110 - 10 - 71 - 31 + 150 + 20 + 70 + 20 微软雅黑 - 12 - 50 - false + 10 - - color:white - - 操作员 + 胶点个数: - + - 190 - 10 - 41 - 31 + 290 + 20 + 70 + 20 微软雅黑 - 12 - 75 - true + 10 - - color:white - - 上班 + 识别时间: - + - 230 - 5 - 171 - 41 + 360 + 20 + 61 + 20 - - color:white + + + 微软雅黑 + 11 + - - 8 + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 825 - 5 - 51 - 41 + 430 + 20 + 60 + 25 - 微软雅黑 - 12 + SimSun + 18 + 75 + true - color:white + background-color: rgb(0, 255, 0); - 复位 + OK + + + Qt::AlignCenter - + + + + 1080 + 1625 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 5#剔除次数 + + + + + + 1175 + 2095 + 90 + 20 + + + + color:white + + + 10 + + + + + + 1175 + 1625 + 90 + 20 + + + + color:white + + + 10 + + + + + + 1080 + 1960 + 90 + 20 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 7#剔除次数 + + + - 185 - 65 - 320 - 110 + 1175 + 1730 + 90 + 20 - background-color: rgb(0, 0, 0); + color:white - - + + 10 - + - 185 - 175 + 750 + 1645 510 50 @@ -1140,9 +1522,9 @@ color:white - 1#相机分析结果 + 5#相机分析结果 - + 10 @@ -1161,12 +1543,12 @@ 采集速度: - + - 70 + 80 20 - 71 + 61 20 @@ -1183,7 +1565,7 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + 220 @@ -1205,7 +1587,7 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + 150 @@ -1224,7 +1606,7 @@ 胶点个数: - + 290 @@ -1243,7 +1625,7 @@ 识别时间: - + 360 @@ -1265,7 +1647,7 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + 430 @@ -1293,155 +1675,11 @@ - - - - 610 - 95 - 90 - 20 - - - - color:white - - - 10 - - - - - - 515 - 65 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 1#检测个数 - - - - - - 515 - 95 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 1#OK次数 - - - - - - 610 - 65 - 90 - 20 - - - - color:white - - - 10 - - - - - - 610 - 125 - 90 - 20 - - - - color:white - - - 10 - - - - - - 515 - 125 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 1#NG次数 - - - - - - 515 - 155 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 1#剔除次数 - - - + - 610 - 155 + 1175 + 1960 90 20 @@ -1453,259 +1691,155 @@ 10 - - - - 484 - 65 - 0 - 0 - - - - Qt::ClickFocus - - - false - - - ... - - - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png - - - - 40 - 40 - - - - - - - 80 - 40 - 301 - 16 - - - - - 微软雅黑 - 8 - - - - color:white - - - SHANGHAI TOBACCO MACHINERY CO.,LTD - - - Qt::AlignCenter - - - - - - 90 - 7 - 271 - 31 - - - - - 微软雅黑 - 13 - - - - color:white - - - 上海烟草机械有限责任公司 - - - Qt::AlignCenter - - - + - 10 - 10 - 70 - 50 + 750 + 1535 + 320 + 110 - border-image: url(:/Cigarette/Resources/logo.png); - + background-color: rgb(0, 0, 0); - + - 830 - 10 - 210 + 1080 + 1565 + 90 20 微软雅黑 - 12 - 50 - false + 10 + 75 + true color:white - <html><head/><body><p> Tel:87907256(0532)</p></body></html> + 5#OK次数 - + - 1060 - 10 - 80 + 1080 + 1700 + 90 20 微软雅黑 - 12 - 50 - false + 10 + 75 + true color:white - 青岛维克 + 6#检测个数 - + - 830 - 35 - 210 + 1080 + 2065 + 90 20 微软雅黑 - 12 - 50 - false + 10 + 75 + true color:white - <html><head/><body><p>2020-10-10 13:15:39</p></body></html> - - - Qt::AlignCenter + 8#OK次数 - + - 10 - 1380 - 160 - 110 + 1175 + 2065 + 90 + 20 - background-color: rgb(0, 0, 0); + color:white - - + + 10 - + - 170 - 1380 - 160 - 110 + 1175 + 1565 + 90 + 20 - background-color: rgb(0, 0, 0); + color:white - - + + 10 - + - 484 - 230 - 0 - 0 + 1080 + 2095 + 90 + 20 - - Qt::ClickFocus - - - false - - - ... - - - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png - - - - 40 - 40 - - - - - - - 185 - 230 - 320 - 110 - + + + 微软雅黑 + 10 + 75 + true + - background-color: rgb(0, 0, 0); + color:white - + 8#NG次数 - + - 610 - 595 + 1175 + 1870 90 20 @@ -1717,43 +1851,51 @@ 10 - + - 490 - 1380 - 160 - 110 + 1175 + 1790 + 90 + 20 - background-color: rgb(0, 0, 0); + color:white - - + + 10 - + - 610 - 625 + 1080 + 1930 90 20 + + + 微软雅黑 + 10 + 75 + true + + color:white - - 10 + + 7#NG次数 - + - 610 - 565 + 1175 + 1535 90 20 @@ -1765,285 +1907,84 @@ 10 - - - - 484 - 565 - 0 - 0 - - - - Qt::ClickFocus - - - false - - - ... - - - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png - - - - 40 - 40 - - - - + - 515 - 565 - 90 - 20 + 650 + 1380 + 160 + 110 - - - 微软雅黑 - 10 - 75 - true - - - color:white + background-color: rgb(0, 0, 0); - 4#检测个数 + - + - 515 - 595 - 90 - 20 + 1130 + 1380 + 160 + 110 - - - 微软雅黑 - 10 - 75 - true - - - color:white + background-color: rgb(0, 0, 0); - 4#OK次数 + - + - 515 - 655 + 1175 + 1900 90 20 - - - 微软雅黑 - 10 - 75 - true - - color:white - - 4#剔除次数 + + 10 - + - 185 - 675 - 511 - 51 + 1080 + 1730 + 90 + 20 微软雅黑 10 + 75 + true color:white - - 4#相机分析结果 + + 6#OK次数 - - - - 10 - 20 - 70 - 20 - - - - - 微软雅黑 - 10 - - - - 采集速度: - - - - - - 80 - 20 - 61 - 20 - - - - - 微软雅黑 - 11 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 220 - 20 - 61 - 20 - - - - - 微软雅黑 - 11 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 150 - 20 - 70 - 20 - - - - - 微软雅黑 - 10 - - - - 胶点个数: - - - - - - 290 - 20 - 70 - 20 - - - - - 微软雅黑 - 10 - - - - 识别时间: - - - - - - 360 - 20 - 61 - 20 - - - - - 微软雅黑 - 11 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 430 - 20 - 60 - 25 - - - - - SimSun - 18 - 75 - true - - - - background-color: rgb(0, 255, 0); - - - OK - - - Qt::AlignCenter - - - + - 185 - 565 - 320 + 810 + 1380 + 160 110 @@ -2054,11 +1995,11 @@ - + - 610 - 655 + 1175 + 2125 90 20 @@ -2070,37 +2011,103 @@ 10 - + - 515 - 625 - 90 - 20 + 1034 + 565 + 0 + 0 - - - 微软雅黑 - 10 - 75 - true - + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 1034 + 400 + 0 + 0 + + + + Qt::ClickFocus + + + false + + + ... + + + + :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 750 + 1870 + 320 + 110 + - color:white + background-color: rgb(0, 0, 0); + + + + + + + + + 110 + 1790 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam7_no.png); - 4#NG次数 + - + - 515 - 320 - 90 - 20 + 100 + 1840 + 61 + 16 @@ -2112,35 +2119,38 @@ - color:white + background-color: rgb(255, 255, 0); - 2#剔除次数 + 联机 + + + Qt::AlignCenter - + - 610 - 320 - 90 - 20 + 30 + 1880 + 41 + 41 - color:white + border-image: url(:/Cigarette/Resources/cam4_no.png); - - 10 + + - + - 515 - 260 - 90 - 20 + 100 + 1660 + 61 + 16 @@ -2152,51 +2162,65 @@ - color:white + background-color: rgb(255, 255, 0); - 2#OK次数 + 联机 + + + Qt::AlignCenter - + - 610 - 260 - 90 - 20 + 100 + 1680 + 61 + 16 + + + 微软雅黑 + 10 + 75 + true + + - color:white + background-color: rgb(255, 255, 0); - - 10 + + 工作 + + + Qt::AlignCenter - + - 610 - 230 - 90 - 20 + 110 + 1700 + 41 + 41 - color:white + border-image: url(:/Cigarette/Resources/cam6_no.png); - - 10 + + - + - 515 - 230 - 90 - 20 + 20 + 1930 + 61 + 16 @@ -2208,19 +2232,22 @@ - color:white + background-color: rgb(255, 255, 0); - 2#检测个数 + 联机 + + + Qt::AlignCenter - + - 515 - 290 - 90 - 20 + 100 + 1930 + 61 + 16 @@ -2232,223 +2259,76 @@ - color:white + background-color: rgb(255, 255, 0); - 2#NG次数 - - - - - - 610 - 290 - 90 - 20 - + 联机 - - color:white - - - 10 + + Qt::AlignCenter - + - 185 - 345 - 510 - 50 + 100 + 1750 + 61 + 16 微软雅黑 10 + 75 + true - color:white - - - 2#相机分析结果 - - - - - 10 - 20 - 70 - 20 - - - - - 微软雅黑 - 10 - - - - 采集速度: - - - - - - 70 - 20 - 71 - 20 - - - - - 微软雅黑 - 11 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 220 - 20 - 61 - 20 - - - - - 微软雅黑 - 11 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 150 - 20 - 70 - 20 - - - - - 微软雅黑 - 10 - - - - 胶点个数: - - - - - - 290 - 20 - 70 - 20 - - - - - 微软雅黑 - 10 - - - - 识别时间: - - - - - - 360 - 20 - 61 - 20 - - - - - 微软雅黑 - 11 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 430 - 20 - 60 - 25 - - - - - SimSun - 18 - 75 - true - - - - background-color: rgb(0, 255, 0); - - - OK - - - Qt::AlignCenter - - + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + - + - 610 - 460 - 90 - 20 + 100 + 1770 + 61 + 16 + + + 微软雅黑 + 10 + 75 + true + + - color:white + background-color: rgb(255, 255, 0); - - 10 + + 工作 + + + Qt::AlignCenter - + - 515 - 490 - 90 - 20 + 20 + 1950 + 61 + 16 @@ -2460,19 +2340,38 @@ - color:white + background-color: rgb(255, 255, 0); - 3#剔除次数 + 工作 + + + Qt::AlignCenter - + - 515 - 400 - 90 - 20 + 110 + 1610 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam5_no.png); + + + + + + + + + 100 + 1860 + 61 + 16 @@ -2484,70 +2383,87 @@ - color:white + background-color: rgb(255, 255, 0); - 3#检测个数 + 工作 + + + Qt::AlignCenter - + - 610 - 490 - 90 - 20 + 110 + 1880 + 41 + 41 - color:white + border-image: url(:/Cigarette/Resources/cam8_no.png); - - 10 + + - + - 484 - 400 - 0 - 0 + 100 + 1950 + 61 + 16 - - Qt::ClickFocus + + + 微软雅黑 + 10 + 75 + true + - - false + + background-color: rgb(255, 255, 0); - ... + 工作 - - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + Qt::AlignCenter - - - 40 - 40 - + + + + + 620 + 1880 + 111 + 31 + + + + color:white + + + 10 - + - 185 - 510 - 510 - 50 + 510 + 1630 + 201 + 101 微软雅黑 - 10 + 12 @@ -2556,19 +2472,19 @@ 3#相机分析结果 - + 10 - 20 - 70 - 20 + 30 + 71 + 21 微软雅黑 - 10 + 11 @@ -2578,10 +2494,10 @@ - 70 - 20 - 71 - 20 + 75 + 30 + 65 + 21 @@ -2600,10 +2516,10 @@ - 220 - 20 - 61 - 20 + 80 + 70 + 60 + 21 @@ -2619,38 +2535,38 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 150 - 20 - 70 - 20 + 10 + 70 + 71 + 21 微软雅黑 - 10 + 11 胶点个数: - + - 290 - 20 - 70 - 20 + 230 + 30 + 71 + 21 微软雅黑 - 10 + 11 @@ -2660,188 +2576,60 @@ - 360 - 20 - 61 + 300 + 30 + 50 20 - - 微软雅黑 - 11 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 430 - 20 - 60 - 25 - - - - - SimSun - 18 - 75 - true - - - - background-color: rgb(0, 255, 0); - - - OK - - - Qt::AlignCenter - - - - - - - 515 - 460 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 3#NG次数 - - - - - - 185 - 400 - 320 - 110 - - - - background-color: rgb(0, 0, 0); - - - - - - - - - 515 - 430 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 3#OK次数 - + + 微软雅黑 + 11 + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 230 + 60 + 111 + 31 + + + + + SimSun + 18 + 75 + true + + + + background-color: rgb(0, 255, 0); + + + OK + + + Qt::AlignCenter + + - 610 - 430 - 90 - 20 - - - - color:white - - - 10 - - - - - - 610 - 400 - 90 - 20 - - - - color:white - - - 10 - - - - - - 330 - 1380 - 160 - 110 - - - - background-color: rgb(0, 0, 0); - - - - - - - - - 1175 - 230 - 90 - 20 - - - - color:white - - - 10 - - - - - - 1175 - 125 - 90 - 20 + 620 + 1820 + 111 + 31 @@ -2851,29 +2639,13 @@ 10 - - - - 750 - 230 - 320 - 110 - - - - background-color: rgb(0, 0, 0); - - - - - - + - 1080 - 320 - 90 - 20 + 530 + 1790 + 71 + 31 @@ -2888,16 +2660,16 @@ color:white - 6#剔除次数 + 3#总个数 - + - 1080 - 65 - 90 - 20 + 530 + 1880 + 71 + 31 @@ -2912,16 +2684,16 @@ color:white - 5#检测个数 + 3#剔除数 - + - 1080 - 565 - 90 - 20 + 530 + 1850 + 71 + 31 @@ -2936,16 +2708,16 @@ color:white - 8#检测个数 + 3#NG数 - + - 1034 - 65 - 0 - 0 + 1240 + 1500 + 20 + 20 @@ -2954,12 +2726,15 @@ false + + border-image:url(:/Cigarette/Resources/rotate.png) + ... - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + ../../../资料/烟厂软件代码/230720-郑州冷胶ZB416条盒-3相机-1280x800/Cigarette/Resources/rotate.png../../../资料/烟厂软件代码/230720-郑州冷胶ZB416条盒-3相机-1280x800/Cigarette/Resources/rotate.png @@ -2968,13 +2743,13 @@ - + - 1080 - 655 - 90 - 20 + 530 + 1820 + 71 + 31 @@ -2989,157 +2764,196 @@ color:white - 8#剔除次数 + 3#OK数 - + - 1080 - 400 - 90 - 20 + 620 + 1790 + 111 + 31 - - - 微软雅黑 - 10 - 75 - true - - color:white - - 7#检测个数 + + 10 - + - 1080 - 290 - 90 - 20 + 190 + 1500 + 191 + 121 - - - 微软雅黑 - 10 - 75 - true - + + background-color: rgb(0, 0, 0); + + + + + + + + + 620 + 1850 + 111 + 31 + color:white - - 6#NG次数 + + 10 - + - 1034 - 230 - 0 - 0 + 440 + 1500 + 231 + 121 - - Qt::ClickFocus + + background-color: rgb(0, 0, 0); - - false + + + + + + + + 0 + 1370 + 161 + 131 + + + + background-color: rgb(0, 0, 0); - ... + - - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png + + + + + 20 + 1790 + 45 + 30 + - - - 40 - 40 - + + + 微软雅黑 + 16 + 50 + false + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter - + - 1080 - 125 - 90 - 20 + 20 + 1830 + 45 + 30 微软雅黑 - 10 - 75 - true + 16 + 50 + false - color:white + background-color: rgb(255, 255, 0); - 5#NG次数 + 工作 + + + Qt::AlignCenter - + - 1175 - 460 - 90 - 20 + 20 + 1740 + 50 + 50 - color:white + border-image: url(:/Cigarette/Resources/cam3_no.png); - - 10 + + - + - 1080 - 430 - 90 - 20 + 1180 + 35 + 131 + 30 微软雅黑 - 10 - 75 - true + 12 + 50 + false + + Qt::LeftToRight + color:white - 7#OK次数 + CDTH + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + - 970 - 1380 - 160 - 110 + 730 + 85 + 531 + 481 @@ -3149,273 +2963,223 @@ - + - 750 - 345 - 510 - 50 + 480 + 625 + 81 + 31 微软雅黑 10 + 75 + true + + + + color:white + + + 1#NG次数 + + + + + + 10 + 75 + 171 + 221 + + + + + 微软雅黑 + 14 + 75 + true color:white - 6#相机分析结果 + 操作区 - + 10 - 20 - 70 - 20 + 24 + 72 + 96 微软雅黑 - 10 - - 采集速度: - - - - - - 80 - 20 - 61 - 20 - - - - - 微软雅黑 - 11 - + + border-image: url(:/Cigarette/Resources/start.png); - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + false - + - 220 - 20 - 61 - 20 + 95 + 24 + 72 + 96 微软雅黑 - 11 + + border-image: url(:/Cigarette/Resources/pause.png); + + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 150 - 20 - 70 - 20 - - - - - 微软雅黑 - 10 - - - - 胶点个数: + + false - + - 290 - 20 - 70 - 20 + 10 + 120 + 72 + 96 微软雅黑 - 10 - - 识别时间: - - - - - - 360 - 20 - 61 - 20 - - - - - 微软雅黑 - 11 - + + border-image: url(:/Cigarette/Resources/unlock.png); - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + false - + - 430 - 20 - 60 - 25 + 90 + 120 + 72 + 96 - SimSun - 18 - 75 - true + 微软雅黑 - background-color: rgb(0, 255, 0); + border-image: url(:/Cigarette/Resources/setup.png); + - OK + - - Qt::AlignCenter + + false - - - - 1175 - 290 - 90 - 20 - - - - color:white - - - 10 - - - + - 750 - 565 - 320 - 110 + 200 + 625 + 91 + 31 - - background-color: rgb(0, 0, 0); - - - - - - - - - 1175 - 565 - 90 - 20 - + + + 微软雅黑 + 10 + 75 + true + color:white - - 10 + + 1#剔除次数 - + - 750 + 732 675 - 511 - 51 + 541 + 61 微软雅黑 - 10 + 14 color:white - 8#相机分析结果 + 2#相机分析结果 - + 10 - 20 - 70 - 20 + 30 + 71 + 21 微软雅黑 - 10 + 11 采集速度: - + 80 - 20 - 61 - 20 + 30 + 71 + 21 @@ -3431,73 +3195,82 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 220 - 20 - 61 - 20 + 230 + 30 + 60 + 21 微软雅黑 11 + true - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + - 150 + 450 20 - 70 - 20 + 81 + 31 - 微软雅黑 - 10 + SimSun + 18 + 75 + true + + background-color: rgb(0, 255, 0); + - 胶点个数: + OK + + + Qt::AlignCenter - + - 290 - 20 - 70 - 20 + 300 + 30 + 71 + 21 微软雅黑 - 10 + 11 识别时间: - + - 360 - 20 - 61 - 20 + 160 + 30 + 71 + 21 @@ -3507,87 +3280,86 @@ - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + 胶点个数: - + - 430 - 20 - 60 - 25 + 370 + 30 + 50 + 20 - SimSun - 18 - 75 - true + 微软雅黑 + 11 - - background-color: rgb(0, 255, 0); - - OK + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + label_33 + label_cap_speed_2 + label_jd_no_2 + label_24 + label_25 + label_timecost_2 + label_reslut_2 - + - 750 - 510 - 510 - 50 + 190 + 675 + 540 + 61 微软雅黑 - 10 + 14 color:white - 7#相机分析结果 + 1#相机分析结果 - + 10 - 20 - 70 - 20 + 30 + 71 + 21 微软雅黑 - 10 + 11 采集速度: - + 80 - 20 - 61 - 20 + 30 + 71 + 21 @@ -3603,13 +3375,13 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 220 - 20 - 61 - 20 + 230 + 30 + 60 + 21 @@ -3622,53 +3394,53 @@ - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + - 150 - 20 - 70 - 20 + 160 + 30 + 71 + 21 微软雅黑 - 10 + 11 胶点个数: - + - 290 - 20 - 70 - 20 + 300 + 30 + 71 + 21 微软雅黑 - 10 + 11 识别时间: - + - 360 - 20 - 61 + 370 + 30 + 50 20 @@ -3685,13 +3457,13 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + - 430 + 450 20 - 60 - 25 + 81 + 31 @@ -3713,15 +3485,188 @@ - + + + + 10 + 0 + 70 + 61 + + + + border-image: url(:/Cigarette/Resources/logo.png); + + + + + + + + + + 1030 + 625 + 81 + 31 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 2#NG次数 + + + + + + 580 + 575 + 131 + 41 + + + + color:white + + + 10 + + + + + + 430 + 5 + 441 + 61 + + + + + 微软雅黑 + 24 + + + + background-color: rgb(255, 255, 0); + + + 小盒商标纸胶点检测系统 + + + Qt::AlignCenter + + + + + + 580 + 625 + 131 + 41 + + + + color:white + + + 10 + + + + + + 960 + 35 + 221 + 31 + + + + + 微软雅黑 + 12 + 50 + false + + + + color:white + + + 2020-10-10 13:15:39 + + + Qt::AlignCenter + + + - 1080 - 155 - 90 + 190 + 85 + 531 + 481 + + + + background-color: rgb(0, 0, 0); + + + + + + + + + 690 + 95 + 20 20 + + Qt::ClickFocus + + + false + + + border-image: url(:/Cigarette/Resources/rotate.png) + + + ... + + + + ../../../资料/烟厂/0-软件代码/221209-上海FX2条盒两相机 -GPU-延后一个/Cigarette/Resources/rotate.png../../../资料/烟厂/0-软件代码/221209-上海FX2条盒两相机 -GPU-延后一个/Cigarette/Resources/rotate.png + + + + 40 + 40 + + + + + + + 1030 + 575 + 81 + 31 + + 微软雅黑 @@ -3734,16 +3679,16 @@ color:white - 5#剔除次数 + 2#OK次数 - + - 1175 - 625 - 90 - 20 + 870 + 570 + 131 + 41 @@ -3753,13 +3698,13 @@ 10 - + - 1175 - 155 - 90 - 20 + 320 + 575 + 131 + 41 @@ -3769,13 +3714,37 @@ 10 - + - 1080 - 490 - 90 - 20 + 990 + 15 + 191 + 21 + + + + + 微软雅黑 + 12 + 50 + false + + + + color:white + + + Tel:87907256(0532) + + + + + + 750 + 575 + 91 + 31 @@ -3790,16 +3759,16 @@ color:white - 7#剔除次数 + 2#检测个数 - + - 1175 - 260 - 90 - 20 + 1130 + 625 + 131 + 41 @@ -3809,13 +3778,101 @@ 10 - + + + + 1180 + 15 + 81 + 21 + + + + + 微软雅黑 + 12 + 50 + false + + + + color:white + + + 青岛维克 + + + 750 - 175 - 510 - 50 + 625 + 91 + 31 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 2#剔除次数 + + + + + + 1130 + 575 + 131 + 41 + + + + color:white + + + 10 + + + + + + 200 + 580 + 91 + 31 + + + + + 微软雅黑 + 10 + 75 + true + + + + color:white + + + 1#检测个数 + + + + + + 80 + 45 + 341 + 16 @@ -3827,247 +3884,329 @@ color:white + + SHANGHAI TOBACCO MACHINERY CO.,LTD + + + Qt::AlignCenter + + + + + + 10 + 740 + 1264 + 53 + + + + + 微软雅黑 + 12 + 75 + true + + - 5#相机分析结果 + - + - 10 - 20 - 70 - 20 + 919 + 10 + 71 + 31 + + + + + 微软雅黑 + 12 + 75 + true + + + + color:white + + + 无报警 + + + Qt::AlignCenter + + + + + + 410 + 10 + 41 + 31 微软雅黑 - 10 + 12 + 75 + true + + color:white + - 采集速度: + 当班 - + - 80 - 20 - 61 - 20 + 740 + 10 + 81 + 31 微软雅黑 - 11 + 12 + 75 + true + + color:white + - + PLC正常 - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignCenter - + - 220 - 20 - 61 - 20 + 450 + 5 + 171 + 41 - - - 微软雅黑 - 11 - + + color:white + + + 8 + + + + + + 880 + 5 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/alarm.png); - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + - 150 - 20 - 70 - 20 + 690 + 5 + 51 + 41 - - - 微软雅黑 - 10 - + + border-image: url(:/Cigarette/Resources/plc.png); - 胶点个数: + - + - 290 - 20 - 70 - 20 + 630 + 5 + 51 + 41 微软雅黑 - 10 + 12 + + color:white + - 识别时间: + 换班 - + - 360 - 20 - 61 + 1000 + 16 + 250 20 微软雅黑 - 11 + 12 + 75 + true + + color:white + - + 运行1年10月25天9时15分 - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignCenter - + - 430 - 20 - 60 - 25 + 10 + 10 + 101 + 31 - SimSun - 18 + 微软雅黑 + 12 75 true - background-color: rgb(0, 255, 0); + color:white - OK + 登陆用户: Qt::AlignCenter + + + + 110 + 10 + 71 + 31 + + + + + 微软雅黑 + 12 + 50 + false + + + + color:white + + + 操作员 + + + + + + 190 + 10 + 41 + 31 + + + + + 微软雅黑 + 12 + 75 + true + + + + color:white + + + 上班 + + + + + + 230 + 5 + 171 + 41 + + + + color:white + + + 8 + + + + + + 825 + 5 + 51 + 41 + + + + + 微软雅黑 + 12 + + + + color:white + + + 复位 + + - - - - 1175 - 490 - 90 - 20 - - - - color:white - - - 10 - - - - - - 750 - 65 - 320 - 110 - - - - background-color: rgb(0, 0, 0); - - - - - - - - - 1080 - 95 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 5#OK次数 - - - - - - 1080 - 230 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 6#检测个数 - - - + - 1080 - 595 - 90 - 20 + 480 + 575 + 81 + 31 @@ -4082,110 +4221,47 @@ color:white - 8#OK次数 - - - - - - 1175 - 595 - 90 - 20 - - - - color:white - - - 10 - - - - - - 1175 - 95 - 90 - 20 - - - - color:white - - - 10 + 1#OK次数 - + - 1080 - 625 - 90 - 20 + 80 + 2 + 271 + 31 微软雅黑 - 10 - 75 - true + 13 color:white - 8#NG次数 - - - - - - 1175 - 400 - 90 - 20 - - - - color:white - - - 10 - - - - - - 1175 - 320 - 90 - 20 - - - - color:white + 上海烟草机械有限责任公司 - - 10 + + Qt::AlignCenter - + - 1080 - 460 - 90 - 20 + 10 + 315 + 171 + 421 微软雅黑 - 10 + 14 75 true @@ -4193,65 +4269,672 @@ color:white - - 7#NG次数 - - - - - - 1175 - 65 - 90 - 20 - - - - color:white - - - 10 - - - - - - 650 - 1380 - 160 - 110 - - - - background-color: rgb(0, 0, 0); - - - - - - - - - 1130 - 1380 - 160 - 110 - - - - background-color: rgb(0, 0, 0); - - - + + 设备区 + + + + 10 + 30 + 71 + 71 + + + + border-image: url(:/Cigarette/Resources/cam1_no.png); + + + + + + + + + 95 + 30 + 71 + 71 + + + + border-image: url(:/Cigarette/Resources/cam2_no.png); + + + + + + + + + 95 + 120 + 71 + 31 + + + + + 微软雅黑 + 18 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 95 + 155 + 71 + 31 + + + + + 微软雅黑 + 18 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 10 + 155 + 71 + 31 + + + + + 微软雅黑 + 18 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 10 + 320 + 91 + 21 + + + + + 微软雅黑 + 12 + 75 + true + + + + color:white + + + 调试模式 + + + + + + 10 + 340 + 81 + 21 + + + + + 微软雅黑 + 12 + 75 + true + + + + color:white + + + 不剔除 + + + + + + 10 + 1560 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 20 + 1490 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam4_no.png); + + + + + + + + + 100 + 1310 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam6_no.png); + + + + + + + + + 100 + 1490 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam8_no.png); + + + + + + + + + 90 + 1540 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 90 + 1560 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 20 + 1400 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam3_no.png); + + + + + + + + + 100 + 1220 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam5_no.png); + + + + + + + + + 100 + 1400 + 41 + 41 + + + + border-image: url(:/Cigarette/Resources/cam7_no.png); + + + + + + + + + 90 + 1270 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 10 + 1450 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 90 + 1450 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 90 + 1360 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 10 + 1540 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 10 + 1470 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 90 + 1290 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 90 + 1380 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 90 + 1470 + 61 + 16 + + + + + 微软雅黑 + 10 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 工作 + + + Qt::AlignCenter + + + + + + 10 + 120 + 71 + 31 + + + + + 微软雅黑 + 18 + 75 + true + + + + background-color: rgb(255, 255, 0); + + + 联机 + + + Qt::AlignCenter + + + + + + 10 + 200 + 151 + 111 + + + + + 微软雅黑 + 30 + + + + background-color: rgb(255, 255, 0); + + + 运行中 + + + Qt::AlignCenter + + + + + + 10 + 370 + 91 + 41 + + + + + 微软雅黑 + 12 + + + + color:white + + + 切换窗口 + + - + - 1175 - 430 - 90 - 20 + 320 + 625 + 131 + 41 @@ -4261,53 +4944,13 @@ 10 - - - - 1080 - 260 - 90 - 20 - - - - - 微软雅黑 - 10 - 75 - true - - - - color:white - - - 6#OK次数 - - - - - - 810 - 1380 - 160 - 110 - - - - background-color: rgb(0, 0, 0); - - - - - - + - 1175 - 655 - 90 - 20 + 870 + 625 + 131 + 41 @@ -4317,149 +4960,9 @@ 10 - - - - 1034 - 565 - 0 - 0 - - - - Qt::ClickFocus - - - false - - - ... - - - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png - - - - 40 - 40 - - - - - - - 1034 - 400 - 0 - 0 - - - - Qt::ClickFocus - - - false - - - ... - - - - :/Cigarette/Resources/rotate.png:/Cigarette/Resources/rotate.png - - - - 40 - 40 - - - - - - - 750 - 400 - 320 - 110 - - - - background-color: rgb(0, 0, 0); - - - - - - - - - 1060 - 35 - 161 - 20 - - - - - 微软雅黑 - 12 - 50 - false - - - - color:white - - - CDTH - - - - - - 1180 - 10 - 81 - 41 - - - - - 微软雅黑 - 12 - - - - color:white - - - 切换 - - + rotate_9 rotate_1 - groupBox_status - label_title - groupBox_op - groupBox_dev - image_label_11 - groupBox_a_1 - lcdNumber_ok_1 - label_check_1 - label_ok_1 - lcdNumber_total_1 - lcdNumber_ng_1 - label_ng_1 - label_kick_1 - lcdNumber_kick_1 - label_title_7 - label_title_6 - toolButton_4 - label_17 - label_18 - label_cur_time rotate_2 - image_label_21 lcdNumber_ok_4 lcdNumber_ng_4 lcdNumber_total_4 @@ -4471,25 +4974,6 @@ image_label_41 lcdNumber_kick_4 label_ng_4 - label_kick_2 - lcdNumber_kick_2 - label_ok_2 - lcdNumber_ok_2 - lcdNumber_total_2 - label_check_2 - label_ng_2 - lcdNumber_ng_2 - groupBox_a_2 - lcdNumber_ng_3 - label_kick_3 - label_check_3 - lcdNumber_kick_3 - groupBox_a_3 - label_ng_3 - image_label_31 - label_ok_3 - lcdNumber_ok_3 - lcdNumber_total_3 rotate_3 lcdNumber_total_6 lcdNumber_ng_5 @@ -4536,15 +5020,73 @@ rotate_7 image_label_71 image_label_22 - image_label_32 image_label_42 image_label_52 image_label_62 image_label_72 image_label_82 + toolButton_cam_7 + cam_status_7 + toolButton_cam_4 + cam_status_5 + cam_work_5 + toolButton_cam_6 + cam_status_4 + cam_status_8 + cam_status_6 + cam_work_6 + cam_work_4 + toolButton_cam_5 + cam_work_7 + toolButton_cam_8 + cam_work_8 + lcdNumber_kick_3 + groupBox_11 + lcdNumber_ok_3 + label_7 + label_9 + label_ng_3 + rotate_11 + label_3 + lcdNumber_total_3 + image_label_31 + lcdNumber_ng_3 + image_label_32 image_label_12 + cam_status_3 + cam_work_3 + toolButton_cam_3 location - pushButton_wintab + image_label_21 + label_ng_1 + groupBox_op + label_4 + groupBox_b + groupBox_a + toolButton_4 + label_ng_2 + lcdNumber_ok_1 + label_title + lcdNumber_ng_1 + label_cur_time + image_label_11 + label_10 + lcdNumber_total_2 + lcdNumber_total_1 + label_17 + label_6 + lcdNumber_ng_2 + label_18 + label_11 + lcdNumber_ok_2 + label + label_title_7 + groupBox_status + label_2 + label_title_6 + groupBox_dev + lcdNumber_kick_1 + lcdNumber_kick_2 diff --git a/Cigarette/common.h b/Cigarette/common.h index d785133..ab65070 100644 --- a/Cigarette/common.h +++ b/Cigarette/common.h @@ -37,6 +37,8 @@ #define Queue_Size 15 #define Unit_Queue_Size Queue_Size*3 #define StrobeLineTime 10000 +//设备型号 +#define EquipmentModel "条盒" #ifdef __DEBUG #define DEBUG(format, ...) printf (format, ##__VA_ARGS__) @@ -48,8 +50,8 @@ #define DEFAULT_CONFPATH_PATH "D:/conf" #define DEFAULT_PIC_SAVE_PATH "D:/image" // 主界面基本参数配置文件 -//#define CONFPATH "D:/Release/conf_path2.txt"//小盒 -#define CONFPATH "D:/Release/conf_path3.txt"//条盒 +#define CONFPATH "D:/Release/conf_path2.txt"//小盒 +//#define CONFPATH "D:/Release/conf_path3.txt"//条盒 // 相机旋转角度配置文件 #define ROTATE_FILE "rotate.txt" #define MODBUS_CONFIGURE_FILE "modbus.txt" diff --git a/Cigarette/dialogsetup.cpp b/Cigarette/dialogsetup.cpp index 3f5a7f8..628747a 100644 --- a/Cigarette/dialogsetup.cpp +++ b/Cigarette/dialogsetup.cpp @@ -472,11 +472,7 @@ void DialogSetup::on_toolButton_choose_path_jpg_released() { void DialogSetup::write_pswd() { std::fstream cfg_file; -#ifdef __DEBUGPATH - cfg_file.open("pswd.txt", std::ios::out | std::ios::trunc); -#else cfg_file.open("D:/Release/pswd.txt", std::ios::out | std::ios::trunc); -#endif if (cfg_file.good()) { char buf[256]; @@ -489,11 +485,7 @@ void DialogSetup::write_pswd() void DialogSetup::write_pswd_op() { std::fstream cfg_file; -#ifdef __DEBUGPATH - cfg_file.open("pswd_op.txt", std::ios::out | std::ios::trunc); -#else cfg_file.open("D:/Release/pswd_op.txt", std::ios::out | std::ios::trunc); -#endif if (cfg_file.good()) { char buf[256]; diff --git a/Cigarette/dialogsetup.ui b/Cigarette/dialogsetup.ui index 428eb61..1818a31 100644 --- a/Cigarette/dialogsetup.ui +++ b/Cigarette/dialogsetup.ui @@ -6,8 +6,8 @@ 0 0 - 682 - 900 + 663 + 750 @@ -29,8 +29,8 @@ 0 0 - 683 - 900 + 851 + 1121 @@ -38,8 +38,8 @@ 0 0 - 681 - 901 + 781 + 1011 @@ -61,9 +61,9 @@ 0 - -122 - 670 - 1000 + 0 + 779 + 1009 @@ -145,7 +145,7 @@ 10 - 610 + 450 641 81 @@ -206,7 +206,7 @@ - 440 + 445 32 91 31 @@ -324,7 +324,7 @@ 10 180 640 - 278 + 111 @@ -510,7 +510,7 @@ 210 - 100 + 1780 90 20 @@ -531,7 +531,7 @@ 20 - 130 + 1810 180 20 @@ -552,7 +552,7 @@ 210 - 130 + 1810 90 20 @@ -573,7 +573,7 @@ 20 - 100 + 1780 180 20 @@ -594,7 +594,7 @@ 510 - 130 + 1810 90 20 @@ -615,7 +615,7 @@ 320 - 100 + 1780 180 20 @@ -636,7 +636,7 @@ 320 - 130 + 1810 180 20 @@ -657,7 +657,7 @@ 510 - 100 + 1780 90 20 @@ -699,7 +699,7 @@ 20 - 160 + 1840 180 20 @@ -720,7 +720,7 @@ 20 - 190 + 1870 180 20 @@ -741,7 +741,7 @@ 20 - 220 + 1900 180 20 @@ -762,7 +762,7 @@ 210 - 160 + 1840 90 20 @@ -783,7 +783,7 @@ 210 - 190 + 1870 90 20 @@ -804,7 +804,7 @@ 210 - 220 + 1900 90 20 @@ -825,7 +825,7 @@ 320 - 160 + 1840 180 20 @@ -846,7 +846,7 @@ 320 - 190 + 1870 180 20 @@ -867,7 +867,7 @@ 320 - 220 + 1900 180 20 @@ -888,7 +888,7 @@ 510 - 160 + 1840 90 20 @@ -909,7 +909,7 @@ 510 - 190 + 1870 90 20 @@ -930,7 +930,7 @@ 510 - 220 + 1900 90 20 @@ -951,7 +951,7 @@ 20 - 250 + 1930 180 20 @@ -972,7 +972,7 @@ 210 - 250 + 1930 90 20 @@ -993,7 +993,7 @@ 320 - 250 + 1930 180 20 @@ -1014,7 +1014,7 @@ 510 - 250 + 1930 90 20 @@ -1036,9 +1036,9 @@ 10 - 770 + 610 641 - 148 + 61 @@ -1140,7 +1140,7 @@ 510 - 60 + 1040 90 20 @@ -1161,7 +1161,7 @@ 20 - 60 + 1040 180 20 @@ -1182,7 +1182,7 @@ 210 - 60 + 1040 90 20 @@ -1203,7 +1203,7 @@ 320 - 60 + 1040 180 20 @@ -1245,7 +1245,7 @@ 20 - 90 + 1070 180 20 @@ -1266,7 +1266,7 @@ 320 - 90 + 1070 180 20 @@ -1287,7 +1287,7 @@ 20 - 120 + 1100 180 20 @@ -1308,7 +1308,7 @@ 320 - 120 + 1100 180 20 @@ -1329,7 +1329,7 @@ 210 - 90 + 1070 90 20 @@ -1350,7 +1350,7 @@ 210 - 120 + 1100 90 20 @@ -1371,7 +1371,7 @@ 510 - 90 + 1070 90 20 @@ -1392,7 +1392,7 @@ 510 - 120 + 1100 90 20 @@ -1519,7 +1519,7 @@ 110 - 930 + 690 131 51 @@ -1561,7 +1561,7 @@ 10 - 690 + 530 641 81 @@ -1601,7 +1601,7 @@ - 440 + 445 32 91 31 @@ -1738,7 +1738,7 @@ 370 - 930 + 690 131 51 @@ -1825,7 +1825,7 @@ 40 - 460 + 300 101 41 @@ -1846,7 +1846,7 @@ 40 - 560 + 400 101 41 @@ -1867,7 +1867,7 @@ 40 - 510 + 350 101 41 @@ -1888,7 +1888,7 @@ 620 - 470 + 1380 27 25 @@ -1906,7 +1906,7 @@ 190 - 470 + 1380 171 30 @@ -1930,7 +1930,7 @@ 370 - 470 + 1380 241 30 @@ -2020,7 +2020,7 @@ 520 - 930 + 690 131 21 @@ -2040,7 +2040,7 @@ 520 - 960 + 720 131 21 @@ -2060,7 +2060,7 @@ 190 - 520 + 330 171 30 @@ -2084,7 +2084,7 @@ 370 - 520 + 330 241 30 @@ -2100,7 +2100,7 @@ 620 - 520 + 330 27 25 @@ -2118,7 +2118,7 @@ 190 - 570 + 390 171 30 @@ -2142,7 +2142,7 @@ 370 - 570 + 390 241 30 @@ -2158,7 +2158,7 @@ 620 - 570 + 390 27 25 diff --git a/Cigarette/exportData.cpp b/Cigarette/exportData.cpp index c87ba78..578c853 100644 --- a/Cigarette/exportData.cpp +++ b/Cigarette/exportData.cpp @@ -346,10 +346,14 @@ void ExportDataThread::run() QStringList argsOk; //条盒TJ 小盒BJ - zipFilePaths.append(g_conf_path.save_pics_path + "/" + "416_TJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_0.zip"); - zipFilePaths.append(g_conf_path.save_pics_path + "/" + "416_TJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_1.zip"); + /*zipFilePaths.append(g_conf_path.save_pics_path + "/" + "416_BJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_0.zip"); + zipFilePaths.append(g_conf_path.save_pics_path + "/" + "416_BJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_1.zip"); fileList.append(g_conf_path.save_pics_path + "/" + zipTimeStamp[0] + "ng.txt"); - fileList.append(g_conf_path.save_pics_path + "/" + zipTimeStamp[0] + "ok.txt"); + fileList.append(g_conf_path.save_pics_path + "/" + zipTimeStamp[0] + "ok.txt");*/ + zipFilePaths.append("416_BJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_0.zip"); + zipFilePaths.append("416_BJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_1.zip"); + fileList.append(zipTimeStamp[0] + "ng.txt"); + fileList.append(zipTimeStamp[0] + "ok.txt"); zipTimeStamp.clear(); diff --git a/Cigarette/main.cpp b/Cigarette/main.cpp index 6956ef6..fa54648 100644 --- a/Cigarette/main.cpp +++ b/Cigarette/main.cpp @@ -18,6 +18,7 @@ int main(int argc, char* argv[]) exit(0); } #endif + qRegisterMetaType("cv::Mat"); QApplication a(argc, argv); #ifdef __DEBUGPATH @@ -25,6 +26,30 @@ int main(int argc, char* argv[]) #else QPixmap pixmap("D:/Release/splash.jpg"); #endif +#if defined EquipmentModel + //Ƚ豸ͺű־ļ----------------------------------------------------------------------------- + string ider; + string name = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5/include/thrust/async/flag.txt";//豸ͺű־ļ + std::ifstream file_(name.c_str()); + if (file_.good()) + { + getline(file_, ider); + file_.close(); + } + else + { + ider = "Default"; + } + cout << "豸ͺţ" << ider << endl; + if (ider != EquipmentModel) + { + QMessageBox::information(NULL, QStringLiteral("ϵͳԼʧ"), QStringLiteral("豸ͺƥʧ"), QMessageBox::Ok); + exit(0); + } + //Ƚ豸ͺű־ļ----------------------------------------------------------------------------- +#endif + + QSplashScreen splash(pixmap); splash.show(); a.processEvents(); diff --git a/Cigarette/output_statistic.ui b/Cigarette/output_statistic.ui index 5e6a323..e2efce9 100644 --- a/Cigarette/output_statistic.ui +++ b/Cigarette/output_statistic.ui @@ -31,7 +31,7 @@ - 3 + 1 @@ -53,66 +53,6 @@ - - - Camera3 - - - - - - - - - - Camera4 - - - - - - - - - - Camera5 - - - - - - - - - - Camera6 - - - - - - - - - - Camera7 - - - - - - - - - - Camera8 - - - - - - - diff --git a/Cigarette/syncworkthread.cpp b/Cigarette/syncworkthread.cpp index 9960efb..f6eabdb 100644 --- a/Cigarette/syncworkthread.cpp +++ b/Cigarette/syncworkthread.cpp @@ -68,6 +68,15 @@ void SyncWorkThread::run() uint32_t result_index[NumberOfSupportedCameras] = { 0 }; while (!b_quit) { QDateTime now_ts = QDateTime::currentDateTime(); +//#ifdef __TCPSend +// _TCPSendInfo TCPSendInfo; +//#ifdef __TCPSend +// QString sendName = "416_BJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz"); +// TCPSendInfo.pics_name = sendName.toLocal8Bit().constData(); +// TCP_Info_queue->put(TCPSendInfo); +//#endif +//#endif + std::vector> element_vec; local_g_image_sync_queue->take(element_vec); bool IsNGForAll = false; @@ -114,6 +123,12 @@ void SyncWorkThread::run() #ifdef __TCPSend _TCPSendInfo TCPSendInfo; #endif +//#ifdef __TCPSend +// QString sendName = "416_BJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz"); +// TCPSendInfo.pics_name = sendName.toLocal8Bit().constData(); +// TCP_Info_queue->put(TCPSendInfo); + +//#endif if (!image.data) { continue; //图像为空,跳过 @@ -172,6 +187,8 @@ void SyncWorkThread::run() #ifdef SYNC_CAMERA emit display_jd_no(local_camera_number, jd_no); #endif + + #ifdef __UDPSend UDPSendInfo.JD = jd_no; #endif @@ -339,11 +356,11 @@ void SyncWorkThread::run() } //条盒TJ 小盒BJ file_name = g_conf_path.save_pics_path + "/" - + now_ts.toString("yyyy-MM-dd") + "/"+"416_TJ_01_" + + now_ts.toString("yyyy-MM-dd") + "/"+"416_BJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz_") + ng_reason_maps[ngReason] + ".jpg"; g_save_queue->put(std::make_pair(file_name.toLocal8Bit().constData(), merge_image)); #ifdef __TCPSend - QString sendName = "416_TJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz_") + ng_reason_maps[ngReason]; + QString sendName = "416_BJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz"); TCPSendInfo.pics_name = sendName.toLocal8Bit().constData(); TCP_Info_queue->put(TCPSendInfo); #endif @@ -362,7 +379,7 @@ void SyncWorkThread::run() emit event_ng(local_camera_number); else if (local_SysConf.MisMatchAct == 0)//as ok emit event_ok(local_camera_number); - //emit display_check_total(local_camera_number, ++(frame_total[local_camera_number])); + emit display_check_total(local_camera_number, ++(frame_total[local_camera_number])); qDebug() << local_camera_number << "#camera# " << now_ts.toString("yyyy-MM-dd_HH-mm-ss_zzz_") << "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " << unit_count; } #endif diff --git a/Cigarette/threadSendTCP.cpp b/Cigarette/threadSendTCP.cpp index 42f323f..e68facb 100644 --- a/Cigarette/threadSendTCP.cpp +++ b/Cigarette/threadSendTCP.cpp @@ -7,7 +7,7 @@ #pragma comment(lib, "ws2_32.lib") extern PLCDevice* m_PLCTCPDevice; - +extern PLCDevice* m_PLCDevice; void threadSendTCP::init(SyncQueue<_TCPSendInfo>* p_TCP_Info_queue, std::string ip_, int port_) { ip = QString::fromStdString(ip_); port = port_; @@ -64,6 +64,7 @@ bool threadSendTCP::connectTCP() { void threadSendTCP::run() { + #ifdef __TCPClient if (!connectTCP()) { @@ -74,6 +75,7 @@ void threadSendTCP::run() _TCPSendInfo TCPSendInfo; Local_TCP_Info_queue->take(TCPSendInfo); num++; + sendData(&TCPSendInfo, num); #ifdef __TCPServer if (ClientStatus == QAbstractSocket::ConnectedState) { @@ -83,6 +85,9 @@ void threadSendTCP::run() #ifdef __TCPClient sendData(&TCPSendInfo, num); #endif + //mySocket->write("Hello! here is tcp client!\n"); + //mySocket->flush(); + } } @@ -100,12 +105,43 @@ void threadSendTCP::sendData(_TCPSendInfo* TCPSendInfo, int Num) { #if defined(__ModebusServer) || defined(__ModebusClient) std::vector asciiVals = stringToAscii(fileName); + //mySocket->write(fileName.c_str()); + int temp = num % 2; + if (temp == 1) + { + m_PLCDevice->write_bit_2_plc(10006, 1); + + } + else + { + m_PLCDevice->write_bit_2_plc(10006, 0); + } + + //mySocket->write((char*)&temp,sizeof(char)); + //mySocket->write("\n"); + //mySocket->flush(); + // //遍历发送 - int val_[35] = {}; + int val_[32] = {}; + uint8_t high[17] = {}; + uint8_t low[17] = {}; + uint16_t val[17] = {}; + int h = 0; + int l = 0; for (int i = 0; i < asciiVals.size(); i++) { - val_[i] = asciiVals[i]; + if (i % 2 == 0) + { + high[h] = asciiVals[i]; + h++; + } + else + { + low[l] = asciiVals[i]; + l++; + } } + #endif #ifdef __ModebusServer @@ -114,17 +150,18 @@ void threadSendTCP::sendData(_TCPSendInfo* TCPSendInfo, int Num) { #endif #ifdef __ModebusClient - for(int i = 0;imapping->tab_registers[i] = val_[i]; - m_PLCTCPDevice->mapping->tab_input_registers[i] = val_[i]; + val[i]= (static_cast(high[i]) << 8) | low[i];//组合高低字节 + m_PLCTCPDevice->mapping->tab_registers[i] = val[i]; } + #endif QDateTime ts_end = QDateTime::currentDateTime(); int time_process = ts_start.msecsTo(ts_end); qDebug() << "end-now_ts=" << time_process; } - //字符串转ASCII std::vector threadSendTCP::stringToAscii(const std::string& str) { @@ -141,10 +178,12 @@ void threadSendTCP::onNewConnection() mySocket = tcpServer->nextPendingConnection(); //创建socket qDebug() << "NewConnectionConnected"; ClientStatus = QAbstractSocket::ConnectedState; + } void threadSendTCP::onClientConnected() { + qDebug() << "ClientConnected"; } diff --git a/Cigarette/threadSendTCP.h b/Cigarette/threadSendTCP.h index e00dd90..0672373 100644 --- a/Cigarette/threadSendTCP.h +++ b/Cigarette/threadSendTCP.h @@ -56,14 +56,12 @@ public: void start_work(); void sendData(_TCPSendInfo* TCPSendInfo, int Num); std::vector stringToAscii(const std::string& str); - #ifdef __TCPServer private slots: void onNewConnection(); void onClientConnected(); void onClientDisconnected(); #endif - public: SyncQueue<_TCPSendInfo>* Local_TCP_Info_queue; std::atomic_bool isLoop = { 0 };