|
|
|
@ -91,6 +91,7 @@ int g_lst_quantiy; //
|
|
|
|
|
int quantity_stop_count; //产量不变的秒数
|
|
|
|
|
int g_seconds;
|
|
|
|
|
int CurOpLabel;
|
|
|
|
|
bool onrestart = false;
|
|
|
|
|
|
|
|
|
|
VOID BeforeWork(int shoot[])
|
|
|
|
|
{
|
|
|
|
@ -571,7 +572,7 @@ void Cigarette::Exit()
|
|
|
|
|
rThread->stop();
|
|
|
|
|
delete rThread;
|
|
|
|
|
#endif
|
|
|
|
|
qDebug() << "Close thread ";;
|
|
|
|
|
qDebug() << "Close thread ";
|
|
|
|
|
|
|
|
|
|
if(m_PLCDevice) {
|
|
|
|
|
m_PLCDevice->disconnect_plc();
|
|
|
|
@ -581,6 +582,8 @@ void Cigarette::Exit()
|
|
|
|
|
this->close();
|
|
|
|
|
|
|
|
|
|
Pylon::PylonTerminate();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//暂停按钮
|
|
|
|
|
void Cigarette::on_btn_pause_released()
|
|
|
|
@ -688,9 +691,8 @@ void Cigarette::OnOp()
|
|
|
|
|
//退出前执行
|
|
|
|
|
void Cigarette::OnExit()
|
|
|
|
|
{
|
|
|
|
|
//emit sengMsgToClog("Close the Application.");
|
|
|
|
|
emit sengMsgToClog("Close the Application.");
|
|
|
|
|
Exit();
|
|
|
|
|
exit(1);///
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Cigarette::OnRestart()
|
|
|
|
@ -2996,11 +2998,11 @@ bool Cigarette::ControlCamOpenOrClose(int Num,bool OpenOrClose)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Pylon::CBaslerUniversalInstantCamera* baslerCamera = BaslerCamHandle[Num];
|
|
|
|
|
if(baslerCamera && baslerCamera->IsOpen())
|
|
|
|
|
/*if(baslerCamera && baslerCamera->IsOpen())
|
|
|
|
|
{
|
|
|
|
|
baslerCamera->Close();
|
|
|
|
|
baslerCamera->GrabCameraEvents = false;
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
DeleteElement(pBaslerCaptureThread[Num]);
|
|
|
|
|
DeleteElement(pThread[Num]);
|
|
|
|
|
SingleCamInfo[Num].IsOpen = false;
|
|
|
|
@ -3643,7 +3645,9 @@ void Cigarette::recMsgFromUdp(QString data)
|
|
|
|
|
}
|
|
|
|
|
else if (data == "RESTART")
|
|
|
|
|
{
|
|
|
|
|
onrestart = true;
|
|
|
|
|
OnRestart();
|
|
|
|
|
onrestart = false;
|
|
|
|
|
}
|
|
|
|
|
else if (data == "GETSETTING")
|
|
|
|
|
{
|
|
|
|
|