Difference between revisions of "Component: Actuators (BL0127) (E-blocks 2)"
From Flowcode Help
Jump to navigationJump to search| Line 66: | Line 66: | ||
{{Fcfile|EBM020 - Test Program.fcfx|EBM020 Example}} | {{Fcfile|EBM020 - Test Program.fcfx|EBM020 Example}} | ||
| + | |||
| + | |||
| Line 72: | Line 74: | ||
==Macro reference== | ==Macro reference== | ||
| + | ===DCMotor_DC_Feedback=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 85: | Line 88: | ||
| + | ===DCMotor_Reverse=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 103: | Line 107: | ||
| + | ===Servo_MoveToPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 126: | Line 131: | ||
| + | ===DCMotor_Enable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 139: | Line 145: | ||
| + | ===Stepper_DisableMotor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 152: | Line 159: | ||
| + | ===Stepper_IncrementStep=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 165: | Line 173: | ||
| + | ===Servo_EnableServo=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 183: | Line 192: | ||
| + | ===Servo_SetAutoMoveSpeed=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 201: | Line 211: | ||
| + | ===Servo_MoveToPositionInt=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 224: | Line 235: | ||
| + | ===DCMotor_Coast=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 237: | Line 249: | ||
| + | ===Servo_IsAutoMoving=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 250: | Line 263: | ||
| + | ===Servo_IsServoAutoMoving=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 268: | Line 282: | ||
| + | ===Stepper_DecrementStep=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 281: | Line 296: | ||
| + | ===Servo_SetPositionInt=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 304: | Line 320: | ||
| + | ===Servo_SetTrim=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 327: | Line 344: | ||
| + | ===DCMotor_Break=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 340: | Line 358: | ||
| + | ===Servo_Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 353: | Line 372: | ||
| + | ===DCMotor_Forwards=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 371: | Line 391: | ||
| + | ===Servo_SetAutoMoveSpeedInt=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 389: | Line 410: | ||
| + | ===DCMotor_Disable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 402: | Line 424: | ||
| + | ===Stepper_EnableMotor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 415: | Line 438: | ||
| + | ===Servo_SetPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 438: | Line 462: | ||
| + | ===DCMotor_DC_FeedbackSim=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 451: | Line 476: | ||
| + | ===Servo_AutoMoveToPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 474: | Line 500: | ||
| + | ===Servo_AutoMoveToPositionInt=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 497: | Line 524: | ||
| + | ===Servo_DisableServo=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Revision as of 11:49, 3 February 2023
| Author | Matrix TSL |
| Version | 1.0 |
| Category | E-blocks 2 |
Contents
- 1 Actuators component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 DCMotor_DC_Feedback
- 5.2 DCMotor_Reverse
- 5.3 Servo_MoveToPosition
- 5.4 DCMotor_Enable
- 5.5 Stepper_DisableMotor
- 5.6 Stepper_IncrementStep
- 5.7 Servo_EnableServo
- 5.8 Servo_SetAutoMoveSpeed
- 5.9 Servo_MoveToPositionInt
- 5.10 DCMotor_Coast
- 5.11 Servo_IsAutoMoving
- 5.12 Servo_IsServoAutoMoving
- 5.13 Stepper_DecrementStep
- 5.14 Servo_SetPositionInt
- 5.15 Servo_SetTrim
- 5.16 DCMotor_Break
- 5.17 Servo_Initialise
- 5.18 DCMotor_Forwards
- 5.19 Servo_SetAutoMoveSpeedInt
- 5.20 DCMotor_Disable
- 5.21 Stepper_EnableMotor
- 5.22 Servo_SetPosition
- 5.23 DCMotor_DC_FeedbackSim
- 5.24 Servo_AutoMoveToPosition
- 5.25 Servo_AutoMoveToPositionInt
- 5.26 Servo_DisableServo
- 6 Property reference
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
Macro reference
DCMotor_DC_Feedback
| DCMotor_DC_Feedback | |
| Return | |
DCMotor_Reverse
Servo_MoveToPosition
DCMotor_Enable
| DCMotor_Enable | |
| Enables the motor output | |
| Return | |
Stepper_DisableMotor
| Stepper_DisableMotor | |
| Turn off the motor. It will no longer respond to any other macros. | |
| Return | |
Stepper_IncrementStep
| Stepper_IncrementStep | |
| Move the motor forward by one step. | |
| Return | |
Servo_EnableServo
Servo_SetAutoMoveSpeed
Servo_MoveToPositionInt
DCMotor_Coast
| DCMotor_Coast | |
| Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. | |
| 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. | |
| Return | |
Servo_IsServoAutoMoving
Stepper_DecrementStep
| Stepper_DecrementStep | |
| Move the motor backwards by one step. | |
| Return | |
Servo_SetPositionInt
Servo_SetTrim
DCMotor_Break
| DCMotor_Break | |
| Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. | |
| Return | |
Servo_Initialise
| Servo_Initialise | |
| Sets up the servo motor interrupts | |
| Return | |
DCMotor_Forwards
Servo_SetAutoMoveSpeedInt
DCMotor_Disable
| DCMotor_Disable | |
| Disable the motor output | |
| Return | |
Stepper_EnableMotor
| Stepper_EnableMotor | |
| Turn on the motor. This must be done before it will respond to any other macros. | |
| Return | |
Servo_SetPosition
DCMotor_DC_FeedbackSim
| DCMotor_DC_FeedbackSim | |
| Return | |
Servo_AutoMoveToPosition
Servo_AutoMoveToPositionInt
Servo_DisableServo
| Servo_DisableServo | |
| Disables a servo channel effectivly disabling the motor. | |
| Channel | |
| The channel to set the position for. First channel is zero. | |
| Return | |