This lets a Solenoid act like an axis. It will be active when the machine position of the axis is above 0.0. This can be inverted with the direction_invert: value. If inverted, it will be active at below 0.0.
When active the PWM will come on at the pull_percent value. After pull_ms time, it will change to the hold_percent value. This can be used to keep the coil cooler.
The feature runs on a 50ms update timer. The solenoid should react within 50ms of the position. The pull_ms also used that 50ms update resolution. The PWM can be inverted using the :low attribute on the output pin. This inverts the signal in case you need it. It is not used to invert the direction logic.
The axis position still respects your speed and acceleration and other axis coordination. If you go from Z0 to Z5, it will activate as soon as it goes above 0. If you G0 from Z5 to Z0, it will not deactivate until it gets to Z0.
Shares output_pin with RC Servo, plus:
1000PWM frequency driving the solenoid.
0.0Duty cycle while off.
100.0Duty cycle during the initial pull-in (highest power, to overcome the solenoid's resting inertia).
75.0Duty cycle after pull-in, while holding the solenoid engaged -- typically lower than pull_percent, since holding a solenoid needs less power than pulling it in.
500How long the pull_percent duty cycle is applied before switching to hold_percent.
falseInverts which side of the axis's mpos 0.0 counts as "active" -- normally active above 0.0, inverted means active below 0.0.
50Update interval, in milliseconds, for the solenoid's PWM state machine (pull/hold timing). The solenoid should react within this long of a position change; pull_ms is also quantized to this resolution.
z:
steps_per_mm: 100.000
max_rate_mm_per_min: 5000.000
acceleration_mm_per_sec2: 100.000
max_travel_mm: 5.000
soft_limits: false
homing:
cycle: 1
positive_direction: true
mpos_mm: 5.000
motor0:
solenoid:
output_pin: gpio.26
pwm_hz: 5000
off_percent: 0.000
pull_percent: 100.000
hold_percent: 20.000
pull_ms: 1000
direction_invert: false