Motor (hwx.inspire.motion)¶
Creates a Motor.
Motors drive parts in a rotational manner, and can be defined in terms of angle, speed, acceleration, or torque. It’s a convenient way to apply a time-dependent torque to your model.
- Inherits:
MotionConnector (hwx.inspire.motion)
Attributes¶
active: Bool
averageValue: EnumUnion (type)
baseScale: Double
bodyType: Enum
centerlineJoint: Enum
clevisPinHoles: Attribute
connectionRadius: Double
controller: Bool
controllerType: Enum
cyclic: Double
direction: Direction
dtValue: Double
duration: Double
dwellTime: Double
dwellX: Attribute
dxValue: Attribute
entity1: Attribute
entity2: Attribute
finalFrequency: Double
flipAxis: Bool
frequency: Double
function: Enum
icVelocity: Double
indVarComp: Enum
indVarEntity: Attribute
initialFrequency: Double
kd: Double
ki: Double
kp: Double
location1: Location
location2: Location
locked: Bool
mountColor: Color
name: Attribute
overrideConnRadius: Bool
parts: Attribute
penalty: Double
penalty1: Double
phaseShift: Double
profile: Attribute
profileMode: Enum
restrainCenterline: Bool
reverseDirection: Bool
rotation: Double
sdProfile: Attribute
shaftColor: Color
shaftRadius: Double
shaftRotation: Double
span: Attribute
spline: Attribute
splineMethod: Enum
startTime: Double
stepOff: Attribute
stepOn: Attribute
sweepInterval: Double
type: Enum
userFunction: Attribute
userFunctionScale: Double
userFunctionUnits: Attribute
value: EnumUnion (type)
visible: Bool
x0: Attribute
x1: Attribute
y0: EnumUnion (type)
y1: EnumUnion (type)
Properties¶
Public Methods¶
classmethod isValidConnection (cls, connection)
getRotationalValue (self)
getShaftRadius (self)
Attribute Details¶
active : Bool¶
Returns or sets the object activeness.
Setting this on or off sets all children. Setting to True sets all the parents active too.
averageValue : EnumUnion (type)¶
The average value for the motor when the function is set to Oscillating, defaults to 0.
baseScale : Double¶
Use to change the appearance of the motor shaft and base.
The baseScale property allows you to change the size of the motor; enter a value between 0.5 and 2.0, defaults to 1.
bodyType : Enum (SERVO, FRONT, BACK, MOUNT)¶
Specifies the body type of the motor.
The body type can be Servo, Front Facing, Back Facing, With Mount.
centerlineJoint : Enum (CYLINDRICAL, REVOLUTE)¶
Specifies what type of joint to be created if Restrain Centerline is enabled.
clevisPinHoles : Attribute¶
Lists all the cylindrical features from a clevis pin part, that has 3 aligned holes and outside two holes are in the same part.
connectionRadius : Double (units=”length”)¶
Specifies the radius of the connection.
controller : Bool¶
If True, sets the behavior of the Motor specified by function and value properties, else the behavior of the motor will be driven with hand of god type motion.
controllerType : Enum (PID, SOFT_CONSTRAINT)¶
The type of controller used to achieve the behavior specified by function and value. Controller type can be PID or Soft Constraint.
Specifiable when motor is of type Displacement or Velocity and controller is set to True.
cyclic : Double¶
The number of revolution of State dependent variable, when the variable component is cyclic motion.
direction : Direction¶
The direction of the motor wrt shaftConnection.
dtValue : Double (units=”time”)¶
Specifies the amount of time allowed to blend in and out of the motor profile.
Specifiable when function is set to Single Wave, Oscillating and Table.
duration : Double (units=”time”)¶
The amount of time the function will take for Step and Impulse.
For Ramp function duration is defined as the amount of time taken by the motor to achieve the value, defaults to 0.5 s.
dwellTime : Double (units=”time”)¶
The amount time of the motor profile dwells.
Specifiable when function is set to Step Dwell Step, defaults to 1 s.
dwellX : Attribute¶
The amount x of the motor profile dwells.
Specifiable when function is set to Step Dwell Step, defaults to 1 s.
dxValue : Attribute¶
Specifies the amount of x allowed to blend in and out of the motor profile.
Specifiable when function is set to Single Wave, Oscillating and Table.
entity1 : Attribute¶
The feature entity motor is attached to.
entity2 : Attribute¶
The second feature entity motor is attached to.
finalFrequency : Double (units=”frequency”)¶
The final frequency for the motor function Swept Sine, defaults to 1Hz.
flipAxis : Bool¶
Allows to flip the axis of the object.
frequency : Double (units=”frequency”)¶
Specifies the frequency value in Hz, when the function is set to Oscillating, defaults to 1Hz.
function : Enum¶
The type of profile function to change how the shaft rotates as time elapses.
The function can be a Step, Step Dwell Step, Single Wave, Oscillating, Swept Sine, Impulse, Ramp, Solver Expression and Table, defaults to Step.
icVelocity : Double (units=”ang_velocity”)¶
The initial angular velocity of the motor, defaults to 0 rpm.
This is specifiable when the type of motor is Acceleration.
indVarComp : Enum¶
indVarEntity : Attribute¶
initialFrequency : Double (units=”frequency”)¶
The initial frequency for the motor function Swept Sine, defaults to 1Hz.
kd : Double¶
The derivative action of a PID controller enhances stability of the control system by predicting the future behavior.
ki : Double¶
This term multiplied by accumulated error represents the integral term of a PID. Having an integral term minimizes the steady state error.
kp : Double¶
The amount of restoring force that should be applied to overcome position error. Specifiable only when controller type is set to PID.
location1 : Location (units=”length”)¶
The location of the motor wrt shaftConnection.
location2 : Location (units=”length”)¶
The location of the motor wrt mounttConnection.
locked : Bool¶
If True, the motor does not rotate during a Motion Analysis (useful for debugging), defaults to False.
mountColor : Color¶
Specifies the color of the motor mount.
name : Attribute¶
Returns or sets the name of the object.
It can be any text string, including spaces, although it’s best to avoid using the following characters: ” ‘ * ? and $.
While these characters are allowed, they could create difficulties when you export the model to other applications.
overrideConnRadius : Bool¶
Allows to override default connection radius value.
parts : Attribute¶
Lists all the parts the object is attached to.
penalty : Double (units=”torsion_stiffness”)¶
The proportional factor used in the calculation of the restoring force.
Specifiable only when controller type is set to Soft Constraint.
penalty1 : Double (units=”torsion_damping”)¶
The derivative factor used in the calculation of the restoring force.
Specifiable only when controller type is set to Soft Constraint.
phaseShift : Double (units=”angle”)¶
The angular phase shift of the motor when the function is set to Oscillating, defaults to 0 deg.
profile : Attribute¶
profileMode : Enum (TIME, STATE)¶
restrainCenterline : Bool¶
Use to restrain the axis of the motor so it does not move relative to the motor base (or the ground part if no second part is defined).
Choices are Cylindrical or Revolute.
By default, this property is enabled for a motor attached to holes, and disabled for motors attached to surfaces. Disabling this option may result in unexpected part movement, warnings, or errors.
reverseDirection : Bool¶
If True, reverses the direction of the rotational force, defaults to False.
rotation : Double (units=”angle”)¶
The rotational offset of the motor base, defaults to 0 deg.
sdProfile : Attribute¶
shaftColor : Color¶
Specifies the color of the motor shaft.
shaftRadius : Double (units=”length”)¶
Use to adjust the overall size of the motor shaft. This property is not available for motors applied to holes.
shaftRotation : Double (units=”angle”)¶
The rotational offset of the motor shaft, defaults to 0 deg.
span : Attribute¶
Specifies the duration of the oscillation, when the function is set to Oscillating or Single Wave.
spline : Attribute¶
splineMethod : Enum (AKIMA, CUBIC, LINEAR)¶
Specifies the interpolation method for the motor profile.
Interpolation methods can be Akima, Cubic, Linear. Specifiable when function is set to Table.
startTime : Double (units=”time”)¶
The time at which the motor begins to rotate move during a Motion Analysis.
This is not specifiable when motor function is of type Solver Expression.
stepOff : Attribute¶
The amount of x taken to ramp up the Step Dwell Step function
stepOn : Attribute¶
The amount of x taken to ramp up the Step Dwell Step function
sweepInterval : Double (units=”time”)¶
The amount of time that should be spent transitioning between the initialFrequency and finalFrequency of a Swept Sine function, defaults to 1s.
type : Enum (ANGLE, SPEED, ACCELERATION, TORQUE)¶
Specifies the type of motor, it can be Speed, Angle, Acceleration and Torque. Defaults to a Speed motor.
userFunction : Attribute¶
A motionsolve user expression that will define the behavior of the motor.
Specifiable when function is set to Solver Expression, defaults to TIME.
userFunctionScale : Double¶
The scaling factor for the user expression.
Specifiable when function is set to Solver Expression.
userFunctionUnits : Attribute¶
The units for the user expression.
Specifiable when function is set to Solver Expression.
value : EnumUnion (type)¶
Specifies the absolute rotational value of the motor depending of its type. If type of motor is:
Angle then the default value is 45 deg,
Speed then the default value is 60 rpm,
Acceleration then the default value is 1 rad/s2,
Torque then the default value is 1 N*m.
visible : Bool¶
Determines whether the object is visible in the graphics window.
Setting this on or off sets all children. Setting to True sets all the parents visible too.
x0 : Attribute¶
x1 : Attribute¶
y0 : EnumUnion (type)¶
y1 : EnumUnion (type)¶
Property Details¶
- property baseRotation¶
The rotational offset of the motor base, defaults to 0 deg.
- property mountConnection¶
The second feature entity motor is attached to.
- property shaftConnection¶
The feature entity motor is attached to.
- property shaftDirection¶
The direction of the motor wrt shaftConnection.
- property shaftLocation¶
The location of the motor wrt shaftConnection.
Method Details¶
- classmethod isValidConnection(cls, connection)¶
Determines if a motor can be created from the Joint.
- param connection
A joint object.
- type connection
Joint
- returns
A valid joint connection.
- rtype
bool
- getRotationalValue(self)¶
Returns the speed angle or acceleration depending on the type of motor.
- getShaftRadius(self)¶
Return the shafts hole radius or the computed radius.