multimoveto

ivanmason/accelstepper/multimoveto

Set the target positions of all managed steppers according to a coordinate array. New speeds will be computed for each stepper so they will all arrive at their respective targets at very close to the same time.
multimoveto
@/multimoveto
Set the target positions of all managed steppers according to a coordinate array. New speeds will be computed for each stepper so they will all arrive at their respective targets at very close to the same time.
MDEV@/multistepper-device
MPOSI@/multiposition
An array of desired absolute stepper positions. absolute[0] will be used to set the absolute position of the first stepper added by addStepper() etc. The array must be at least as long as the number of steppers that have been added by addStepper, else results are undefined.
UPDpulse
multimoveto
MDEV
MPOSI
UPD
DONE
DONEpulse
To use the node in your project you should have the ivanmason/accelstepper library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    auto _positions = getValue<input_MPOSI>(ctx);
    auto multistepper = getValue<input_MDEV>(ctx);

    if (!isInputDirty<input_UPD>(ctx))
        return;
    
    multistepper->moveTo(_positions.position);
    
    emitValue<output_DONE>(ctx, 1);

}