oMotorMind Object

Main Index
Object List
Back to top of pageDescription:
 

The oMotorMind Object is a Hardware Object that outputs control codes to a Motor Mind Module.

 The following table lists the size and availability of the oMotorMind Object.
 ObjectSizeDescriptionA1A2B1B2C1
oMotorMind5 BytesControls a DC motor that is driven by a Motor Mind module.xxx
Back to top of pageOperation:
 

When the oMotorMind Object's Value property is set to a value, that value is sent out the I/O Line specified by the IOLine property in such a way that a Solutions Cubed Motor Mind Object will use the data to control a DC motor.

Several methods are available to do common functions such as set speed and stop.  Note: these methods were added in Firmware version C1.

The Serial property is an instance of the oSerialL object which is created when the oMotorMind Object is.  The oMotorMind Object uses this object to send the motor mind module control codes.  The properties of the instance of the oSerialL Object are configured to transmit data at 2400 baud.  modifying that or any other properties of the oSerialL instance will affect the oMotorMind Object's operation in ways that could make the it unable to control the module.  See the oSerialL Help for more detail on how the serial port communicates with devices such as the Solutions Cubed Motor Mind DC motor controller.

Back to top of pageProperties:

The following table lists the properties of the oMotorMind Object:

Property

Description

Value
The value to send to the Motor Mind Module.
Object Class: oValue Value Range: 0 - 255
Data Type: Numeric Default Value: 0
Each time the value property is written to, that data is sent to the motor mind module.
IOLine
A value that specifies which I/O Line is connected to the serial data line.
Object Class: oIOLine Value Range: 0 - 31
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOLine help file for details.
Serial
The I/O function object used to control the Motor Mind.
Object Class: oSerialL Value Range: 0 - 255
Data Type: Numeric Default Value: 0
Initially configured to send data at 2400 baud.
Address
Returns a pointer to the address of the oCounter Object instance.
Object Class: oAddress Value Range: 0 - 127
Data Type:Pointer (Read Only) Default Value: Address of Object

Back to top of pageMethods:
 The following table lists the Methods of the oMotorMind Object:
MethodsDescriptionAvailability
GetStatusReads the status.Firmware C.1
GetTachReads the tachometer readingFirmware C.1
ReverseChanges the direction that the motor is turning.Firmware C.1
SetCountMoves the motor to a specified encoder count.Firmware C.1
SetSpeedSet the speed of the motor with tachometer feedback.Firmware C.1
SpeedSet the speed of the motor.Firmware C.1
StopCauses the Motor to stop.Firmware C.1
Back to top of pageExamples:
 In the following example, the oMotorMind Object is used.
Dim M As New oMotorMind

Sub Main()
  M.IOLine = 17
  M.Value = &h55
  M.Value = 3
  M.Value = 63
End Sub  
Back to top of pageConnections:
The oMotorMind uses one I/O line.  This I/O line is connected to the data line of the Motor Mind Module. 
Solutions Cubed Motor Mind-B

Back to top of pageRelated Items:

 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oDCMotorControls a DC motor that is driven by an LMD18200 H-Bridge driver.xxx
oDCMotor2Controls a DC motor that is driven by an L293 H-Bridge driver.xx
oDCMotor3Controls a DC motor that is driven by two drivers.xx
oDCMotorMTControls a DC motor that is driven by a Wirz 203 Motor Driver.xx
oDCMotorWZControls a DC motor that is driven by a Mondo-Tronics H-Bridge driver.xx
oServoSP(2)Controls an RC Servo modified for continuous rotation.xx
oStepperSPControls a stepper motors speed.xx
oServoSEControls a Scott Edwards Serial Servo controller.xxx
Back to top of pageVersion History and Bug List:
 Firmware Ver B1: Introduced.
Firmware Ver C1: Control methods added.

Bugs:
In Ver 5 of the compiler, this object was setting the serial baud rate incorrectly.


ooPIC Compiler Ver 6.0 (c) Copyright 1997 - 2007 Savage Innovations, LLC.