Component: Motor Base (Mechatronics)

From Flowcode Help
Revision as of 17:02, 11 November 2013 by JonnyW (talk | contribs) (XML import of component help)
Jump to navigationJump to search


Author Matrix Ltd
Version 1.0
Category Mechatronics


Image Motor Base component

Base component for constructing continuous motion - e.g. motors etc.

This component can be used as a base to create child components

The following components all inherit the traits of Motor Base:

-
Image Motor _ reversible Motor that can be driven at a prest speed in either forwards or reverse direction.

Properties support several pin options to allow matching with various hardware driving circuits. Can be connected to other objects to make them move.

Image Motor _ simple Simple motor turned on and off with a single pin connection.

Can be connected to other objects to make them move.

Examples

The following files provide examples of how to use this component:

[[Media:Example_Motor Reversable TEST.fcfx|Motor Reversable TEST.fcfx

[[Media:Example_Simple Motor TEST.fcfx|Simple Motor TEST.fcfx

Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

SetTarget

Set a target object external to the motor component.

This allows the motor to link "mechanically" to other components and

move them around.

Parameters

HANDLE Target
The object to set as a target


Return value

This call does not return a value


SetSpeed

Sets the speed for all attached objects. The speed will change at the rate set by the acceleration property.

Parameters

FLOAT Speed
World units or degrees per second.


Return value

This call does not return a value



Property reference

Frame Interval

This property is of type Unsigned integer and can be referenced with the variable name interval.

Time interval between animation frames.

Does not affect the speed of motion, only the rate of screen updates.

On Stop

This property is of type Fixed list of ints and can be referenced with the variable name on_stop.

Decide what action to take when simulation stops.

No Action - Animation is paused, continues from this position when simulation restarts

Return to start - all object returned to their start positions, current speed resumes on simulation start.

Clear speeds - objects retain their position, but speed is set to zero.

Return and clear - objects return to start position and have theri speed set to zero.

Target Object

This property is of type Panel object and can be referenced with the variable name target_object.

The object to be moved by the motor

Axis Object

This property is of type Panel object and can be referenced with the variable name axis_object.

No additional information


Axis

This property is of type Fixed list of ints and can be referenced with the variable name axis.

No additional information


Motion

This property is of type Fixed list of ints and can be referenced with the variable name motion_type.

No additional information


Acceleration

This property is of type Floating point and can be referenced with the variable name acceleration.

Amount of speed change allowed per second when the motor is powered.

Set to zero for instantaneous speed changes.

Deceleration

This property is of type Floating point and can be referenced with the variable name deceleration.

Amount of speed change allowed per second when power is removed and the motor is coasting.

Set to zero for instantaneous speed changes.