| 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
Sample program using the EBM020 - Infrared sensor.
Transmits a signal and determines distance from reflected value
EBM020 Example
Macro reference
 
 | 
DCMotor_DC_Feedback
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Reverse
 | 
| Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Target position to move towards. Range: 0-255 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Enable
 | 
| Enables the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_DisableMotor
 | 
| Turn off the motor.  It will no longer respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_IncrementStep
 | 
| Move the motor forward by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_EnableServo
 | 
| Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeed
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - BYTE
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Target position to move towards. Range: 0-65535 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Coast
 | 
| Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_IsAutoMoving
 | 
| Is the AutoMoveToPosition movement complete.   Returns 1 if the servos are still moving.  Returns 0 if all servo movement is complete. 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| Servo Motor Output Range: 0-7 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Stepper_DecrementStep
 | 
| Move the motor backwards by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPositionInt
 | 
| Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to jump to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetTrim
 | 
| Allows the level of trim for each servo channel to be adjusted progmatically. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - 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 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Break
 | 
| Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_Initialise
 | 
| Sets up the servo motor interrupts 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Forwards
 | 
| Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeedInt
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - UINT
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Disable
 | 
| Disable the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_EnableMotor
 | 
| Turn on the motor.  This must be done before it will respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPosition
 | 
| Moves directly to the specified position with no interpolation.  
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to jump to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_DC_FeedbackSim
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPosition
 | 
| Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to automatically move to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPositionInt
 | 
| Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to automatically move to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_DisableServo
 | 
| Disables a servo channel effectivly disabling the motor. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Connection Type
 | 
|  
 | 
 
 | 
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.  
 | 
 
 | 
Connections
 | 
 
 | 
Port
 | 
| Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
 | 
 
 | 
Servo
 | 
 
 | 
Trim
 | 
 
 | 
Pulse Width
 | 
 
 | 
Minimum (us)
 | 
| Shortest pulse width that will be used in microseconds. 
 | 
 
 | 
Maximum (us)
 | 
| Longest pulse width used for the PWM signals  in microseconds.. 
 | 
 
 | 
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. 
 | 
==Macro reference==
 
 | 
DCMotor_DC_Feedback
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Reverse
 | 
| Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Target position to move towards. Range: 0-255 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Enable
 | 
| Enables the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_DisableMotor
 | 
| Turn off the motor.  It will no longer respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_IncrementStep
 | 
| Move the motor forward by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_EnableServo
 | 
| Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeed
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - BYTE
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Target position to move towards. Range: 0-65535 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Coast
 | 
| Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_IsAutoMoving
 | 
| Is the AutoMoveToPosition movement complete.   Returns 1 if the servos are still moving.  Returns 0 if all servo movement is complete. 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| Servo Motor Output Range: 0-7 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Stepper_DecrementStep
 | 
| Move the motor backwards by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPositionInt
 | 
| Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to jump to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetTrim
 | 
| Allows the level of trim for each servo channel to be adjusted progmatically. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - 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 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Break
 | 
| Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_Initialise
 | 
| Sets up the servo motor interrupts 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Forwards
 | 
| Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeedInt
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - UINT
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Disable
 | 
| Disable the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_EnableMotor
 | 
| Turn on the motor.  This must be done before it will respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPosition
 | 
| Moves directly to the specified position with no interpolation.  
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to jump to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_DC_FeedbackSim
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPosition
 | 
| Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to automatically move to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPositionInt
 | 
| Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to automatically move to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_DisableServo
 | 
| Disables a servo channel effectivly disabling the motor. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Connection Type
 | 
|  
 | 
 
 | 
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.  
 | 
 
 | 
Connections
 | 
 
 | 
Port
 | 
| Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
 | 
 
 | 
Servo
 | 
 
 | 
Trim
 | 
 
 | 
Pulse Width
 | 
 
 | 
Minimum (us)
 | 
| Shortest pulse width that will be used in microseconds. 
 | 
 
 | 
Maximum (us)
 | 
| Longest pulse width used for the PWM signals  in microseconds.. 
 | 
 
 | 
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. 
 | 
==Macro reference==
 
 | 
DCMotor_DC_Feedback
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Reverse
 | 
| Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Target position to move towards. Range: 0-255 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Enable
 | 
| Enables the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_DisableMotor
 | 
| Turn off the motor.  It will no longer respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_IncrementStep
 | 
| Move the motor forward by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_EnableServo
 | 
| Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeed
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - BYTE
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Target position to move towards. Range: 0-65535 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Coast
 | 
| Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_IsAutoMoving
 | 
| Is the AutoMoveToPosition movement complete.   Returns 1 if the servos are still moving.  Returns 0 if all servo movement is complete. 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| Servo Motor Output Range: 0-7 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Stepper_DecrementStep
 | 
| Move the motor backwards by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPositionInt
 | 
| Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to jump to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetTrim
 | 
| Allows the level of trim for each servo channel to be adjusted progmatically. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - 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 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Break
 | 
| Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_Initialise
 | 
| Sets up the servo motor interrupts 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Forwards
 | 
| Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeedInt
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - UINT
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Disable
 | 
| Disable the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_EnableMotor
 | 
| Turn on the motor.  This must be done before it will respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPosition
 | 
| Moves directly to the specified position with no interpolation.  
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to jump to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_DC_FeedbackSim
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPosition
 | 
| Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to automatically move to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPositionInt
 | 
| Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to automatically move to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_DisableServo
 | 
| Disables a servo channel effectivly disabling the motor. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Connection Type
 | 
|  
 | 
 
 | 
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.  
 | 
 
 | 
Connections
 | 
 
 | 
Port
 | 
| Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
 | 
 
 | 
Servo
 | 
 
 | 
Trim
 | 
 
 | 
Pulse Width
 | 
 
 | 
Minimum (us)
 | 
| Shortest pulse width that will be used in microseconds. 
 | 
 
 | 
Maximum (us)
 | 
| Longest pulse width used for the PWM signals  in microseconds.. 
 | 
 
 | 
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. 
 | 
==Macro reference==
 
 | 
DCMotor_DC_Feedback
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Reverse
 | 
| Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Target position to move towards. Range: 0-255 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Enable
 | 
| Enables the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_DisableMotor
 | 
| Turn off the motor.  It will no longer respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_IncrementStep
 | 
| Move the motor forward by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_EnableServo
 | 
| Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeed
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - BYTE
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Target position to move towards. Range: 0-65535 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
DCMotor_Coast
 | 
| Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_IsAutoMoving
 | 
| Is the AutoMoveToPosition movement complete.   Returns 1 if the servos are still moving.  Returns 0 if all servo movement is complete. 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
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. 
 | 
  - BYTE
 | 
Channel
 | 
| Servo Motor Output Range: 0-7 
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Stepper_DecrementStep
 | 
| Move the motor backwards by one step. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPositionInt
 | 
| Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to jump to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetTrim
 | 
| Allows the level of trim for each servo channel to be adjusted progmatically. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - 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 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Break
 | 
| Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_Initialise
 | 
| Sets up the servo motor interrupts 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Forwards
 | 
| Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
 | 
  - UINT
 | 
Duty
 | 
| Sets the motor power for PWM or H-Bridge outputs 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetAutoMoveSpeedInt
 | 
| Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
 | 
  - UINT
 | 
Speed
 | 
| 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_Disable
 | 
| Disable the motor output 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Stepper_EnableMotor
 | 
| Turn on the motor.  This must be done before it will respond to any other macros. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_SetPosition
 | 
| Moves directly to the specified position with no interpolation.  
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to jump to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
DCMotor_DC_FeedbackSim
 | 
|  
 | 
  - BYTE
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPosition
 | 
| Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - BYTE
 | 
Position
 | 
| Position to automatically move to. Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_AutoMoveToPositionInt
 | 
| Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to assign the new position. Range: 0-7 
 | 
  - UINT
 | 
Position
 | 
| Position to automatically move to. Range: 0-65535 
 | 
  - VOID
 | 
Return
 | 
 
 | 
Servo_DisableServo
 | 
| Disables a servo channel effectivly disabling the motor. 
 | 
  - BYTE
 | 
Channel
 | 
| The channel to set the position for.  First channel is zero. 
 | 
  - VOID
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Connection Type
 | 
|  
 | 
 
 | 
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.  
 | 
 
 | 
Connections
 | 
 
 | 
Port
 | 
| Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
 | 
 
 | 
Servo
 | 
 
 | 
Trim
 | 
 
 | 
Pulse Width
 | 
 
 | 
Minimum (us)
 | 
| Shortest pulse width that will be used in microseconds. 
 | 
 
 | 
Maximum (us)
 | 
| Longest pulse width used for the PWM signals  in microseconds.. 
 | 
 
 | 
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. 
 |