We use dc motor to control the arm but when we released the button arm starts to fall. Motors have enough power but I need to change software. I tried to PID control but it didn't work. What should I try to prevent arm from falling?
Thanks.
Sun Jan 29, 2012 5:47 pm
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 494
Re: Arm Controlling Question
PID control should solve this problem. What do you mean by "it didn't work"? Could you explain your steps precisely, and perhaps post your code?
_________________ sudo rm -rf /
Sun Jan 29, 2012 6:24 pm
error
Rookie
Joined: Sun Jan 29, 2012 5:38 pm Posts: 2
Re: Arm Controlling Question
Arm fall even though the PID. nMotorPIDSpeedCtrl[arm] = mtrSpeedReg; . . . if(joy1Btn(6) == 1) { motor[arm] = 50; } else if(joy1Btn(8) == 1) { motor[arm] = -40; } else motor[arm] = 0; This code didn't work ,arm was falling slowly again. Then I tried to give 5 instead of 0 (it was a really big mistake) arm starts to raise continously and slowly which shows PID works but it can't hold the arm same position.
Users browsing this forum: No registered users and 2 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum