?? realtimectrlview.h
字號(hào):
// RealTimeCtrlView.h : interface of the CRealTimeCtrlView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_REALTIMECTRLVIEW_H__2D43C15C_FEE3_4B1B_9740_7A1B6B8E210B__INCLUDED_)
#define AFX_REALTIMECTRLVIEW_H__2D43C15C_FEE3_4B1B_9740_7A1B6B8E210B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CRealTimeCtrlView : public CFormView
{
protected: // create from serialization only
CRealTimeCtrlView();
DECLARE_DYNCREATE(CRealTimeCtrlView)
public:
//{{AFX_DATA(CRealTimeCtrlView)
enum { IDD = IDD_REALTIMECTRL_FORM };
CSliderCtrl m_SliderManual;
CEdit m_ManualStatus;
CEdit m_EditManual;
CScrollBar m_Scrollbar;
CEdit m_EditRuntime;
CEdit m_EditShowSV;
CEdit m_EditShowPV;
CEdit m_EditShowMV;
CEdit m_DateEdit;
CEdit m_TimeEdit;
float m_fK;
float m_fMH;
float m_fML;
float m_fKp;
float m_fL;
float m_fTp;
float m_fTs;
float m_fKP;
float m_fTD;
float m_fTI;
float m_fSV;
float m_fTc;
//}}AFX_DATA
// Attributes
public:
CRealTimeCtrlDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CRealTimeCtrlView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
virtual void OnDraw(CDC* pDC);
//}}AFX_VIRTUAL
// Implementation
public:
void PIDCtrlCal();
void ManualCtrl();
BOOL m_bFirstPoint;
void DrawPoint();
void ModelCal();
BOOL m_bAuto;
BOOL m_bSuspend;
CPoint m_ptPV1,m_ptMV1,m_ptSV1; //上一個(gè)點(diǎn)的坐標(biāo)
CPoint m_ptPV,m_ptMV,m_ptSV; //本次點(diǎn)的坐標(biāo)
float m_fMV[600]; //m_fMV[0]是本次,m_fMV[1]是前一次,類推
float m_fPV; //本次測(cè)量值
float m_fPV1; //上一次的測(cè)量值
float m_fd; //變?cè)鲆婵刂频拈y值
float m_fDV,m_fDV1,m_fDV2; //本次,上次,上上次的偏差
float m_fm; //不完全微分增益
float m_fU,m_fU1; //不完全微分所用的中間變量
float m_fManual; //手動(dòng)控制值
CArray<CPoint,CPoint> m_StrokePV; //PV曲線
CArray<CPoint,CPoint> m_StrokeMV; //MV曲線
CArray<CPoint,CPoint> m_StrokeSV; //SV曲線
/* CArray<float,float> m_ValuePV; //PV歷史值記錄
CArray<float,float> m_ValueMV; //MV歷史值記錄
CArray<float,float> m_ValueSV; //SV歷史值記錄*/
int m_nRuntime; //運(yùn)行時(shí)間
long m_lXAdd; //X方向增量
int m_nNowPage; //現(xiàn)在為第幾頁(yè)
int m_nNowPage2;
int m_nNowPage3;
int m_nAllPage; //共幾頁(yè)
int m_nSpeed; //仿真速度
void DrawStroke(CDC* pDC); //在OnDraw中畫(huà)三條曲線
void DrawStroke(); //畫(huà)歷史曲線
void InitalParam();
virtual ~CRealTimeCtrlView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CRealTimeCtrlView)
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnCtrlparaReset();
afx_msg void OnObjparaReset();
afx_msg void OnCtrlparaOk();
afx_msg void OnObjparaOk();
afx_msg void OnButtonAutoandmanual();
afx_msg void OnButtonRun();
afx_msg void OnButtonStop();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnButtonRestart();
afx_msg void OnMenuSpeed1();
afx_msg void OnUpdateMenuSpeed1(CCmdUI* pCmdUI);
afx_msg void OnMenuSpeed8();
afx_msg void OnUpdateMenuSpeed8(CCmdUI* pCmdUI);
afx_msg void OnMenuSpeed2();
afx_msg void OnUpdateMenuSpeed2(CCmdUI* pCmdUI);
afx_msg void OnMenuSpeed4();
afx_msg void OnUpdateMenuSpeed4(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMenuSpeed16();
afx_msg void OnUpdateMenuSpeed16(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in RealTimeCtrlView.cpp
inline CRealTimeCtrlDoc* CRealTimeCtrlView::GetDocument()
{ return (CRealTimeCtrlDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_REALTIMECTRLVIEW_H__2D43C15C_FEE3_4B1B_9740_7A1B6B8E210B__INCLUDED_)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -