Projekt

Splošno

Profil

Protocol » Zgodovina » Verzija 5

Verzija 4 (Aleksandar Todorovic, 03.03.2013 19:13) → Verzija 5/10 (Aleksandar Todorovic, 03.03.2013 19:14)

h1. Protocol

h2. MOVE

<pre>
MOVE
<motor [LEFT|RIGHT|BOTH] default:BOTH> <direction [FORWARD|BACKWARD]> <unsigned int amount> <unit [MM|CM|M|STEPS] defaults:STEPS>
</pre>



h3. description:

Moves the selected motor in the desired direction by a desired amount.

h3 .example:

MOVE LEFT FORWARD 100
Moves the left motor for 100 steps.
MOVE RIGHT FORWARD 15 CM
Moves the right motor for 15 cm.
MOVE BACKWARD 1 M
Moves both motors 1 m backward.

--------------------------------------------------------------------------------------------------------------------------------------

h2. SET ACCELERATION_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH> <acceleration mode [CONSTANT|LINEAR] default:LINEAR>

description:

Sets the acceleration method of the selected motor.

example:

SET ACCELERATION_MODE LINEAR

--------------------------------------------------------------------------------------------------------------------------------------

SET MOTOR_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH> <motor mode [INTERLEAVE|MICROSTEP|SINGLE|DOUBLE] default:double>

description:

Sets the motor mode of the selected motor.

SET MOTOR_MODE INTERLEAVE

--------------------------------------------------------------------------------------------------------------------------------------

SET MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH> <unsigned int (capped with motor constraints)>

description:

Sets the max motor speed of the selected motor.

example:

SET MAX_SPEED BOTH 40

--------------------------------------------------------------------------------------------------------------------------------------

SET ACC_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH> <unsigned int>

description:

Sets the acceleration speed of the selected motor.

example:

SET ACC_SPEED RIGHT 10

--------------------------------------------------------------------------------------------------------------------------------------
######################################################################################################################################
######################################################################################################################################
--------------------------------------------------------------------------------------------------------------------------------------

GET ACCELERATION_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Returns the current acceleration mode.

example:

GET ACCELERATION_MODE BOTH

--------------------------------------------------------------------------------------------------------------------------------------

GET MOTOR_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Returns the current motor mode.

example:

GET MOTOR_MODE

--------------------------------------------------------------------------------------------------------------------------------------

GET MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Returns the current max motor speed.

example:

GET MAX_SPEED BOTH

--------------------------------------------------------------------------------------------------------------------------------------

GET ACC_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Returns the current acceleration speed.

example:

GET ACC_SPEED

--------------------------------------------------------------------------------------------------------------------------------------

GET CONTROLLER_MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Returns the max controller speed

example:

GET CONTROLLER_MAX_SPEED RIGHT

--------------------------------------------------------------------------------------------------------------------------------------
######################################################################################################################################
######################################################################################################################################
--------------------------------------------------------------------------------------------------------------------------------------

RELEASE <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Releases the motor coils.

example:

RELEASE RIGHT

--------------------------------------------------------------------------------------------------------------------------------------

CLEAR <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Clears selected motors order queue. The currently executing order is not affected.

example:

CLEAR

--------------------------------------------------------------------------------------------------------------------------------------

STOP <motor [LEFT|RIGHT|BOTH] default:BOTH>

description:

Immediately stops the selected motors and clears their order queue.

example:

STOP LEFT

--------------------------------------------------------------------------------------------------------------------------------------