Component: Actuators (BL0127) (E-blocks 2)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category E-blocks 2


Actuators component

The Actuators board allows for investigation into several different motor types. Included on the board is a DC motor with both analogue and digital feedback, a servo motor and a stepper motor plus the circuitry to drive the motors.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_EBlocks2_Actuators_BL0127.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_EBlocks2_Actuators_BL0127.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Demo program using the Eblocks 2 Actuators Board BL0127 connected to BL0011 PIC programmer FC6 Icon.png BL0127 Actuators Demo for PIC


Macro reference

DCMotor_Break

Fc9-comp-macro.png DCMotor_Break
Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
Fc9-void-icon.png - VOID Return


DCMotor_Coast

Fc9-comp-macro.png DCMotor_Coast
Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
Fc9-void-icon.png - VOID Return


DCMotor_DC_Feedback

Fc9-comp-macro.png DCMotor_DC_Feedback
 
Fc9-u8-icon.png - BYTE Return


DCMotor_DC_FeedbackSim

Fc9-comp-macro.png DCMotor_DC_FeedbackSim
 
Fc9-u8-icon.png - BYTE Return


DCMotor_Disable

Fc9-comp-macro.png DCMotor_Disable
Disable the motor output 
Fc9-void-icon.png - VOID Return


DCMotor_Enable

Fc9-comp-macro.png DCMotor_Enable
Enables the motor output 
Fc9-void-icon.png - VOID Return


DCMotor_Forwards

Fc9-comp-macro.png DCMotor_Forwards
Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
Fc9-u16-icon.png - UINT Duty
Sets the motor power for PWM or H-Bridge outputs 
Fc9-void-icon.png - VOID Return


DCMotor_Reverse

Fc9-comp-macro.png DCMotor_Reverse
Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
Fc9-u16-icon.png - UINT Duty
Sets the motor power for PWM or H-Bridge outputs 
Fc9-void-icon.png - VOID Return


Servo_AutoMoveToPosition

Fc9-comp-macro.png Servo_AutoMoveToPosition
Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
Fc9-u8-icon.png - BYTE Channel
The channel to assign the new position. Range: 0-7 
Fc9-u8-icon.png - BYTE Position
Position to automatically move to. Range: 0-255 
Fc9-void-icon.png - VOID Return


Servo_AutoMoveToPositionInt

Fc9-comp-macro.png Servo_AutoMoveToPositionInt
Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
Fc9-u8-icon.png - BYTE Channel
The channel to assign the new position. Range: 0-7 
Fc9-u16-icon.png - UINT Position
Position to automatically move to. Range: 0-65535 
Fc9-void-icon.png - VOID Return


Servo_DisableServo

Fc9-comp-macro.png Servo_DisableServo
Disables a servo channel effectivly disabling the motor. 
Fc9-u8-icon.png - BYTE Channel
The channel to set the position for. First channel is zero. 
Fc9-void-icon.png - VOID Return


Servo_EnableServo

Fc9-comp-macro.png Servo_EnableServo
Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
Fc9-u8-icon.png - BYTE Channel
The channel to set the position for. First channel is zero. 
Fc9-void-icon.png - VOID Return


Servo_Initialise

Fc9-comp-macro.png Servo_Initialise
Sets up the servo motor interrupts 
Fc9-void-icon.png - VOID Return


Servo_IsAutoMoving

Fc9-comp-macro.png Servo_IsAutoMoving
Is the AutoMoveToPosition movement complete. Returns 1 if the servos are still moving. Returns 0 if all servo movement is complete. 
Fc9-u8-icon.png - BYTE Return


Servo_IsServoAutoMoving

Fc9-comp-macro.png Servo_IsServoAutoMoving
Is the AutoMoveToPosition movement complete for a specific servo output. Returns 1 if the servo is still moving. Returns 0 if the servo movement is complete. 
Fc9-u8-icon.png - BYTE Channel
Servo Motor Output Range: 0-7 
Fc9-u8-icon.png - BYTE Return


Servo_MoveToPosition

