if(FW_getFlag_enableFw(fwHandle) == true)
{
FW_incCounter(fwHandle);
if(FW_getCounter(fwHandle) > FW_getNumIsrTicksPerFwTick(fwHandle))
{
_iq refValue;
_iq fbackValue;
_iq output;
FW_clearCounter(fwHandle);
refValue = gMotorVars.VsRef;
fbackValue = gMotorVars.Vs;
FW_run(fwHandle, refValue, fbackValue, &output);
CTRL_setId_ref_pu(ctrlHandle, output);
gMotorVars.IdRef_A = _IQmpy(CTRL_getId_ref_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
}
}
else
{
CTRL_setId_ref_pu(ctrlHandle, _IQmpy(gMotorVars.IdRef_A, _IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)));
}
refValue = gMotorVars.VsRef;// _IQ(0.8 * USER_MAX_VS_MAG_PU), \
为什么基准 取_IQ(0.8 * USER_MAX_VS_MAG_PU) ? 感觉只有一弱磁 vs 就 = _IQ(0.8 * USER_MAX_VS_MAG_PU)
请老师能详细的讲解一下
Hardy Zhou:
我没调试过这个例程,应该说,这只是简单实现弱磁的一种演示方式,要实际使用,需要实际更改和调试
if(FW_getFlag_enableFw(fwHandle) == true)
{
FW_incCounter(fwHandle);
if(FW_getCounter(fwHandle) > FW_getNumIsrTicksPerFwTick(fwHandle))
{
_iq refValue;
_iq fbackValue;
_iq output;
FW_clearCounter(fwHandle);
refValue = gMotorVars.VsRef;
fbackValue = gMotorVars.Vs;
FW_run(fwHandle, refValue, fbackValue, &output);
CTRL_setId_ref_pu(ctrlHandle, output);
gMotorVars.IdRef_A = _IQmpy(CTRL_getId_ref_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
}
}
else
{
CTRL_setId_ref_pu(ctrlHandle, _IQmpy(gMotorVars.IdRef_A, _IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)));
}
refValue = gMotorVars.VsRef;// _IQ(0.8 * USER_MAX_VS_MAG_PU), \
为什么基准 取_IQ(0.8 * USER_MAX_VS_MAG_PU) ? 感觉只有一弱磁 vs 就 = _IQ(0.8 * USER_MAX_VS_MAG_PU)
请老师能详细的讲解一下
Evan Cheung:
你好,请问这段代码是在哪个例程里的?
if(FW_getFlag_enableFw(fwHandle) == true)
{
FW_incCounter(fwHandle);
if(FW_getCounter(fwHandle) > FW_getNumIsrTicksPerFwTick(fwHandle))
{
_iq refValue;
_iq fbackValue;
_iq output;
FW_clearCounter(fwHandle);
refValue = gMotorVars.VsRef;
fbackValue = gMotorVars.Vs;
FW_run(fwHandle, refValue, fbackValue, &output);
CTRL_setId_ref_pu(ctrlHandle, output);
gMotorVars.IdRef_A = _IQmpy(CTRL_getId_ref_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
}
}
else
{
CTRL_setId_ref_pu(ctrlHandle, _IQmpy(gMotorVars.IdRef_A, _IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)));
}
refValue = gMotorVars.VsRef;// _IQ(0.8 * USER_MAX_VS_MAG_PU), \
为什么基准 取_IQ(0.8 * USER_MAX_VS_MAG_PU) ? 感觉只有一弱磁 vs 就 = _IQ(0.8 * USER_MAX_VS_MAG_PU)
请老师能详细的讲解一下
Linda:
回复 Evan Cheung:
您好!
这个是Motorware 里的 lab 9中的程序。