Servo motor#

block

Block appearance in REPEAT VISION#

 The Servo motor block describes the connection of the servo with the Arduino Nano, Uno and Mega boards.

 In the Servo motor Modes block property, one of the modes in which the servo drive can operate is selected:

  1. StepMode;

  2. ContinuousRotation;

  3. ClearPositioning;

  4. MicrosecondMode.

 The Motion delay property records the time for which the servo rotation is delayed.

 When using multiple servos in a single model, the Servo motor name property is used to specify a unique name for each servo in the model.

&emsp

  • Arduino Nano and Uno;

  • Arduino Mega;

  • Driver.

Important

The servo pin number specified in the properties is digital, Fig. 1:

Servo pin designation

Fig. 1 Servo pin designation#

Board name

Свойство где указан номер пинов подключения сервоприводов

The property where the number of servo drive connection pins is specified

Arduino Nano

Servo pin number of Arduino Nano and UNO boards

3, 5, 6, 9, 10, 11

Uno

Servo pin number of Arduino Nano and UNO boards

3, 5, 6, 9, 10, 11

Arduino Mega

Servo pin number of Arduino Mega

from 2 to 13, from 44 to 46

Note

When selecting the driver connection board (Driver), the pin number of the servo drive connection to the driver is fed as a number to the block input.

Important

When selecting the boards in the Connection board property Arduino Nano, Uno and Mega, the servo is connected directly to the physical board. In case of selecting Driver, the servo is connected to the driver module, and that in turn to the control board.

Important

The following values ​​can be supplied to the block input:

  • servo drive rotation angle in the range from 0 to 180 ̊ ;

  • servo positions in the range from 500 (0 ̊ ) to 2500 (180 ̊ ) µs.

1.  Properties#

Property

Default Value

Description

Units of measurement

Servo motor Modes/a>:
StepMode;
ContinuousRotation;
ClearPositioning;
MicrosecondMode

StepMode

-

-

Motion delay

100

Servo rotation delay time

ms

Connection board:
ArduinoNano&UNO;
ArduinoMega;
Driver

ArduinoNano&UNO

Type of control board for connecting a servo drive

-

Servo pin number of Arduino Nano and UNO boards:
3;
5;
6;
9;
10;
11, available when selecting Connection board - ArduinoNano&UNO

3

Pin numbers of the Arduino Nano and Uno boards that the servo can be connected to

-

Servo pin number of Arduino Mega, available when selecting Connection board - ArduinoMega

9

Arduino Mega pin numbers where a servo can be connected

-

Servo motor name

servo

Unique name of the servo on the model

-

2.  Inputs and outputs#

Parameters

Input/Output

Description

Units of measurement

Port type

Input

Input

-

-

Automation

Output

Output

-

-

Automation

In order to see the connection capabilities of the block, you need to go to page Description of block ports

3.  Code generation#

Important

Block supports C source code generation

See also

An example of using this block can be found in section Code generation practical guide Description of the structure of the REPEAT VISION code generator source code