2021.1.1560.3 Driven Stepper Motor
Overview
The Driven Stepper Motor is a component to simulate an accelerated rotational motion on an axis. It consists of two components; Physical and Logic. Both are needed to control the motor through a logic adapter (connecting the Driven Stepper Motor to an external controller through a Logic Simulator). Adding a Control Panel gives you the option to control the motor from the Unity scene.
Cannot rotated more then 180 degrees in single tick.
A succesfully created Driven Stepper Motor shows up with this gizmo.
Where to find
The Driven Stepper Motor can be found under
Standard Components > Motors > Driven Stepper Motor > Add Physical Component
It will automatically be attached to a selected GameObject. Otherwise it will create a new GameObject to attach to.
A WheelJoint will be created automatically as part of the component.
Feature Layout - Physical Component
Live Data |
|
---|---|
Preferred Velocity (deg/s) | Displays the current preferred velocity in degrees per second. |
Target Step | Displays the step the Driven Stepper Motor will rotate to. |
Continuous | Displays whether continuous rotation is enabled (True) or disable (False). |
Continuous Direction | Displays the rotation direction in which the Driven Stepper Motor will rotate when Continuous rotation is enabled. CW = Clockwise, CCW = Counter Clockwise. |
Velocity (deg/s) | Displays the current angular velocity in degrees per second. |
Position (deg) | Displays the current angle in degrees. |
State | Displays whether the Driven Stepper Motor is Active, Inactive or in Error State. |
Properties |
|
Wheel Joint | Sets the Wheel Joint the Driven Stepper Motor will control. |
Step Count | Displays the amount of steps in a full rotation. |
Max Velocity (deg/s) | Sets the maximum allowed velocity of the Driven Stepper Motor in degrees per second. |
Acceleration (deg/s/s) | Sets the maximum allowed acceleration of the Driven Stepper Motor in degrees per second per second. |
Zero Offset (deg) | Sets the zero position of the Driven Stepper Motor relative to the zero position of its Wheel Joint. |
Set current position as zero offset | Sets the current position as the new zero position. |
Control Panel |
|
Generate Control Panel for Driven Stepper Motor | Create a Control Panel for this component |
Feature Layout - Control Panel
Title | The Title of the Control Panel. Click to ping the target component in the hierarchy. Double click to edit. |
DrivenServoMotor Properties |
|
Preferred Velocity (deg/s) | Sets the desired velocity at which the DCMotor should spin. |
Target Step | Sets the step the Driven Stepper Motor will rotate to. |
Continuous | Whether continuous rotation is enabled (True) or disable (False). |
Continuous Direction | Sets the rotation direction in which the Driven Servo Motor will rotate when Continuous rotation is enabled. CW = Clockwise, CCW = Counter Clockwise. |
Velocity (deg/s) | Displays current velocity in degrees per second. |
Position (deg) | Displays the current angle in degrees. |
Position (step) | Displays the current step. |
Start/Stop | Starts/Stops the motor. |
Target Component |
|
Target Gameobject | The gameobject which has a standardcomponent you want the Control Panel for. |
Target Component | The Component which for which a Control Panel is generated. |
How to use
Add a Driven Stepper Component to a GameObject, in this case a simple cube.
Add a Kinematics Controller, this can be found under Mechanics > Kinematics > Add Kinematics Controller. Make sure the Cube is parented under the Kinematic Controller in the Hierarchy.
Add a Control Panel and set the desired settings.
Press Play to see the rotation of the cube, controlled by the DrivenStepperMotor
Prespective Documentation