run

ivanmason/accelstepper/run

Poll the motor and step it if a step is due, implementing accelerations and decelerations to acheive the target position. You must call this as frequently as possible, but at least once per minimum step time interval, preferably in your main loop. Note that each call to run() will make at most one step, and then only when a step is due, based on the current speed and the time since the last step.
run
@/run
Poll the motor and step it if a step is due, implementing accelerations and decelerations to acheive the target position. You must call this as frequently as possible, but at least once per minimum step time interval, preferably in your main loop. Note that each call to run() will make at most one step, and then only when a step is due, based on the current speed and the time since the last step.
DEV@/accelstepper-device
UPDpulse
run
DEV
UPD
RUNING
DONE
DONEpulse
RUNINGboolean
true if the motor is still running to the target position.
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) {
    if (!isInputDirty<input_UPD>(ctx))
        return;

    auto stepper = getValue<input_DEV>(ctx);
    bool runing = stepper->run();

    emitValue<output_RUNING>(ctx, runing ? 1 : 0);
    
    emitValue<output_DONE>(ctx, 1);
}