Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Defines | Functions | Variables

Firgelli Linear Actuator
[Other]

Files

file  FLAC-driver.h
 

Firgelli Linear Actuator driver.


Defines

#define STALL_TIME_SLOW   1200
#define STALL_TIME_FAST   800

Functions

task _FLACcontrolTaskA ()
task _FLACcontrolTaskB ()
task _FLACcontrolTaskC ()
void _FLACcontrolTasks (tMotor _motor, int _highPower, long _encTarget)
bool isDone (tMotor _motor)
void FLACextendLA (tMotor _motor, int _highPower)
void FLACextendLA (tMotor _motor, int _highPower, int distance)
void FLACtretractLA (tMotor _motor, int _highPower)
void FLACtretractLA (tMotor _motor, int _highPower, int distance)
void FLACmoveLA (tMotor _motor, int highpower, int pos)
bool isStalled (tMotor _motor)

Variables

long _encoderTarget [3] = {0, 0, 0}
long _motorHighPower [3] = {0, 0, 0}
bool _stalled [3] = {false, false, false}

Detailed Description

Firgelli Linear Actuator driver


Define Documentation

#define STALL_TIME_FAST   800

Counter to check if motor is stalled when motor speeds are >= 50

Definition at line 39 of file FLAC-driver.h.

#define STALL_TIME_SLOW   1200

Counter to check if motor is stalled when motor speeds are < 50

Definition at line 38 of file FLAC-driver.h.


Function Documentation

task _FLACcontrolTaskA (  )

Definition at line 63 of file FLAC-driver.h.

task _FLACcontrolTaskB (  )

Definition at line 119 of file FLAC-driver.h.

task _FLACcontrolTaskC (  )

Definition at line 175 of file FLAC-driver.h.

void _FLACcontrolTasks ( tMotor  _motor,
int  _highPower,
long  _encTarget 
)

Stop and start the motor control tasks and set their parameters.

Note: this is an internal function and should not be called directly.

Parameters:
_motorthe motor to be controlled
_highPowerthe highest speed the motor should turn at
_encTargetthe target the motor should move to

Definition at line 238 of file FLAC-driver.h.

void FLACextendLA ( tMotor  _motor,
int  _highPower 
)

Extend the Linear Actuator fully until stalled.

Parameters:
_motorthe motor to be controlled
_highPowerthe highest speed the motor should turn at
Examples:
FLAC-test1.c.

Definition at line 315 of file FLAC-driver.h.

void FLACextendLA ( tMotor  _motor,
int  _highPower,
int  distance 
)

Extend the Linear Actuator.

Parameters:
_motorthe motor to be controlled
_highPowerthe highest speed the motor should turn at
distancethe number of encoder ticks (0.5mm) the actuator should move

Definition at line 327 of file FLAC-driver.h.

void FLACmoveLA ( tMotor  _motor,
int  highpower,
int  pos 
)

Move the Linear Actuator to an absolute position

Parameters:
_motorthe motor to be controlled
highpowerthe highest speed the motor should turn at
posthe exact encoder count to move to

Definition at line 363 of file FLAC-driver.h.

void FLACtretractLA ( tMotor  _motor,
int  _highPower,
int  distance 
)

Retract the Linear Actuator.

Parameters:
_motorthe motor to be controlled
_highPowerthe highest speed the motor should turn at
distancethe number of encoder ticks (0.5mm) the actuator should move

Definition at line 351 of file FLAC-driver.h.

void FLACtretractLA ( tMotor  _motor,
int  _highPower 
)

Retract the Linear Actuator fully until stalled. It is wise to reset the encoder count for that motor afterwards.

Parameters:
_motorthe motor to be controlled
_highPowerthe highest speed the motor should turn at
Examples:
FLAC-test1.c.

Definition at line 339 of file FLAC-driver.h.

bool isDone ( tMotor  _motor )

Check if the motor is done with the current operation

Parameters:
_motorthe motor to be checked
Returns:
true if the motor is done, false if it isn't
Examples:
FLAC-test1.c.

Definition at line 290 of file FLAC-driver.h.

bool isStalled ( tMotor  _motor )

Check if the motor stalled on the last operation

Parameters:
_motorthe motor to be checked
Returns:
true if the motor stalled, false if it hadn't.
Examples:
FLAC-test1.c.

Definition at line 305 of file FLAC-driver.h.


Variable Documentation

long _encoderTarget[3] = {0, 0, 0}

Motor encoder targets - INTERNAL

Definition at line 41 of file FLAC-driver.h.

long _motorHighPower[3] = {0, 0, 0}

High Power - top speed of the motor - INTERNAL

Definition at line 42 of file FLAC-driver.h.

bool _stalled[3] = {false, false, false}

Are we stalling? - INTERNAL

Definition at line 43 of file FLAC-driver.h.