📄 config.h
字号:
/**************** (c) 2004 STMicroelectronics ********************************
PROJECT : 3-phase AC induction motor drive Software Library
COMPILER : COSMIC / METROWERKS
MODULE : config.h
VERSION : 1.0.0
CREATION DATE : March 2004
AUTHOR : V. Onde / Microcontroller Division Applications
Consumer & Micro Group
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
DESCRIPTION : Conditional compilation keys for AC motor control library
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
MODIFICATIONS :
******************************************************************************
THE SOFTWARE INCLUDED IN THIS FILE IS FOR GUIDANCE ONLY. ST MICROELECTRONICS
SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES
WITH RESPECT TO ANY CLAIMS ARISING FROM USE OF THIS SOFTWARE.
*******************************************************************************
******************************************************************************/
//-----------------------------------------------------------------------------
// Define here the desired control type
// 0 -> Open loop
// 1 -> Closed loop
#define CONTROL 1
//-----------------------------------------------------------------------------
// Define here the chosen PWM resolution (linked to PWM switching frequency)
// 0 -> 9-bit: 1.95kHz, 3.9kHz, 7.8kHz, 15.66kHz: cf "MTCparam.h"
// 1 -> 10-bit: 12.5 kHz
#define PWM_RESOLUTION 1
//-----------------------------------------------------------------------------
// Define here the way the closed loop parameters (Kp, Ki) are set
// if this label is commented, Kp and Ki are set according to a look-up table
// defined in ACMparam.h.
//#define PI_PARAM_TUNING
//-----------------------------------------------------------------------------
// Define here if you want to use the SCI interface to monitor some internal
// variables during run time
// IMPORTANT NOTE: As communication is done by polling, this will decrease
// the sampling rate of the PI Speed controller
//#define ENABLE_RS232
//*****************************************************************************
// Do not edit this part: conditional compilation keys definition
//*****************************************************************************
#if CONTROL == 0
#define OPEN_LOOP
#if defined (PI_PARAM_TUNING)
#error "Invalid setup: No PI parameters in open loop"
#endif
#else
#define CLOSED_LOOP
#endif
#if PWM_RESOLUTION == 0
#define PWM_9BIT
#else
#define PWM_10BIT
#endif
/*** (c) 2004 STMicroelectronics ***************************** END OF FILE ***/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -