mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 03:49:42 +08:00
1.在采集开始和停止前后分别将保持电流设置为0.4和0.
2.在断电后将保持电流设为0
This commit is contained in:
@ -252,6 +252,7 @@ int CMainDataGrabber::SetupMsgPipelines()
|
||||
|
||||
connect(this, &CMainDataGrabber::SignalGrabOnceFinished, this, &CMainDataGrabber::GrabOnceFinished);
|
||||
connect(m_psScheduler, &Scheduler::SignalGrabOnce, this, &CMainDataGrabber::OnTimeCounter);
|
||||
connect(m_psScheduler, &Scheduler::SignalZeroHoldCurrent, this, &CMainDataGrabber::OnZeroHoldCurrent);
|
||||
connect(this, &CMainDataGrabber::SignalStartGrab, this, &CMainDataGrabber::StartGrabTimer);
|
||||
connect(this, &CMainDataGrabber::SignalGrabOnceFinished_Signal, this, &CMainDataGrabber::GrabOnceFinished_Signal);
|
||||
connect(this, &CMainDataGrabber::SignalGrabOnceFinished_Dark, this, &CMainDataGrabber::GrabOnceFinished_Dark);
|
||||
@ -443,6 +444,15 @@ int CMainDataGrabber::GrabOnceFinished()
|
||||
m_pControlThread[i]->ClearBuffer();
|
||||
}
|
||||
|
||||
|
||||
////hold current
|
||||
bool bRes = m_ctrlLS.SetHoldCurrent(0.4f);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "SetHoldCurrent 0.4 Failed";
|
||||
}
|
||||
Delay_MSec(1000);
|
||||
////
|
||||
for (int i=0;i< m_struAcqPosSetting.iTotalPosition-1;i++)
|
||||
{
|
||||
ResetThreadStatus();
|
||||
@ -479,9 +489,15 @@ int CMainDataGrabber::GrabOnceFinished()
|
||||
{
|
||||
Delay_MSec(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////hold current
|
||||
bRes = m_ctrlLS.SetHoldCurrent(0);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "SetHoldCurrent 0 Failed";
|
||||
}
|
||||
Delay_MSec(1000);
|
||||
////
|
||||
std::vector<std::vector<DataFrame>> vecData;
|
||||
|
||||
for (ZZ_U8 i = 0; i < m_struDeviceContext.ucDeviceNumber; i++)
|
||||
@ -544,3 +560,14 @@ int CMainDataGrabber::GrabOnceFinished()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CMainDataGrabber::OnZeroHoldCurrent()
|
||||
{
|
||||
bool bRes = m_ctrlLS.SetHoldCurrent(0);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "OnZeroHoldCurrent Failed";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,7 @@ public slots:
|
||||
int InitLS();
|
||||
int StartGrabTimer();
|
||||
int OnTimeCounter();
|
||||
int OnZeroHoldCurrent();
|
||||
|
||||
int HandleThreadEvent_Signal(int iThreadID, int iFlagStatus);
|
||||
int HandleThreadEvent_Dark(int iThreadID, int iFlagStatus);
|
||||
|
@ -79,7 +79,8 @@ int Scheduler::OnTimeCounter()
|
||||
{
|
||||
m_iFlagIsOnRestart = 1;
|
||||
}
|
||||
system("gpio write 1 0");//<2F>豸<EFBFBD>ϵ<EFBFBD>
|
||||
emit SignalZeroHoldCurrent();
|
||||
system("gpio write 1 0");//<2F>豸<EFBFBD>ϵ<EFBFBD>
|
||||
qDebug() << "gpio write 1 0......"<<endl;
|
||||
qDebug() << "Non working time. Idling......";
|
||||
return 0;
|
||||
|
@ -22,6 +22,7 @@ public:
|
||||
public slots:
|
||||
int OnTimeCounter();
|
||||
signals:
|
||||
void SignalZeroHoldCurrent();
|
||||
void SignalGrabOnce();
|
||||
void SignalSelfStart();
|
||||
};
|
Reference in New Issue
Block a user