Jump to content

Component: Actuators (BL0127) (E-blocks 2): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(16 intermediate revisions by 3 users not shown)
Line 15: Line 15:
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.
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==
==Version information==
 
Library Version, Component Version, Date, Author, Info
4, 1.0, 08-05-25, BR, Added autodetect port on Ev_PostInitialise


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_EBlocks2_Actuators_BL0127.fcfx FC_Comp_Source_EBlocks2_Actuators_BL0127.fcfx]


==Detailed description==
==Detailed description==
Line 31: Line 33:




''No detailed description exists yet for this component''


==Examples==




Line 39: Line 39:




''No detailed description exists yet for this component''


==Examples==




Line 47: Line 49:




Sample program using the EBM020 - Infrared sensor.


Transmits a signal and determines distance from reflected value


{{Fcfile|EBM020 - Test Program.fcfx|EBM020 Example}}




==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_DC_Feedback'''
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Reverse'''
|-
| colspan="2" | Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Duty
|-
| colspan="2" | Sets the motor power for PWM or H-Bridge outputs 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_MoveToPosition'''
|-
| colspan="2" | 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. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Position
|-
| colspan="2" | Target position to move towards. Range: 0-255 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Enable'''
|-
| colspan="2" | Enables the motor output 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


Demo program using the Eblocks 2 Actuators Board BL0127 connected to BL0011 PIC programmer
{{Fcfile|BL0127 Actuators Demo PIC.fcfx|BL0127 Actuators Demo for PIC}}


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_DisableMotor'''
|-
| colspan="2" | Turn off the motor.  It will no longer respond to any other macros. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
==Macro reference==
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_IncrementStep'''
|-
| colspan="2" | Move the motor forward by one step. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_Break===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_EnableServo'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_Break'''
|-
|-
| colspan="2" | Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
| colspan="2" | Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to set the position for.  First channel is zero. 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetAutoMoveSpeed'''
|-
| colspan="2" | Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Speed
|-
|-
| colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 185: Line 82:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_Coast===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_MoveToPositionInt'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_Coast'''
|-
| colspan="2" | 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. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
|-
| colspan="2" | Target position to move towards. Range: 0-65535 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Coast'''
|-
|-
| colspan="2" | Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
| colspan="2" | Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
Line 221: Line 96:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_DC_Feedback===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_IsAutoMoving'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_DC_Feedback'''
|-
|-
| colspan="2" | Is the AutoMoveToPosition movement complete.  Returns 1 if the servos are still moving.  Returns 0 if all servo movement is complete. 
| colspan="2" |  
|-
|-
|-
|-
Line 234: Line 110:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_DC_FeedbackSim===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_IsServoAutoMoving'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_DC_FeedbackSim'''
|-
|-
| colspan="2" | 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. 
| colspan="2" |  
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Servo Motor Output Range: 0-7 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 252: Line 124:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_Disable===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_DecrementStep'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_Disable'''
|-
|-
| colspan="2" | Move the motor backwards by one step. 
| colspan="2" | Disable the motor output 
|-
|-
|-
|-
Line 265: Line 138:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_Enable===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetPositionInt'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_Enable'''
|-
|-
| colspan="2" | Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
| colspan="2" | Enables the motor output 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
|-
| colspan="2" | Position to jump to. Range: 0-65535 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetTrim'''
|-
| colspan="2" | Allows the level of trim for each servo channel to be adjusted progmatically. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to set the position for.  First channel is zero. 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Trim
|-
|-
| colspan="2" | Legacy: 0=0us, 1=+25us, 2=+50us, 3=+75us, 4=+100us, 5=-25us, 6=-50us, 7=-75us, 8=-100us or Smooth: 0-200 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 311: Line 152:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_Forwards===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Break'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_Forwards'''
|-
| colspan="2" | Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_Initialise'''
|-
| colspan="2" | Sets up the servo motor interrupts 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Forwards'''
|-
|-
| colspan="2" | Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
| colspan="2" | Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
Line 355: Line 171:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DCMotor_Reverse===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetAutoMoveSpeedInt'''
| width="90%" class="mtx-class-macrohead" | '''DCMotor_Reverse'''
|-
|-
| colspan="2" | Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
| colspan="2" | Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Speed
| width="90%" | Duty
|-
|-
| colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
| colspan="2" | Sets the motor power for PWM or H-Bridge outputs 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 373: Line 190:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_AutoMoveToPosition===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Disable'''
| width="90%" class="mtx-class-macrohead" | '''Servo_AutoMoveToPosition'''
|-
|-
| colspan="2" | Disable the motor output 
| colspan="2" | Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_EnableMotor'''
|-
| colspan="2" | Turn on the motor.  This must be done before it will respond to any other macros. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetPosition'''
|-
| colspan="2" | Moves directly to the specified position with no interpolation.  
|-
|-
|-
|-
Line 415: Line 207:
| width="90%" | Position
| width="90%" | Position
|-
|-
| colspan="2" | Position to jump to. Range: 0-255 
| colspan="2" | Position to automatically move to. Range: 0-255 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 422: Line 214:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_AutoMoveToPositionInt===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_DC_FeedbackSim'''
| width="90%" class="mtx-class-macrohead" | '''Servo_AutoMoveToPositionInt'''
|-
|-
| colspan="2" |  
| colspan="2" | Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_AutoMoveToPosition'''
|-
| colspan="2" | Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
|-
|-
|-
|-
Line 448: Line 228:
| colspan="2" | The channel to assign the new position. Range: 0-7 
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
| width="90%" | Position
|-
|-
| colspan="2" | Position to automatically move to. Range: 0-255 
| colspan="2" | Position to automatically move to. Range: 0-65535 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 458: Line 238:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_DisableServo===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_AutoMoveToPositionInt'''
| width="90%" class="mtx-class-macrohead" | '''Servo_DisableServo'''
|-
|-
| colspan="2" | Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
| colspan="2" | Disables a servo channel effectivly disabling the motor. 
|-
|-
|-
|-
Line 469: Line 250:
| width="90%" | Channel
| width="90%" | Channel
|-
|-
| colspan="2" | The channel to assign the new position. Range: 0-7 
| colspan="2" | The channel to set the position for. First channel is zero. 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
|-
| colspan="2" | Position to automatically move to. Range: 0-65535 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 481: Line 257:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_EnableServo===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_DisableServo'''
| width="90%" class="mtx-class-macrohead" | '''Servo_EnableServo'''
|-
|-
| colspan="2" | Disables a servo channel effectivly disabling the motor. 
| colspan="2" | Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
|-
|-
|-
|-
Line 499: Line 276:




 
===Servo_Initialise===
 
