?? 水箱實驗view.h
字號:
// 水箱實驗View.h : interface of the CMyView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VIEW_H__4E20E838_7DF2_4C46_B6E4_A7F02F60325B__INCLUDED_)
#define AFX_VIEW_H__4E20E838_7DF2_4C46_B6E4_A7F02F60325B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define MVCHANGE_DATA WM_USER + 3
#define SVCHANGE_DATA WM_USER + 4
#define AUTO_MAN WM_USER + 5
class CMyView : public CFormView
{
protected: // create from serialization only
CMyView();
DECLARE_DYNCREATE(CMyView)
public:
void Displaydata(); //顯示數據函數
float pidcontrol1(float inDataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd); //PID控制算法;
float pidcontrol2(float inDataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd);
float smithcontrol1(float dataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd); //Smith控制算法
float smithcontrol2(float dataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd);
float dmccontrol1(float dataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd); //DMC預測算法
float dmccontrol2(float dataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd);
float othercontrol1(float dataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd); //預留,為其它控制算法預留
float othercontrol2(float dataOne,float SetDataOne,float inDataTwo,float SetDataTwo,double Kp,
double Ki,double Kd);
CBrush backBrush; //棒形圖初始設計
CBrush mvBrush;
CBrush svBrush;
// CButton AorM;qwew
int aorm;
int aorm2;
int m_seriesoption;
BOOL mvCapture;
BOOL svCapture;
BOOL mvOtherCapture;
BOOL svOtherCapture;
int Mv;
int Sv;
int Mv1;
int Sv1;
void SetMv(int data);
void SetMv1(int data);
void SetSv(int data);
void SetSv1(int data);
int _mv;
int _mv1;
int _sv;
int _sv1;
float getdata1;
float getdata2;
float MvData[50000]; //控制器輸出值,用于在畫面上顯示數據
float SvData[50000]; //設置值,用于在畫面上顯示數據
float PvData[50000]; //采樣測量值,用于在畫面上顯示數據
float PvGetData[50000];
float PvGetDataOther[50000];
float MvDataOther[50000]; //控制器輸出值2,用于在畫面上顯示數據
float SvDataOther[50000]; //設置值2,用于在畫面上顯示數據
float PvDataOther[50000]; //采樣測量值2,用于在畫面上顯示數據
unsigned long datanumber; //采樣數據的個數
float ec,ec1,ecOther,ec1Other; //誤差變化率
float StepU1,StepU2; //控制量變化限制
float e,e1,eOther,e1Other; //誤差
int cout;
float U1,u; //輸出值
float U1Old,U1New;
float U2Old,U2New;
float U2,uOther; //輸出值
float out,outOther; //輸出值
float PvDataValue,PvDataValueOther; //顯示棒形圖時的Pv值;
CRgn mvRgn;
CRgn mvRgnOther;
CRgn svRgn;
CRgn svRgnOther;
int start; //**程序中間變量,無須了解
BOOL clean; //**程序中間變量,無須了解
BOOL Move; //**程序中間變量,無須了解
BOOL newdisplay; //程序中間變量,無須了解
BOOL time; //程序中間變量,無須了解
BOOL StartOK;
BOOL StopOK;
int m_getsetmv1;
int m_getsetmv2;
int addy2; //調整曲線圖位置,無需了解
int m_historytimeget1;
int m_historytimeget2;
int m_delaytime1;
int m_delaytime2;
int m_mvdownlimit1;
int m_mvdownlimit2;
int m_mvuplimit1;
int m_mvuplimit2;
int m_upwarning1;
int m_upwarning2;
int m_downwarning1;
int m_downwarning2;
BOOL delaystart;
//繪圖和濾波參數:
BOOL m_hidemv1;
BOOL m_hidemv2;
BOOL m_hidepv1;
BOOL m_hidepv2;
BOOL m_hidesv1;
BOOL m_hidesv2;
BOOL m_showbkwhite1;
BOOL m_showbkwhite2;
BOOL m_filteryes1;
BOOL m_filteryes2;
float m_getfilternun1;
float m_getfilternun2;
//{{AFX_DATA(CMyView)
enum{ IDD = IDD_MY_FORM };
int m_time;
double m_pidkp1;
double m_pidkp2;
double m_pidti1;
double m_pidti2;
double m_pidtd1;
double m_pidtd2;
int m_pidcontrolget;
int m_getsetsv1;
int m_getsetsv2;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Attributes
public:
CMyDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
virtual void OnDraw(CDC* pDC);
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMyView)
afx_msg void OnTime();
afx_msg void OnOptionTime();
afx_msg void OnPid();
afx_msg void OnOptionPid();
afx_msg void OnControler();
afx_msg void OnOptionControlset();
afx_msg void OnOptionSetsv();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnLeftscrollpage();
afx_msg void OnRightscrollpage();
afx_msg void OnDestroy();
afx_msg void OnStart();
afx_msg void OnStop();
afx_msg void OnLeftscroll();
afx_msg void OnRightscroll();
afx_msg void OnAorm();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSave();
afx_msg void OnRead();
afx_msg void OnFileOpen();
afx_msg void OnFileSaveAs();
afx_msg void OnHistorydata();
afx_msg void OnOptionHistorydata();
afx_msg void OnSystemUpdownlimit();
afx_msg void OnSystemWarninglimit();
afx_msg void OnAorm2();
afx_msg void OnSystemDelaytime();
afx_msg void OnSystemDrawfilter();
afx_msg void OnOptionSeries();
afx_msg void OnIdentify();
afx_msg void OnSavetxt3();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in 水箱實驗View.cpp
inline CMyDoc* CMyView::GetDocument()
{ return (CMyDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VIEW_H__4E20E838_7DF2_4C46_B6E4_A7F02F60325B__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -