Hi everyone, I am working on a project for the implementation of a 3 phase inverter. So I am using some Digital Motor Control libraries to implementate SVPWM algorithm. My code consists of taking the outputs from svgen_mf module, and using them as the inputs of the pwm_drv module. The problem is that, when I watch the outputs, they don't have the expected behaviur. I don't know if it is a problem of inputs declarations or that I have to know something more about the modules. It would be helpfull if someone bring me an example about this modules implementation.
This is part of my code:
.........................
SVGENMF v1 = SVGENMF_DEFAULTS;
PWMGEN gen = PWMGEN_DEFAULTS;
gen.PeriodMax=7500;
gen.HalfPerMax=gen.PeriodMax/2;
PWM_INIT_MACRO(1,2,3,gen);
v1.Freq=50;
v1.Gain=0.5;
while(1)
{
SVGENMF_MACRO(v1);
gen.MfuncC1= v1.Ta;
gen.MfuncC2= v1.Tb;
gen.MfuncC3= v1.Tc;
PWM_MACRO (1,2,3,gen);
}
................