92 lines
1.6 KiB
C
92 lines
1.6 KiB
C
|
|
|
|||
|
|
#ifndef _LINE_TRACK_H
|
|||
|
|
#define _LINE_TRACK_H
|
|||
|
|
#include <iostream>
|
|||
|
|
#include <vector>
|
|||
|
|
#include <zcus/LineDefine.h>
|
|||
|
|
#include <cda/MtrDefine.h>
|
|||
|
|
#include <common/L2Event.h>
|
|||
|
|
#include <zlib/ZoneTracking.h>
|
|||
|
|
#include <zlib/zoneDef.h>
|
|||
|
|
#include <zlib/MemTable.hpp>
|
|||
|
|
#include <sstream>
|
|||
|
|
#include <string.h>
|
|||
|
|
|
|||
|
|
|
|||
|
|
#ifdef _WIN32
|
|||
|
|
#include <io.h>
|
|||
|
|
#else
|
|||
|
|
#endif
|
|||
|
|
#include <fstream>
|
|||
|
|
|
|||
|
|
|
|||
|
|
class LineTrack
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
LineTrack();
|
|||
|
|
virtual ~LineTrack();
|
|||
|
|
|
|||
|
|
int Init(SignData *data);
|
|||
|
|
|
|||
|
|
//Strip tracing
|
|||
|
|
int Track(void);
|
|||
|
|
int SimTrack(void);
|
|||
|
|
|
|||
|
|
int CancelWeld();
|
|||
|
|
|
|||
|
|
// print plc signal
|
|||
|
|
void PrintSignal(void);
|
|||
|
|
void WeldCoil(const char* entId,const char* extId);
|
|||
|
|
void MatchColor(int color);
|
|||
|
|
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
//Initialize historical data
|
|||
|
|
int InitOLD(SignData *data);
|
|||
|
|
|
|||
|
|
//Calculate the movement of each roller within the signal interval
|
|||
|
|
void CalcOnceMove(void);
|
|||
|
|
|
|||
|
|
//Calculate the step size in the interval
|
|||
|
|
void CalcGroupStep(void);
|
|||
|
|
|
|||
|
|
//The movement of a roller within the signal interval is calculated
|
|||
|
|
float CalcLenDose(long oldENCS,long newENCS, double imp);
|
|||
|
|
float CalcLenDose(long oldENCS,long newENCS, double nDriverScale,double rollDia,double nDriveCycle);
|
|||
|
|
|
|||
|
|
// check line is run
|
|||
|
|
bool CheckIsRun();
|
|||
|
|
|
|||
|
|
|
|||
|
|
//Calculate weld on
|
|||
|
|
bool WeldOn(int wdNum);
|
|||
|
|
|
|||
|
|
// weleder finish
|
|||
|
|
bool WelderOK(void);
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
// plc signal output excel file
|
|||
|
|
void OutputExcel(void);
|
|||
|
|
|
|||
|
|
short Proxy(int eventNo, const string& proxyName,const char* keyValue,int length);
|
|||
|
|
|
|||
|
|
int CheckCoilidTail();
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
CMemTable<SignData>* mp_table;
|
|||
|
|
SignData* mp_oldsign;
|
|||
|
|
SignData* mp_newsign;
|
|||
|
|
|
|||
|
|
ZoneTracking *mp_ltrk;
|
|||
|
|
CalcData m_calcdata;
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
char msg[256];
|
|||
|
|
string m_lastExtId; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ־<C4B8><D6BE><EFBFBD>;
|
|||
|
|
int m_lastti;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif
|