mRanger motor blocks


#1

I am looking for a detailed explanation for each of the motor blocks that should work for my mRanger. I am a beginner when it comes to understanding and working with robots. On top of that I have no knowledge about motors. I do want to learn so I need some help - I guessed that the encoder motors would be the ones verses DC or servo (but I’m not sure! ).

There are a ton of different blocks related to motors and I don’t know what they do. For example set encoder motor on board slot 1 rotate at the speed of 100 rpm. why would i use that one verses set encoder motor on board slot1 rotate at 1000 degrees at the speed of 180 rpm. Hopefully you get the idea…


#2

The differences in the blocks are relatively simple.

The first block, [run forward/backward | turn left/right] control both of the motors to move the robot in the selected direction at the speed that is specified.

The second block, [run forward/backward | turn left/right] [degrees] degrees at the speed of [speed] rpm is similar to the first block but allows the use of the motor encoder to specify how many rotations the motor axle should turn.

The set encoder motor on board [slot] rotate at the speed of [speed] rpm sets the speed of a specific motor.

The set encoder motor on board [slot] rotate [degrees] degrees at the speed of [speed] rpm is similar to the previous one but allows the use of the motor encoder to control the number of rotations fo the motor axle.

The set encoder motor on board [slot] power to [power] looks like a duplication of the set encode motor on board [slot] rotate at the speed of [speed] rpm. (@tech_support, is this correct?)

The set DC motor [Port] speed [speed] sets the motor on the selected port to the specified speed. This is likely for use with other motors besides the ones that come with the kit that are connected via an extension board.

The set stepper motor [port] speed [speed] distance [distance] is used to control a stepper motor.

There are several reporter block (long oval shaped blocks) that can read the current settings as well if you need to test how far / how fast the motor has run or is running.

Hope this helps.


#3

Hi chuckmcknight,

Very good summary explanation on these program blocks.
The set encoder motor on board [slot] power to [power] is similar to the block set encoder motor on board [slot] rotate at the speed of [speed] rpm, they still have difference. The second block with unit rpm is the real physical speed of the motor. While the previous one use the unit power which is not real physical speed, The motor may not drive when you set low value like 50 due to the motor get too low power to rotate.


#4

thank you chuck! this is a big help to someone like me who does not know anything about motors. i will try to write a few examples with the different blocks now that I know what they do and share it with my students. i might have a follow up question or two…

do you know if the mBlock developers ever considered having a help feature like Scratch - when you click on a block it gives an explanation along with a coding example?


#5

You’d have to ask @tech_support about that.

Here’s a nice, affordable reference for stepper motors, motors, servos and other things (link) that you might want to check out.


#6

Thanks for the additional explanation on the difference! :slight_smile:


#7

Hi rmisuraca,
We’ll feedback this suggestion to the corresponding department. Thanks for your sharing.
Currently you may refer to below link to know more about mblock software: http://learn.makeblock.com/en/getting-started-programming-with-mblock/
And here is Ranger program course:http://learn.makeblock.com/en/ranger-online-course/