Fc9-comp-macro.png Servo_MoveToPosition
Moves a single step towards the new position, the rate of movement is determined by how often the move to macro is called. Returns 1 if the position has been reached. 
Fc9-u8-icon.png - BYTE Channel
The channel to assign the new position. Range: 0-7 
Fc9-u8-icon.png - BYTE Position
Target position to move towards. Range: 0-255 
Fc9-u8-icon.png - BYTE Return


Servo_MoveToPositionInt

Fc9-comp-macro.png Servo_MoveToPositionInt
Moves a single step towards the new position, the rate of movement is determined by how often the move to macro is called. Returns 1 if the position has been reached. 
Fc9-u8-icon.png - BYTE Channel
The channel to assign the new position. Range: 0-7 
Fc9-u16-icon.png - UINT Position
Target position to move towards. Range: 0-65535 
Fc9-u8-icon.png - BYTE Return


Servo_SetAutoMoveSpeed

Fc9-comp-macro.png Servo_SetAutoMoveSpeed
Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property. 
Fc9-u8-icon.png - BYTE Speed
1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
Fc9-void-icon.png - VOID Return


Servo_SetAutoMoveSpeedInt

Fc9-comp-macro.png Servo_SetAutoMoveSpeedInt
Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property. 
Fc9-u16-icon.png - UINT Speed
1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
Fc9-void-icon.png - VOID Return


Servo_SetPosition

Fc9-comp-macro.png Servo_SetPosition
Moves directly to the specified position with no interpolation.  
Fc9-u8-icon.png - BYTE Channel
The channel to assign the new position. Range: 0-7 
Fc9-u8-icon.png - BYTE Position
Position to jump to. Range: 0-255 
Fc9-void-icon.png - VOID Return


Servo_SetPositionInt

Fc9-comp-macro.png Servo_SetPositionInt
Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
Fc9-u8-icon.png - BYTE Channel
The channel to assign the new position. Range: 0-7 
Fc9-u16-icon.png - UINT Position
Position to jump to. Range: 0-65535 
Fc9-void-icon.png - VOID Return


Servo_SetTrim

Fc9-comp-macro.png Servo_SetTrim
Allows the level of trim for each servo channel to be adjusted progmatically. 
Fc9-u8-icon.png - BYTE Channel
The channel to set the position for. First channel is zero. 
Fc9-u8-icon.png - BYTE Trim
Legacy: 0=0us, 1=+25us, 2=+50us, 3=+75us, 4=+100us, 5=-25us, 6=-50us, 7=-75us, 8=-100us or Smooth: 0-200 
Fc9-void-icon.png - VOID Return


Stepper_DecrementStep

Fc9-comp-macro.png Stepper_DecrementStep
Move the motor backwards by one step. 
Fc9-void-icon.png - VOID Return


Stepper_DisableMotor

Fc9-comp-macro.png Stepper_DisableMotor
Turn off the motor. It will no longer respond to any other macros. 
Fc9-void-icon.png - VOID Return


Stepper_EnableMotor

Fc9-comp-macro.png Stepper_EnableMotor
Turn on the motor. This must be done before it will respond to any other macros. 
Fc9-void-icon.png - VOID Return


Stepper_IncrementStep

Fc9-comp-macro.png Stepper_IncrementStep
Move the motor forward by one step. 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Connection Type
 
Fc9-type-16-icon.png DC Feedback type
Select if the feedback is a digital or analogue value. Note, if using an Arduino shield and port D is selected, then only digital type will be available.  
Fc9-conn-icon.png Connections
Fc9-type-19-icon.png Port
Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
Fc9-conn-icon.png Servo
Fc9-conn-icon.png Trim
Fc9-conn-icon.png Pulse Width
Fc9-type-21-icon.png Minimum (us)
Shortest pulse width that will be used in microseconds. 
Fc9-type-21-icon.png Maximum (us)
Longest pulse width used for the PWM signals in microseconds.. 
Fc9-type-21-icon.png Period Multiplier
Number of instructions for 1 / 256th of the positional accuracy. This sets the default movement speed to maintain legacy move speeds. Also sets the multiplication factor to convert from a byte 0-255 to a clocked position value.