pub struct PressureControlConfig {Show 13 fields
pub kp: f64,
pub ki: f64,
pub kd: f64,
pub feed_forward: f64,
pub max_step: f64,
pub min_step: f64,
pub max_integral: f64,
pub filter_alpha: f64,
pub invert_direction: bool,
pub tolerance: f64,
pub settling_time: f64,
pub position_limit_pos: Option<f64>,
pub position_limit_neg: Option<f64>,
}Expand description
Configuration for the Pressure Control function block.
Fields§
§kp: f64Proportional gain (Kp).
ki: f64Integral gain (Ki).
kd: f64Derivative gain (Kd).
feed_forward: f64Feed forward value added directly to the output.
max_step: f64Maximum allowed position delta (in user units) per tick. Critical for safety to prevent crushing the load cell. E.g., 0.001 inches per ms tick.
min_step: f64Sub-threshold deadband. When the computed step is smaller than
min_step we skip the move_absolute call entirely. Keeps the
EtherCAT bus quiet near steady state. Set to 0 to issue a move
every tick regardless of step size.
max_integral: f64Maximum accumulated integral windup.
filter_alpha: f64Exponential Moving Average filter coefficient for the load cell (0.0 to 1.0). 1.0 = No filtering (raw data). 0.1 = Heavy filtering.
invert_direction: boolIf true, a positive error (need more pressure) results in a negative move. Set to true if moving the axis down (negative) increases compression.
tolerance: f64The acceptable load error window to be considered “in tolerance” (e.g., +/- 2.0 lbs).
settling_time: f64How long the load must remain within tolerance before reporting in_tolerance = true.
position_limit_pos: Option<f64>Optional hard ceiling on commanded_position in user units. If the
loop’s integrator drives the commanded position past this, the
commanded position is clamped and the integral is frozen that tick
(extra anti-windup). None disables the clamp.
position_limit_neg: Option<f64>Optional hard floor on commanded_position. Mirror of
position_limit_pos.
Trait Implementations§
Source§impl Clone for PressureControlConfig
impl Clone for PressureControlConfig
Source§fn clone(&self) -> PressureControlConfig
fn clone(&self) -> PressureControlConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more