Data Sheet
FOC Testing and Troubleshooting
Advanced Digital Motor Controller User Manual 111
The amount of Flux current should be different at low and high speed, typically starting
with zero, and increasing after a given RPM threshold is reached. Below is an example of
a MicroBasic script that changes the Flux setpoint according to such a rule
top:
Speed = abs(getvalue(_S, 1)) ‘ Read motor speed from Encoders
if (Speed > 5000) ‘ check if above 5000 RPM
FluxSetpoint = (Speed – 5000) / 100 ‘ 1A per 100 RPM above 5000
else
FluxSetpoint = 0 ‘ No Flux current below 5000 RPM
end if
if (FluxSetpoint > 100) then FluxSetpoint = 100 ‘ Cap to 10.0 Amps
setcong(_TID, 1, FluxSetpoint) ‘ Apply Flux setpoint
wait(10)
goto top ‘ repeat every 10ms