📄 motorctrol.h
字号:
#if !defined(AFX_MOTORCTROL_H__02E39EAA_E11F_4400_9A80_E637248E0F05__INCLUDED_)
#define AFX_MOTORCTROL_H__02E39EAA_E11F_4400_9A80_E637248E0F05__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MotorCtrol.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// MotorCtrol window
#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
#include "Mpc.h"
class MotorCtrol : public CStatic
{
// Construction
public:
MotorCtrol();
// Attributes
public:
BOOL m_bMotorRunflag; //电机运行标志变量
BOOL m_bMotorDebugflag; //电机调试标志变量
BOOL m_bMotorVmove; //电机运动类型,真为连续运动
BOOL m_bMotorRtype; //电机速度类型,真为快速运动方式
BOOL m_bMotorStype; //电机制动方式,真为光滑制动方式
int m_nMotorDirectTem; //电机转向暂存
int m_nMotorDirect; //电机转向
long m_lMotorPlus; //电机转动脉冲数
double m_dMotorPps; //电机转动脉冲速率
double m_dMotorSpeed; //电机转速
double m_dMotorAcc; //电机转速升速加速度
double m_dMotorDec; //电机转速降速加速度
double m_dMotorTangle; //电机转角
long m_lMotorInitRealtangle; //电机反馈脉冲计数初值
long m_lMotorRealtangle; //电机反馈脉冲数
long m_lMotorRealtanglenext; //电机反馈脉冲数
double m_dMotorRealtangle; //电机反馈脉冲数
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(MotorCtrol)
//}}AFX_VIRTUAL
// Implementation
public:
long MotorGetencoder(); //获得电机编码器数值
double MotorRealtangle(); //获取电机实际转角
void MotorReset(); //电机编码器反馈数值置零
void MotorStop(); //电机停止运行
void MotorRun(); //电机运行
int initBoard(); //初始化运动控制卡
virtual ~MotorCtrol();
// Generated message map functions
protected:
//{{AFX_MSG(MotorCtrol)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MOTORCTROL_H__02E39EAA_E11F_4400_9A80_E637248E0F05__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -