Position control of BLDC motor using bultin Hall sensor by SBL1360 controller

5 years 4 months ago #29530807 by somu
I have set the closed loop count position and i set feed back as hall sensor. and i worte a program as you said but motor is not rotating at all. Plese check below script and tel me how to correct it.

setconfig(_rwd,0)
setcommand(_CB,1,0)
top:

setcommand(_P, 1, 10)


if getvalue(_CB,1) >= -10 then
goto top
else
setcommand(_GO, 1, 0)
end if

Please Log in or Create an account to join the conversation.

5 years 4 months ago #29530816 by TechSupport
Couple of things. There is a reason why your script is looking for a negative number hall count when it should be looking for a positive count when giving a positive motor command. You need to invert the pole pairs.

Second, 10 is very small, therefore you generally won't see any movement. Give it a higher number like 100. If you have doubts after running the script, perhaps add in print statements that will print back the counts for you in Console.

Please Log in or Create an account to join the conversation.

5 years 4 months ago - 5 years 3 months ago #29530849 by somu
I have change the pole pairs. Now if i give positive motor command the hall sensor counts positive.
Now in console if i give !P 1 100 command the motor is rotating and stoping.
Only problem is it works only once, if i run the command once again its not working, i have to chage close loop cout positon to open loop and again i have to set it back.
I made watch dog off and i made hall count 0 and tried but still no use.

one more thing is after i changed the pole pairs, I'm not able to run any script.
please let me know what is the reason for script not running.


Thanks in Adavance

somu

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530851 by TechSupport
Invert the pole pairs number. If the number you used is positive, then make it negative.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.092 seconds