⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stickslipview.h

📁 这是用Visual C++编写的步进电机驱动控制程序
💻 H
字号:
// StickSlipView.h : interface of the CStickSlipView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_STICKSLIPVIEW_H__BBE02C56_062A_42F5_A7C7_93C5614887EB__INCLUDED_)
#define AFX_STICKSLIPVIEW_H__BBE02C56_062A_42F5_A7C7_93C5614887EB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "afxtempl.h"
#include "StickSlipDoc.h"




#define WM_ANIMATE WM_USER + 100
#define DNUMBERS 7200//采样点数
#define PERIOD 2//采样间隔,perid  100ms


//#define FNUMBERS 2400//采样点数
class CInpectItem;
typedef class CTypedPtrList<CObList,CInpectItem*> InspItemList;

class CInspector;

class CCrossDisplay;


class CStickSlipView : public CFormView
{
protected: // create from serialization only
	CStickSlipView();
	DECLARE_DYNCREATE(CStickSlipView)

public:
	//{{AFX_DATA(CStickSlipView)
	enum { IDD = IDD_STICKSLIP_FORM };
	CProgressCtrl	m_runProgress;
	CStatic	m_lrun2;
	CStatic	m_lrun1;
	CStatic	m_lrun3;
	CStatic	m_rrun3;
	CStatic	m_rrun2;
	CStatic	m_rrun1;
	CComboBox	m_displace;
	CComboBox	m_rpm;
	int		m_movedir;
	//}}AFX_DATA

// Attributes
public:
	CStickSlipDoc* GetDocument();
   // double DisplaceData[DNUMBERS];//位移数据
   
	// double ForceData[FNUMBERS];//力数据
    typedef struct TIMEDATA{ 
                 double displace;//目标点位移
			     double	force;//目标点受力
			     double pointtime;
	};//
	TIMEDATA m_PointData;
	 CArray<TIMEDATA,TIMEDATA&>DataArray ;//数组,用来存放位移、力列表
     
     int Index;
    double m_time;
	
	LRESULT OnTimerMessage(WPARAM wParam,LPARAM lParam);
	
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CStickSlipView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void testlib();
	int m;
	long int FH;
	long int FL;
	long int AH;
	long int AL;
	long int f0;
	long int sy;
	long int sz;
	void ChuSH8253F();
	int basea;
	float Fvalue;
	int dbyte;
	float duquAD();
	long int yh;
	long int yl;
	long int y;
	long int duqu8253_1();
	long int xh;
	long int xl;
	long int x;
	long int duqu8253_0();
	void chushihua();
	void DestroyStop();
	BOOL Is_Stop;
	void WriteData(CString PathName);
	BOOL IsShowData;
	int  PointNum;
	void CreateDisplay();
	void InitialCtrl();
	virtual ~CStickSlipView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

private:
	//##ModelId=3D219EF4023D
	InspItemList ItemList;
	
protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CStickSlipView)
	afx_msg void OnButtonStart();
	afx_msg void OnShowGraph();
	afx_msg void OnSaveData();
	afx_msg void OnSaveImage();
	afx_msg void OnStop();
	afx_msg void OnReadData();
	afx_msg void OnMoveLdir();
	afx_msg void OnMoveRdir();
	//}}AFX_MSG
	afx_msg void OnPlayAnimate();
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in StickSlipView.cpp
inline CStickSlipDoc* CStickSlipView::GetDocument()
   { return (CStickSlipDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STICKSLIPVIEW_H__BBE02C56_062A_42F5_A7C7_93C5614887EB__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -