Treehopper C# API
Amis30624 Class Reference

Allegro AMIS30624 I2c stepper motor driver More...

Public Types

enum  Accel {
  StepsPerSec2_49, StepsPerSec2_218, StepsPerSec2_1004, StepsPerSec2_3609,
  StepsPerSec2_6228, StepsPerSec2_8848, StepsPerSec2_11409, StepsPerSec2_13970,
  StepsPerSec2_16531, StepsPerSec2_19092, StepsPerSec2_21886, StepsPerSec2_24447,
  StepsPerSec2_27008, StepsPerSec2_29570, StepsPerSec2_34925, StepsPerSec2_40047
}
 Acceleration of the motor More...
 
enum  HoldingCurrent {
  mA_59, mA_71, mA_84, mA_100,
  mA_119, mA_141, mA_168, mA_200,
  mA_238, mA_283, mA_336, mA_400,
  mA_476, mA_566, mA_673, mA_0
}
 Motor holding current More...
 
enum  MaxVelocityType {
  StepsPerSecond_99, StepsPerSecond_136, StepsPerSecond_167, StepsPerSecond_197,
  StepsPerSecond_213, StepsPerSecond_228, StepsPerSecond_243, StepsPerSecond_273,
  StepsPerSecond_303, StepsPerSecond_334, StepsPerSecond_364, StepsPerSecond_395,
  StepsPerSecond_456, StepsPerSecond_546, StepsPerSecond_729, StepsPerSecond_973
}
 Maximum motor velocity More...
 
enum  RunningCurrent {
  mA_59, mA_71, mA_84, mA_100,
  mA_119, mA_141, mA_168, mA_200,
  mA_238, mA_283, mA_336, mA_400,
  mA_476, mA_566, mA_673, mA_800
}
 Motor running current More...
 
enum  StepModeType { HalfStepping, QuarterStepping, EighthStepping, SixteenthStepping }
 Step mode More...
 

Public Member Functions

 Amis30624 (I2C module, bool addressPin=false, int speed=400)
 Construct a new AMIS30624 stepper motor controller More...
 
 Amis30624 (I2C module, byte address, int speed)
 Construct a new AMIS30624 stepper motor controller More...
 
Task ResetToDefault ()
 Reset to default More...
 
Task SoftStop ()
 Soft stop the motor More...
 
Task HardStop ()
 Hard (emergency) stop the motor More...
 
Task RunVelocity ()
 Run the motor continuously with the given velocity settings More...
 
async Task MoveAsync (short position)
 Move the motor to a target position More...
 

Properties

short ActualPosition [get]
 Get the actual position of the shaft More...
 
short TargetPosition [get, set]
 Get or set the target position More...
 
short SecurePosition [get, set]
 Get or set the secure position More...
 
bool ShaftDirection [get, set]
 Determines whether a positive motion is clockwise or counter-clockwise. More...
 
bool AccelShape [get, set]
 get or set the acceleration shape More...
 
int MinVelocityFactorThirtySeconds [get, set]
 Get or set the minimum velocity factor, in 1/32nds. More...
 
Accel Acceleration [get, set]
 Get or set the acceleration curve to use More...
 
RunningCurrent RunCurrent [get, set]
 Get or set the running current More...
 
HoldingCurrent HoldCurrent [get, set]
 Get or set the holding current More...
 
MaxVelocityType MaxVelocity [get, set]
 Get or set the maximum velocity More...
 
StepModeType StepMode [get, set]
 Get or set the step mode More...
 

Events

PositionChangedHandler PositionChanged
 An event that fires whenever the stepper motor's position has changed More...
 

Detailed Description

Allegro AMIS30624 I2c stepper motor driver

Member Enumeration Documentation

◆ Accel

enum Accel
strong

Acceleration of the motor

Enumerator
StepsPerSec2_49 

49 steps/s^2

StepsPerSec2_218 

218 steps/s^2

StepsPerSec2_1004 

1004 steps/s^2

StepsPerSec2_3609 

3609 steps/s^2

StepsPerSec2_6228 

6228 steps/s^2

StepsPerSec2_8848 

8848 steps/s^2

StepsPerSec2_11409 

11409 steps/s^2

StepsPerSec2_13970 

13970 steps/s^2

StepsPerSec2_16531 

16531 steps/s^2

StepsPerSec2_19092 

19092 steps/s^2

StepsPerSec2_21886 

21886 steps/s^2

StepsPerSec2_24447 

24447 steps/s^2

StepsPerSec2_27008 

27008 steps/s^2

StepsPerSec2_29570 

29570 steps/s^2

StepsPerSec2_34925 

34925 steps/s^2

StepsPerSec2_40047 

40047 steps/s^2

◆ HoldingCurrent

enum HoldingCurrent
strong

Motor holding current

