Struct ev3dev_lang_rust::tacho_motor::LargeMotor[][src]

pub struct LargeMotor { /* fields omitted */ }

Methods

impl LargeMotor
[src]

Try to get a LargeMotor on the given port. Returns None if port is not used or another device is connected.

Try to find a LargeMotor. Only returns a motor if their is exactly one connected, None otherwise.

Trait Implementations

impl Motor for LargeMotor
[src]

impl TachoMotor for LargeMotor
[src]

Returns the number of tacho counts in one rotation of the motor. Tacho counts are used by the position and speed attributes, so you can use this value to convert from rotations or degrees to tacho counts. (rotation motors only) Read more

Returns the number of tacho counts in one meter of travel of the motor. Tacho counts are used by the position and speed attributes, so you can use this value to convert from distance to tacho counts. (linear motors only) Read more

Returns the number of tacho counts in the full travel of the motor. When combined with the count_per_m atribute, you can use this value to calculate the maximum travel distance of the motor. (linear motors only) Read more

Returns the current duty cycle of the motor. Units are percent. Values are -100 to 100.

Returns the current duty cycle setpoint of the motor. Units are in percent. Valid values are -100 to 100. A negative value causes the motor to rotate in reverse. Read more

Sets the duty cycle setpoint of the motor. Units are in percent. Valid values are -100 to 100. A negative value causes the motor to rotate in reverse. Read more

Returns the current polarity of the motor.

Sets the polarity of the motor.

Returns the current position of the motor in pulses of the rotary encoder. When the motor rotates clockwise, the position will increase. Likewise, rotating counter-clockwise causes the position to decrease. The range is -2,147,483,648 and +2,147,483,647 tachometer counts (32-bit signed integer) Read more

Sets the current position of the motor in pulses of the rotary encoder. When the motor rotates clockwise, the position will increase. Likewise, rotating counter-clockwise causes the position to decrease. The range is -2,147,483,648 and +2,147,483,647 tachometer counts (32-bit signed integer) Read more

Returns the proportional constant for the position PID.

Sets the proportional constant for the position PID.

Returns the integral constant for the position PID.

Sets the integral constant for the position PID.

Returns the derivative constant for the position PID.

Sets the derivative constant for the position PID.

Returns the maximum value that is accepted by the speed_sp attribute. This value is the speed of the motor at 9V with no load. Note: The actual maximum obtainable speed will be less than this and will depend on battery voltage and mechanical load on the motor. Read more

Returns the current target position for the run-to-abs-pos and run-to-rel-pos commands. Units are in tacho counts. You can use the value returned by counts_per_rot to convert tacho counts to/from rotations or degrees. The range is -2,147,483,648 and +2,147,483,647 tachometer counts (32-bit signed integer). Read more

Sets the target position for the run-to-abs-pos and run-to-rel-pos commands. Units are in tacho counts. You can use the value returned by counts_per_rot to convert tacho counts to/from rotations or degrees. The range is -2,147,483,648 and +2,147,483,647 tachometer counts (32-bit signed integer). Read more

Returns the current motor speed in tacho counts per second. Note, this is not necessarily degrees (although it is for LEGO motors). Use the count_per_rot attribute to convert this value to RPM or deg/sec. Read more

Returns the target speed in tacho counts per second used for all run-* commands except run-direct. A negative value causes the motor to rotate in reverse with the exception of run-to-*-pos commands where the sign is ignored. Use the count_per_rot attribute to convert RPM or deg/sec to tacho counts per second. Use the count_per_m attribute to convert m/s to tacho counts per second. Read more

Sets the target speed in tacho counts per second used for all run-* commands except run-direct. A negative value causes the motor to rotate in reverse with the exception of run-to-*-pos commands where the sign is ignored. Use the count_per_rot attribute to convert RPM or deg/sec to tacho counts per second. Use the count_per_m attribute to convert m/s to tacho counts per second. Read more

Returns the current ramp up setpoint. Units are in milliseconds and must be positive. When set to a non-zero value, the motor speed will increase from 0 to 100% of max_speed over the span of this setpoint. The actual ramp time is the ratio of the difference between the speed_sp and the current speed and max_speed multiplied by ramp_up_sp. Values must not be negative. Read more

Sets the ramp up setpoint. Units are in milliseconds and must be positive. When set to a non-zero value, the motor speed will increase from 0 to 100% of max_speed over the span of this setpoint. The actual ramp time is the ratio of the difference between the speed_sp and the current speed and max_speed multiplied by ramp_up_sp. Values must not be negative. Read more

Returns the current ramp down setpoint. Units are in milliseconds and must be positive. When set to a non-zero value, the motor speed will decrease from 100% down to 0 of max_speed over the span of this setpoint. The actual ramp time is the ratio of the difference between the speed_sp and the current speed and 0 multiplied by ramp_down_sp. Values must not be negative. Read more

Sets the ramp down setpoint. Units are in milliseconds and must be positive. When set to a non-zero value, the motor speed will decrease from 100% down to 0 of max_speed over the span of this setpoint. The actual ramp time is the ratio of the difference between the speed_sp and the current speed and 0 multiplied by ramp_down_sp. Values must not be negative. Read more

Returns the proportional constant for the speed regulation PID.

Sets the proportional constant for the speed regulation PID.

Returns the integral constant for the speed regulation PID.

Sets the integral constant for the speed regulation PID.

Returns the derivative constant for the speed regulation PID.

Sets the derivative constant for the speed regulation PID.

Returns a list of state flags.

Returns the current stop action. The value determines the motors behavior when command is set to stop. Read more

Sets the stop action. The value determines the motors behavior when command is set to stop. Read more

Returns a list of stop actions supported by the motor controller.

Returns the current amount of time the motor will run when using the run-timed command. Units are in milliseconds. Values must not be negative. Read more

Sets the amount of time the motor will run when using the run-timed command. Units are in milliseconds. Values must not be negative. Read more

impl Device for LargeMotor
[src]

Returns the name of the port that the motor is connected to.

Sends a command to the device controller.

Returns a space separated list of commands that are supported by the device controller.

Returns the name of the driver that provides this device.

Auto Trait Implementations

impl Send for LargeMotor

impl Sync for LargeMotor