{| class="mtx-class-macrotable wikitable"
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Servo_Initialise'''
|-
|-
| colspan="2" | Sets up the servo motor interrupts 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Connection Type
|-
|-
| colspan="2" |  
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
|-
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
|}
| width="90%" | DC Feedback type
 
|-
| colspan="2" | 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.  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
|-
|-
| width="10%" align="center" | [[File:Fc9-type-19-icon.png]]
| width="90%" | Port
|-
| colspan="2" | Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Servo
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Trim
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pulse Width
|-
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Minimum (us)
|-
| colspan="2" | Shortest pulse width that will be used in microseconds. 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Maximum (us)
|-
| colspan="2" | Longest pulse width used for the PWM signals  in microseconds.. 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Period Multiplier
|-
| colspan="2" | 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==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_IsAutoMoving===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_DC_Feedback'''
| width="90%" class="mtx-class-macrohead" | '''Servo_IsAutoMoving'''
|-
|-
| colspan="2" |  
| colspan="2" | Is the AutoMoveToPosition movement complete.  Returns 1 if the servos are still moving.  Returns 0 if all servo movement is complete. 
|-
|-
|-
|-
Line 569: Line 304:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_IsServoAutoMoving===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Reverse'''
| width="90%" class="mtx-class-macrohead" | '''Servo_IsServoAutoMoving'''
|-
|-
| colspan="2" | Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. 
| colspan="2" | 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. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Duty
| width="90%" | Channel
|-
|-
| colspan="2" | Sets the motor power for PWM or H-Bridge outputs 
| colspan="2" | Servo Motor Output Range: 0-7 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_MoveToPosition===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_MoveToPosition'''
| width="90%" class="mtx-class-macrohead" | '''Servo_MoveToPosition'''
|-
|-
| colspan="2" | 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. 
| colspan="2" | 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. 
Line 610: Line 347:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_MoveToPositionInt===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Enable'''
| width="90%" class="mtx-class-macrohead" | '''Servo_MoveToPositionInt'''
|-
|-
| colspan="2" | Enables the motor output 
| colspan="2" | 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. 
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Channel
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | The channel to assign the new position. Range: 0-7 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_DisableMotor'''
|-
|-
| colspan="2" | Turn off the motor. It will no longer respond to any other macros. 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
|-
|-
| colspan="2" | Target position to move towards. Range: 0-65535 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_SetAutoMoveSpeed===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_IncrementStep'''
| width="90%" class="mtx-class-macrohead" | '''Servo_SetAutoMoveSpeed'''
|-
|-
| colspan="2" | Move the motor forward by one step. 
| colspan="2" | Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_EnableServo'''
|-
| colspan="2" | Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
| width="90%" | Speed
|-
|-
| colspan="2" | The channel to set the position for.  First channel is zero. 
| colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 667: Line 390:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_SetAutoMoveSpeedInt===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetAutoMoveSpeed'''
| width="90%" class="mtx-class-macrohead" | '''Servo_SetAutoMoveSpeedInt'''
|-
|-
| colspan="2" | Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
| colspan="2" | Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Speed
| width="90%" | Speed
|-
|-
Line 685: Line 409:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_SetPosition===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_MoveToPositionInt'''
| width="90%" class="mtx-class-macrohead" | '''Servo_SetPosition'''
|-
|-
| colspan="2" | 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. 
| colspan="2" | Moves directly to the specified position with no interpolation.  
|-
|-
|-
|-
Line 698: Line 423:
| colspan="2" | The channel to assign the new position. Range: 0-7 
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Position
| width="90%" | Position
|-
|-
| colspan="2" | Target position to move towards. Range: 0-65535 
| colspan="2" | Position to jump to. Range: 0-255 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Coast'''
|-
| colspan="2" | Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 721: Line 433:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_SetPositionInt===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_IsAutoMoving'''
|-
| colspan="2" | Is the AutoMoveToPosition movement complete.  Returns 1 if the servos are still moving.  Returns 0 if all servo movement is complete. 
|-
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" class="mtx-class-macrohead" | '''Servo_SetPositionInt'''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_IsServoAutoMoving'''
|-
| colspan="2" | 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. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Servo Motor Output Range: 0-7 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_DecrementStep'''
|-
| colspan="2" | Move the motor backwards by one step. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetPositionInt'''
|-
|-
| colspan="2" | Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
| colspan="2" | Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. 
Line 788: Line 457:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Servo_SetTrim===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetTrim'''
| width="90%" class="mtx-class-macrohead" | '''Servo_SetTrim'''
|-
|-
| colspan="2" | Allows the level of trim for each servo channel to be adjusted progmatically. 
| colspan="2" | Allows the level of trim for each servo channel to be adjusted progmatically. 
Line 811: Line 481:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Stepper_DecrementStep===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Break'''
| width="90%" class="mtx-class-macrohead" | '''Stepper_DecrementStep'''
|-
|-
| colspan="2" | Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
| colspan="2" | Move the motor backwards by one step. 
|-
|-
|-
|-
Line 824: Line 495:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Stepper_DisableMotor===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Stepper_DisableMotor'''
|-
|-
| colspan="2" | Sets up the servo motor interrupts 
| colspan="2" | Turn off the motor. It will no longer respond to any other macros. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Forwards'''
|-
| colspan="2" | Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Duty
|-
| colspan="2" | Sets the motor power for PWM or H-Bridge outputs 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetAutoMoveSpeedInt'''
|-
| colspan="2" | Sets the speed of the auto move to position macro.  Default speed is shown in the Servo_Period_Multiplier property. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Speed
|-
|-
| colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 873: Line 509:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Stepper_EnableMotor===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_Disable'''
| width="90%" class="mtx-class-macrohead" | '''Stepper_EnableMotor'''
|-
| colspan="2" | Disable the motor output 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stepper_EnableMotor'''
|-
|-
| colspan="2" | Turn on the motor.  This must be done before it will respond to any other macros. 
| colspan="2" | Turn on the motor.  This must be done before it will respond to any other macros. 
Line 899: Line 523:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Stepper_IncrementStep===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_SetPosition'''
| width="90%" class="mtx-class-macrohead" | '''Stepper_IncrementStep'''
|-
| colspan="2" | Moves directly to the specified position with no interpolation.  
|-
|-
| colspan="2" | Move the motor forward by one step. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Position
|-
| colspan="2" | Position to jump to. Range: 0-255 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DCMotor_DC_FeedbackSim'''
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_AutoMoveToPosition'''
|-
| colspan="2" | Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Position
|-
| colspan="2" | Position to automatically move to. Range: 0-255 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_AutoMoveToPositionInt'''
|-
| colspan="2" | Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to assign the new position. Range: 0-7 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
|-
| colspan="2" | Position to automatically move to. Range: 0-65535 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Servo_DisableServo'''
|-
| colspan="2" | Disables a servo channel effectivly disabling the motor. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | The channel to set the position for.  First channel is zero. 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 1,019: Line 555:
| colspan="2" | 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.  
| colspan="2" | 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.  
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 1,028: Line 564:
| colspan="2" | Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
| colspan="2" | Port C is not available on the Arduino shield, If port C is slected, it will default to port B. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Servo
| width="90%" class="mtx-class-propfolder" | Servo
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Trim
| width="90%" class="mtx-class-propfolder" | Trim
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pulse Width
| width="90%" class="mtx-class-propfolder" | Pulse Width
|-
|-
|-
|-
Line 1,055: Line 591:
| colspan="2" | 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. 
| colspan="2" | 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. 
|}
|}
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_EB_Actuators_BL0127.fcfx FC_Comp_Source_EB_Actuators_BL0127.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_EB_Actuators_BL0127.fcfx FC_Comp_Source_EB_Actuators_BL0127.fcfx]

