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

📄 pidreg.h

📁 profibus dp主站于从站通信
💻 H
字号:
#if !defined(AFX_PIDREG_H__7158E7FA_5286_4B81_9187_FD8222BD663F__INCLUDED_)
#define AFX_PIDREG_H__7158E7FA_5286_4B81_9187_FD8222BD663F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PidReg.h : header file
//

#define PIDREG1_DEFAULTS {  0x0000, \
	0x00ff, \
	0x00000000, \
	0x0000, \
	0x7FFF, \
	0x0000DEAD, \
	0x2200, \
	204748344, \
	-204748644, \
	0x0000, \
	0x0000, \
	0x0000, \
	0x0000, \
 }


/////////////////////////////////////////////////////////////////////////////
// CPidReg command target

class CPidReg 
{
public:
	CPidReg();           // protected constructor used by dynamic creation
	virtual ~CPidReg();
	
// Attributes
public:

// Operations
public:
		int    pid_ff;
		int	   pid_fb;	/* Input: Feedback input (Q15) */
		int    pid_ref;	/* Input: Reference input (Q15) */
		
		int       Kp;		/* Parameter: Proportional gain (Q15) */	
		long      Kf;
		long      Ki;	/* Parameter: Integral gain (Q31) */		
		int       Kd;		/* Parameter: Derivative gain (Q15) */		
		
		long	  out_max;	/* Parameter: Maximum PID output (Q15) */
		long	  out_min;	/* Parameter: Minimum PID output (Q15) */	
		
		long	  e_k1;	/* History: Previous error at time = k-1 (Q15) */
		long	  e_k2;	/* History: Previous error at time = k-2 (Q15) */
		
		long	  out;	/* Output: PID output (Q15) */
		long     out_k1;	
		
		int      X_fb;
		int      Y_fb;
		long     e_k,K0,K1,K2;
		long     ffout;
		long     xi;
		 
		int  Remain;
		 
		
		int  PidReg(int ref,int fb,int ff);		/* Pointer to calculation function */ 



};

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

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

#endif // !defined(AFX_PIDREG_H__7158E7FA_5286_4B81_9187_FD8222BD663F__INCLUDED_)

⌨️ 快捷键说明

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