Part Number: TMS320F28335 Tool/software: Code Composer Studio Dear Sir. I have work on C:\ti\ controlSUITE \development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensorless_2833x The rg1.out is sometimes crack. Why? Build Level 3 /* ================================================================================= File name: RAMPGEN.H ===================================================================================*/ #ifndef __RAMPGEN_H__ #define __RAMPGEN_H__ typedef struct { _iq Freq; // Input: Ramp frequency (pu) _iq StepAngleMax; // Parameter: Maximum step angle (pu) _iq Angle; // Variable: Step angle (pu) _iq Gain; // Input: Ramp gain (pu) _iq Out; // Output: Ramp signal (pu) _iq Offset; // Input: Ramp offset (pu) } RAMPGEN; /*------------------------------------------------------------------------------ Object Initializers ------------------------------------------------------------------------------*/ #define RAMPGEN_DEFAULTS {0, \ 0, \ 0, \ _IQ(1), \ 0, \ _IQ(1), \ } /*------------------------------------------------------------------------------ RAMP(Sawtooh) Generator Macro Definition ------------------------------------------------------------------------------*/ #define RG_MACRO(v) \ \ /* Compute the angle rate */ \ v.Angle += _IQmpy(v.StepAngleMax,v.Freq); \ \ /* Saturate the angle rate within (-1,1) */ \ if (v.Angle>_IQ(1.0)) \ v.Angle -= _IQ(1.0); \ else if (v.Angle _IQ(1.0)) \ v.Out -= _IQ(1.0); \ else if (v.Out {Freq=0.999993503,StepAngleMax=0.0200000014,Angle=0.25591433,Gain=1.0,Out=0.775910735... 0x0000C3C0@Data Freq float 0.999993503 0x0000C3C0@Data StepAngleMax float 0.0200000014 0x0000C3C2@Data Angle float 0.515355349 0x0000C3C4@Data Gain float 1.0 0x0000C3C6@Data Out float 0.775353551 0x0000C3C8@Data Offset float 1.0 0x0000C3CA@Data
↧