dealing with duty ctr and signed spin numbers
Erik Friesen
Posts: 1,071
I have been scratching my head trying to figure out how to make duty cycle work as a charge controller.· As soon as my method hits + $8000 0000 it goes full on and my >· and < don't seem to do what I need.·
Here is the complete object
Pri charge(blo,bhi,maxamps) ma:=long[noparse][[/noparse]bhi]-long[noparse][[/noparse]blo] MAdesired <#=long[noparse][[/noparse]maxamps] 'limit to amps allowed if ma<MAdesired and pwm>-$ffff pwm+=100000 elseif ma>MAdesired pwm-=100000 if MAdesired ==0 pwm:=0 frqa:=pwm
Here is the complete object