Latest revision as of 14:37, 13 July 2026

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.

Version information

Library Version, Component Version, Date, Author, Info
4, 1.0, 08-05-25, BR, Added autodetect port on Ev_PostInitialise


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 BL0127 Actuators Demo for PIC


Macro reference

DCMotor_Break

DCMotor_Break
Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. 
- VOID Return


DCMotor_Coast

DCMotor_Coast
Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. 
- VOID Return


DCMotor_DC_Feedback

DCMotor_DC_Feedback
 
- BYTE Return


DCMotor_DC_FeedbackSim

DCMotor_DC_FeedbackSim
 
- BYTE Return


DCMotor_Disable

DCMotor_Disable
Disable the motor output 
- VOID Return


DCMotor_Enable

DCMotor_Enable
Enables the motor output 
- VOID Return


DCMotor_Forwards

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


DCMotor_Reverse

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_AutoMoveToPosition

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

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

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


Servo_EnableServo

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_Initialise

Servo_Initialise
Sets up the servo motor interrupts 
- VOID Return


Servo_IsAutoMoving

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

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


Servo_MoveToPosition

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


Servo_MoveToPositionInt

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


Servo_SetAutoMoveSpeed

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_SetAutoMoveSpeedInt

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


Servo_SetPosition

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


Servo_SetPositionInt

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

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


Stepper_DecrementStep

Stepper_DecrementStep
Move the motor backwards by one step. 
- VOID Return


Stepper_DisableMotor

Stepper_DisableMotor
Turn off the motor. It will no longer respond to any other macros. 
- VOID Return


Stepper_EnableMotor

Stepper_EnableMotor
Turn on the motor. This must be done before it will respond to any other macros. 
- VOID Return


Stepper_IncrementStep

Stepper_IncrementStep
Move the motor forward by one step. 
- 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. 

Component Source Code

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

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