Reply To: Motor.On: strange behaviour

HomeForumsMonoBrick EV3 FirmwareMotor.On: strange behaviourReply To: Motor.On: strange behaviour

#4344
Author Image
Henrik Kurka
Participant

One follow up question. I don’t think I understand the Steps-parameters in SpeedProfileStep and the Tacho count.

I just executed the following:


			Bakmotor.ResetTacho ();
			Bakmotor.SpeedProfileStep (50, 100, 300, 100, true, true);
			LcdConsole.WriteLine("SpeedProfileStep (1), Taco: " + Bakmotor.GetTachoCount());
			LcdConsole.WriteLine ("Ultrasonic: " + usSensor.ReadAsString ());

			Bakmotor.SpeedProfileStep (-50, 10, 30, 10, true, true);
			LcdConsole.WriteLine("SpeedProfileStep (2), Taco: " + Bakmotor.GetTachoCount());
			LcdConsole.WriteLine ("Ultrasonic: " + usSensor.ReadAsString ());

The output is something like:
peedProfileStep (1), Taco: 1
Ultrasonic: 361 cm
peedProfileStep (2), Taco: 4
Ultrasonic: 1111 cm

It seems both the GetTachoCount and the ultrasonic sensor reading are wrong. How can the tacho count be 1 after the first run and 4 after the second run backwards?

I think I need an explanation on what exactly the tach count is (is it degrees?) and what the Steps parameters are. Are they also degrees?

Also note that the output from the ultrasonic sensor seems to be different for every run.

Posted in

Make a donation