Reply To: Rotation Count Question

HomeForumsMonoBrick EV3 FirmwareRotation Count QuestionReply To: Rotation Count Question

#3667
Author Image
Anders Søborg
Keymaster

Hi again

I deleted some part of the discussion since I just realised that I misunderstood what it is your are trying to do.

Are excepting your program to do stop at 3600? this will never work as the sample frequency at which you are polling the tacho count is not fixed. You need to write a control loop with feedback – the easy way is to write a PID controller where your set-point is the position that you want to move to and the feedback is the tacho value. Once you have the PID controller working you need to create a profile generator to generate the profile/ramp that you want the motor “follow”. I will be back from vacation the day after tomorrow – so if you need any help to get started let me know and I can post some code to get the PID controller working.

Anders

Posted in

Make a donation