This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello!
I'm not able to access variables from park.h file.I'm using ccs4 and TMS320F28335
I have a header file park.h :
/* =================================================================================
File name: PARK.H
===================================================================================*/
#ifndef __PARK_H__
#define __PARK_H__
typedef struct {
_iq Alpha; // Input: stationary d-axis stator variable
_iq Beta; // Input: stationary q-axis stator variable
_iq Angle; // Input: rotating angle (pu)
_iq Ds; // Output: rotating d-axis stator variable
_iq Qs; // Output: rotating q-axis stator variable
_iq Sine;
_iq Cosine;
} PARK;
/*-----------------------------------------------------------------------------
Default initalizer for the PARK object.
-----------------------------------------------------------------------------*/
#define PARK_DEFAULTS { 0, \
0, \
0, \
0, \
0, \
0, \
0, \
}
/*------------------------------------------------------------------------------
PARK Transformation Macro Definition
------------------------------------------------------------------------------*/
#define PARK_MACRO(v) \
\
v.Ds = _IQmpy(v.Alpha,v.Cosine) + _IQmpy(v.Beta,v.Sine); \
v.Qs = _IQmpy(v.Beta,v.Cosine) - _IQmpy(v.Alpha,v.Sine);
#endif // __PARK_H__
what i understood from the code is - if i give alpha,beta and theta as inputs it will return me d and q variables.
Pls tell me how should i give values to alpha,beta and theta through the c file i'm working on.
i tried this:
v.Alpha=3;
v.beta=2;
v.theta=2;
but it is showing the following error:
identifier "v" is undefined v.Alpha=3; ^
Pls help me in accessing the variables in park.h file from the main.c file
regards,
Mahesh