| 1 | |
|---|
| 2 | <!DOCTYPE html |
|---|
| 3 | PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|---|
| 4 | <html> |
|---|
| 5 | <head> |
|---|
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|---|
| 7 | |
|---|
| 8 | <!-- |
|---|
| 9 | This HTML is auto-generated from an M-file. |
|---|
| 10 | To make changes, update the M-file and republish this document. |
|---|
| 11 | --> |
|---|
| 12 | <title>SpeedRegulation</title> |
|---|
| 13 | <meta name="generator" content="MATLAB 7.7"> |
|---|
| 14 | <meta name="date" content="2008-11-05"> |
|---|
| 15 | <meta name="m-file" content="script_SpeedRegulation"> |
|---|
| 16 | <link type="text/css" rel="stylesheet" href="../../style.css"> |
|---|
| 17 | </head> |
|---|
| 18 | <body> |
|---|
| 19 | <p class="header">RWTH - Mindstorms NXT Toolbox</p> |
|---|
| 20 | <div class="content"> |
|---|
| 21 | <h1>SpeedRegulation</h1> |
|---|
| 22 | <!--introduction--> |
|---|
| 23 | <p>Enables / disables the speed regulation mode of the current active motor</p> |
|---|
| 24 | <!--/introduction--> |
|---|
| 25 | <h2>Contents</h2> |
|---|
| 26 | <div> |
|---|
| 27 | <ul> |
|---|
| 28 | <li><a href="#2">Syntax</a></li> |
|---|
| 29 | <li><a href="#4">Description</a></li> |
|---|
| 30 | <li><a href="#10">Example</a></li> |
|---|
| 31 | <li><a href="#12">See also</a></li> |
|---|
| 32 | <li><a href="#14">Signature</a></li> |
|---|
| 33 | </ul> |
|---|
| 34 | </div> |
|---|
| 35 | <h2>Syntax<a name="2"></a></h2> |
|---|
| 36 | <p><tt>SpeedRegulation(mode)</tt></p> |
|---|
| 37 | <h2>Description<a name="4"></a></h2> |
|---|
| 38 | <p><tt>SpeedRegulation(mode)</tt> enables or disabled the speed regulation mode of the current active motor which can be controlled by <tt>SendMotorSettings</tt>. The value <tt>mode</tt> can be equal to <tt>'on'</tt> or <tt>'off'</tt> which enables or disables the speed regulation. The speed regulation setting takes only affect with the next <tt>SendMotorSettings</tt> command. |
|---|
| 39 | </p> |
|---|
| 40 | <p>The speed regulation provides the motor to rotate speed controlled. So rotations at low speeds (powers) can be achieved.</p> |
|---|
| 41 | <p><b>Note:</b></p> |
|---|
| 42 | <p>In case the motor was previously synced to another motor, both these synchronisation modes will be disabled by activating |
|---|
| 43 | the speed regulation to one of the motors (as speed regulation and motor synchronisation are not possible both together at |
|---|
| 44 | one time). |
|---|
| 45 | </p> |
|---|
| 46 | <h2>Example<a name="10"></a></h2><pre class="codeinput"> SetMotor(MOTOR_A); |
|---|
| 47 | SetPower(12); |
|---|
| 48 | SpeedRegulation(<span class="string">'on'</span>); |
|---|
| 49 | SendMotorSettings(); |
|---|
| 50 | </pre><h2>See also<a name="12"></a></h2> |
|---|
| 51 | <p><a href="SendMotorSettings.html">SendMotorSettings</a>, <a href="SetMotor.html">SetMotor</a>, <a href="SetPower.html">SetPower</a></p> |
|---|
| 52 | <h2>Signature<a name="14"></a></h2> |
|---|
| 53 | <div> |
|---|
| 54 | <ul> |
|---|
| 55 | <li><b>Author:</b> Linus Atorf, Alexander Behrens (see AUTHORS) |
|---|
| 56 | </li> |
|---|
| 57 | <li><b>Date:</b> 2007/10/15 |
|---|
| 58 | </li> |
|---|
| 59 | <li><b>Copyright:</b> 2007-2008, RWTH Aachen University |
|---|
| 60 | </li> |
|---|
| 61 | </ul> |
|---|
| 62 | </div> |
|---|
| 63 | <p class="footer"><br> |
|---|
| 64 | Published with wg_publish; V1.0<br></p> |
|---|
| 65 | </div> |
|---|
| 66 | <!-- |
|---|
| 67 | ##### SOURCE BEGIN ##### |
|---|
| 68 | %% SpeedRegulation |
|---|
| 69 | % Enables / disables the speed regulation mode of the current active motor |
|---|
| 70 | %% |
|---|
| 71 | %% Syntax |
|---|
| 72 | % |SpeedRegulation(mode)| |
|---|
| 73 | %% |
|---|
| 74 | %% Description |
|---|
| 75 | % |SpeedRegulation(mode)| enables or disabled the speed regulation mode of the current active |
|---|
| 76 | % motor which can be controlled by |SendMotorSettings|. The value |mode| can be equal to |'on'| or |
|---|
| 77 | % |'off'| which enables or disables the speed regulation. |
|---|
| 78 | % The speed regulation setting takes only affect with the next |SendMotorSettings| command. |
|---|
| 79 | %% |
|---|
| 80 | % The speed regulation provides the motor to rotate speed controlled. So rotations at low speeds |
|---|
| 81 | % (powers) can be achieved. |
|---|
| 82 | %% |
|---|
| 83 | %% |
|---|
| 84 | % *Note:* |
|---|
| 85 | %% |
|---|
| 86 | % In case the motor was previously synced to another motor, both these synchronisation modes will |
|---|
| 87 | % be disabled by activating the speed regulation to one of the motors (as speed regulation and |
|---|
| 88 | % motor synchronisation are not possible both together at one time). |
|---|
| 89 | %% |
|---|
| 90 | %% Example |
|---|
| 91 | SetMotor(MOTOR_A); |
|---|
| 92 | SetPower(12); |
|---|
| 93 | SpeedRegulation('on'); |
|---|
| 94 | SendMotorSettings(); |
|---|
| 95 | %% |
|---|
| 96 | %% See also |
|---|
| 97 | % SendMotorSettings, SetMotor, SetPower |
|---|
| 98 | %% |
|---|
| 99 | %% Signature |
|---|
| 100 | %% |
|---|
| 101 | % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS) |
|---|
| 102 | % * *Date:* 2007/10/15 |
|---|
| 103 | % * *Copyright:* 2007-2008, RWTH Aachen University |
|---|
| 104 | % |
|---|
| 105 | |
|---|
| 106 | ##### SOURCE END ##### |
|---|
| 107 | --> |
|---|
| 108 | </body> |
|---|
| 109 | </html> |
|---|