Enumerator
mA_59 

59 mA

mA_71 

71 mA

mA_84 

84 mA

mA_100 

100 mA

mA_119 

119 mA

mA_141 

141 mA

mA_168 

168 mA

mA_200 

200 mA

mA_238 

238 mA

mA_283 

283 mA

mA_336 

336 mA

mA_400 

400 mA

mA_476 

476 mA

mA_566 

566 mA

mA_673 

673 mA

mA_0 

0 mA

◆ MaxVelocityType

enum MaxVelocityType
strong

Maximum motor velocity

Enumerator
StepsPerSecond_99 

99 steps/s

StepsPerSecond_136 

136 steps/s

StepsPerSecond_167 

167 steps/s

StepsPerSecond_197 

197 steps/s

StepsPerSecond_213 

213 steps/s

StepsPerSecond_228 

228 steps/s

StepsPerSecond_243 

243 steps/s

StepsPerSecond_273 

273 steps/s

StepsPerSecond_303 

303 steps/s

StepsPerSecond_334 

334 steps/s

StepsPerSecond_364 

364 steps/s

StepsPerSecond_395 

395 steps/s

StepsPerSecond_456 

456 steps/s

StepsPerSecond_546 

546 steps/s

StepsPerSecond_729 

729 steps/s

StepsPerSecond_973 

973 steps/s

◆ RunningCurrent

enum RunningCurrent
strong

Motor running current

Enumerator
mA_59 

59 mA

mA_71 

71 mA

mA_84 

84 mA

mA_100 

100 mA

mA_119 

119 mA

mA_141 

141 mA

mA_168 

168 mA

mA_200 

200 mA

mA_238 

238 mA

mA_283 

283 mA

mA_336 

336 mA

mA_400 

400 mA

mA_476 

476 mA

mA_566 

566 mA

mA_673 

673 mA

mA_800 

800 mA

◆ StepModeType

enum StepModeType
strong

Step mode

Enumerator
HalfStepping 

Half-stepping

QuarterStepping 

Quarter-stepping

EighthStepping 

Eighth-stepping

SixteenthStepping 

Sixteenth-stepping

Constructor & Destructor Documentation

◆ Amis30624() [1/2]

Amis30624 ( I2C  module,
bool  addressPin = false,
int  speed = 400 
)

Construct a new AMIS30624 stepper motor controller

Parameters
moduleThe I2c module this stepper motor is attached to
addressPinThe hardwired address pin state
speedThe speed to operate this peripheral at

◆ Amis30624() [2/2]

Amis30624 ( I2C  module,
byte  address,
int  speed 
)

Construct a new AMIS30624 stepper motor controller

Parameters
moduleThe I2c module this stepper motor is attached to
addressThe address of the module
speedThe speed to operate this peripheral at

Member Function Documentation

◆ ResetToDefault()

Task ResetToDefault ( )

Reset to default

Returns
An awaitable task that completes when finished

◆ SoftStop()

Task SoftStop ( )

Soft stop the motor

Returns
An awaitable task that completes when finished

◆ HardStop()

Task HardStop ( )

Hard (emergency) stop the motor

Returns
An awaitable task that completes when finished

◆ RunVelocity()

Task RunVelocity ( )

Run the motor continuously with the given velocity settings

Returns
An awaitable task that completes when finished

◆ MoveAsync()

async Task MoveAsync ( short  position)

Move the motor to a target position

Parameters
positionThe new position
Returns
An awaitable task that completes when the motor reaches the target position

Property Documentation

◆ ActualPosition

short ActualPosition
get

Get the actual position of the shaft

◆ TargetPosition

short TargetPosition
getset

Get or set the target position

◆ SecurePosition

short SecurePosition
getset

Get or set the secure position

◆ ShaftDirection

bool ShaftDirection
getset

Determines whether a positive motion is clockwise or counter-clockwise.

Note that this value is ignored for RunVelocity mode!

◆ AccelShape

bool AccelShape
getset

get or set the acceleration shape

◆ MinVelocityFactorThirtySeconds

int MinVelocityFactorThirtySeconds
getset

Get or set the minimum velocity factor, in 1/32nds.

◆ Acceleration

Accel Acceleration
getset

Get or set the acceleration curve to use

◆ RunCurrent

RunningCurrent RunCurrent
getset

Get or set the running current

◆ HoldCurrent

HoldingCurrent HoldCurrent
getset

Get or set the holding current

◆ MaxVelocity

MaxVelocityType MaxVelocity
getset

Get or set the maximum velocity

◆ StepMode

StepModeType StepMode
getset

Get or set the step mode

Event Documentation

◆ PositionChanged

PositionChangedHandler PositionChanged

An event that fires whenever the stepper motor's position has changed


The documentation for this class was generated from the following file: