Skip to main content

Precontrol

Struct Precontrol 

Source
pub struct Precontrol {
    pub fine_interpolation: bool,
    pub constant_inertia: bool,
    pub friction: Vec<[f64; 2]>,
    pub machine_friction: bool,
    pub balance_time: f64,
}
Expand description

What the drive does with the setpoints between and beside the gains, as a SINAMICS S120/S210 in DSC is set up. The default is the drive before 14 November 2026: setpoint held, rigid model, no friction, no balancing.

Fields§

§fine_interpolation: bool

effects.fine_interpolation: between profile cycles the position loop’s setpoint runs on from the last setpoints as pos + v t + a t^2 / 2, as the speed feedforward runs on as v + a t (its derivative), the drive’s fine interpolator. Off it is held for the profile cycle, as a position loop closed in the controller at the IPO cycle sees it.

§constant_inertia: bool

drive.torque_feedforward_model = “inertia”: the torque feedforward is one moment of inertia per motor times the motor’s acceleration setpoint (S120 p1498 with p1428 speed/torque precontrol), the inertia the rigid model has at the start pose; no gravity, no speed terms, no coupling. “rigid” (false): the rigid model’s inverse dynamics.

§friction: Vec<[f64; 2]>

effects.friction_feedforward: the friction characteristic, (speed rad/s, torque N m) points at rising speeds (S120 p3820-p3839); empty when off. See friction_at.

§machine_friction: bool

effects.friction_feedforward with drive.friction_feedforward_model = “machine”: in place of the characteristic, the friction of the machine’s own model at the planned speed (Machine::steady_friction, Drive::friction_ff).

§balance_time: f64

drive.precontrol_balance_s: the position setpoint passes a first-order lag of this time constant before the position loop compares it, so that it arrives with the motor that the speed precontrol moves through the closed speed loop (S120 p2536 balancing); 0 off.

Implementations§

Source§

impl Precontrol

Source

pub fn friction_at(&self, speed: f64) -> f64

The friction feedforward at a speed setpoint: linear between the points, from (0, 0) to the first, held beyond the last, with the sign of the speed.

Trait Implementations§

Source§

impl Clone for Precontrol

Source§

fn clone(&self) -> Precontrol

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Precontrol

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Precontrol

Source§

fn default() -> Precontrol

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Precontrol

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Precontrol

Source§

fn eq(&self, other: &Precontrol) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Precontrol

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Precontrol

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.