Download Print this page

Texas Instruments TMS320C2000 User Manual page 16

Motor control primer
Hide thumbs Also See for TMS320C2000:

Advertisement

Software Tools
the next line. Any character including invisible ones like "space" or "tab" after the backslash will cause
compilation error. Therefore, make sure that the backslash is the last character in the line. In terms of
code development, the macros are almost identical to C function, and the user can easily convert the
macro definitions to inline C functions. As an example, the park transformation macro definition is shown
below.
Figure 13. A Typical Module Declaration and Macro Definition
/*============================================================================
File name:
Originator: Digital Control Systems Group
Description: Header file containing constants, data type, and macro definitions
for the PARK.
============================================================================*/
#ifndef
__PARK_H__
#define
__PARK_H__
typedef struct
typedef
PARK *PARK_handle;
/*----------------------------------------------------------------------------
Default initalizer for the PARK object.
----------------------------------------------------------------------------*/
#define
PARK_DEFAULTS
/*----------------------------------------------------------------------------
PARK Transformation Macro Definition
----------------------------------------------------------------------------*/
#define
PARK_MACRO (v)
v.Ds
=
v.Qs
=
#endif
// __PARK_H__
2.4
Incremental Build Methodology
Irrespective of how much planning has gone into a system engineering project, the chances are that the
final (or complete) system will not work the first time, usually some subtle (or not) target dependency or
requirement has been overlooked. This is normal engineering, especially in the case of software
development, and if not anticipated ahead of time, can become a frustrating and time consuming disaster.
To prevent this, TI's DMC Library system software comes prepackaged within a framework, incorporating
various system build levels or debug steps as part of the normal system software flow. A customer can
move from a current build level to any other build level very quickly and without risk of losing configuration
16
TMS320C2000 Motor Control Primer
PARK.H (IQ version)
Texas Instruments
{
_iq
Alpha;
// Input: stationary d-axis stator variable
_iq
Beta;
_iq
Angle;
_iq
Ds;
_iq
Qs;
_iq
Sine;
_iq
Cosine;
}
PARK;
{
0, \
0, \
0, \
0, \
0, \
0, \
0, \
}
_IQmpy(v.Alpha,v.Cosine)
_IQmpy(v.Beta,v.Cosine)
A typical module declaration and macro definition
Copyright © 2010, Texas Instruments Incorporated
// Input: stationary q-axis stator variable
// Input: rotating angle (pu)
// Output: rotating d-axis stator variable
// Output: rotating q-axis stator variable
+
_IQmpy(v.Beta,v.Sine); \
-
_IQmpy(v.Alpha,v.Sine);
www.ti.com
\
\
SPRUGI6 – September 2010
Submit Documentation Feedback

Advertisement

loading
Need help?

Need help?

Do you have a question about the TMS320C2000 and is the answer not in the manual?

Questions and answers