diff --git a/src/device.stepperdriver b/src/device.stepperdriver index 1b796cc5..4ac77dd2 160000 --- a/src/device.stepperdriver +++ b/src/device.stepperdriver @@ -1 +1 @@ -Subproject commit 1b796cc5004e6c2f8c7f39e14e22d9b51ce7400d +Subproject commit 4ac77dd27b6c1e2ef60f9ebf8d3fc71a6534f99d diff --git a/tutorials/stepperdriver-configuration.md b/tutorials/stepperdriver-configuration.md new file mode 100644 index 00000000..a1a4aa3a --- /dev/null +++ b/tutorials/stepperdriver-configuration.md @@ -0,0 +1,132 @@ +# Configure Driver + +Configuration parameters must be set for the [Harp StepperDriver](https://github.com/harp-tech/device.stepperdriver) before it can be used to drive stepper motors. + +> [!WARNING] +> When adding these operators to the workflow, make sure to use the device-specific versions, e.g. `Device (Harp.StepperDriver)` instead of `Device (Harp)`. If correctly selected, the names of these operators in the workflow panel will change to reflect either the name of the device or the selected register/payload. + +## Prerequisites + +- Install the `Bonsai.Windows.Input` package from the Bonsai [package manager](https://bonsai-rx.org/docs/articles/packages.html). +- The steps listed below demonstrate driver configuration for a single stepper motor (`Motor1`) connected to the `Stepper 1` output on the `StepperDriver`. Adjust the relevant properties for your specific configuration. + +## Device pattern + +Set up the standard Harp [device pattern](../articles/operators.md#device-pattern) to initialize the device, broadcast events, and send commands to the `StepperDriver`. + +:::workflow +![StepperDriver Device Pattern](../workflows/stepperdriver-configuration-devicepattern.bonsai) +::: + +- Insert a [`Device`] operator, set the `PortName` property to the communications port for the device. +- Insert a [`DeviceDataWriter`] sink and set the `Path` property (e.g. `StepperDriver.harp`). + - This will save the data in the standard Harp logging format, which can be loaded with [`harp-python`](../articles/python.md). +- Insert a [`PublishSubject`] operator and name it `StepperDriver Events`. +- Right-click the [`Device`] operator, select "Create Source (Bonsai.Harp.HarpMessage)" > "BehaviorSubject". + - Name the generated [``BehaviorSubject`1``] [source subject](https://bonsai-rx.org/docs/articles/subjects.html#source-subjects) `StepperDriver Commands`. + - Connect it as input to the [`Device`] operator. + +## Configure interlock state + +The `StepperDriver` includes an external interlock terminal (labelled `Enable` on the device) designed for use with a safety switch. The interlock setting must be configured to enable the device. + +:::workflow +![StepperDriver Interlock](../workflows/stepperdriver-configuration-interlock.bonsai) +::: + +- Insert a [`SubscribeSubject`] operator and configure the `Name` property to `StepperDriver Events`. +- Insert a [`Take`] combinator and set the `Count` property to 1. +- Insert a [`CreateMessage`] operator to construct a [`HarpMessage`] command to send to the device and configure these properties: + - `Payload` - Select [`InterlockEnabledPayload`] from the property drop down menu. + - `InterlockEnabled` - Select `Open` to enable the device if the interlock is not in use, or `Closed` to enable the device with a connected interlock switch. +- Insert a [`MulticastSubject`] operator to send [`HarpMessage`] commands to named subjects, and configure the `Name` property to `StepperDriver Commands`. + +> [!TIP] +> The `StepperDriver Events` > `Take(1)` ensures that configuration commands are sent only after the `StepperDriver` has initialized. It requires the `DumpRegisters` property to be set to `True` in the [`Device`] operator. + +## Configure microstep resolution + +The microstep resolution determines the size of each step, and directly affects the speed and distance of movement commands. It must be set individually for each motor driver. Values range from `Microstep8` (coarsest) to `Microstep64` (finest). + +:::workflow +![StepperDriver Microstep Resolution](../workflows/stepperdriver-configuration-microstepresolution.bonsai) +::: + +- Insert a [`SubscribeSubject`] operator named `StepperDriver Events`. +- Insert a [`Take`] combinator and set the `Count` property to 1. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MicrostepResolutionPayload`]. + - `Motor1MicrostepResolution` - Select the desired microstep resolution (e.g. `Microstep8`). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +## Configure operation parameters + +Other operation parameters to be set include the operation mode of the motor driver, maximum run current, as well as the hold current. + +:::workflow +![StepperDriver Operation Parameters](../workflows/stepperdriver-configuration-operationparameters.bonsai) +::: + +- Insert a [`SubscribeSubject`] operator named `StepperDriver Events`. +- Insert a [`Take`] combinator and set the `Count` property to 1. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1OperationModePayload`]. + - `Motor1OperationMode` - Set `QuietMode` for regular operation and `DynamicMovements` for quick movements. +- Insert a [`CreateMessage`] operator on another branch, and configure these properties: + - `Payload` - Select [`Motor1MaximumRunCurrentPayload`]. + - `Motor1MaximumRunCurrent` - Set the motor's rated phase current in amps (e.g. 1). +- Insert a [`CreateMessage`] operator on another branch, and configure these properties: + - `Payload` - Select [`Motor1HoldCurrentReductionPayload`]. + - `Motor1HoldCurrentReduction` - Set to minimize heat generation and adjust the holding torque of the motor at rest (e.g. `ReductionTo25Percent` for low holding torque with light external loads). +- Insert a [`Merge`] operator to combine all three commands into one [`HarpMessage`] stream. +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +> [!TIP] +> All configuration commands can be combined using [`Merge`] and sent into a single `StepperDriver Commands` pipeline. + +## Enable and disable motor drivers + +Motor drivers have to be enabled before use and can be disabled at any time. + +:::workflow +![StepperDriver Toggle Motor](../workflows/stepperdriver-configuration-togglemotor.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `1`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`EnableDriverPayload`]. + - `EnableDriver` - Select motor driver to enable (e.g. `Motor1`). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +To disable the driver, set up a separate pipeline: + +- Insert a [`KeyDown`] source and set the `Filter` property to `2`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`DisableDriverPayload`]. + - `DisableDriver` - Select the motor driver to disable (e.g. `Motor1`). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press 1 to enable the driver and 2 to disable the driver. When the driver is enabled, the LED above the driver connection on the device will blink red. + +> [!TIP] +> To target multiple drivers, enter their names, separated by a comma, for the `EnableDriver` and `DisableDriver` properties (e.g. `Motor0`, `Motor1`). + + +[``BehaviorSubject`1``]: xref:Bonsai.Reactive.BehaviorSubject +[`CreateMessage`]: xref:Harp.StepperDriver.CreateMessage +[`Device`]: xref:Harp.StepperDriver.Device +[`DeviceDataWriter`]: xref:Harp.StepperDriver.DeviceDataWriter +[`DisableDriverPayload`]: xref:Harp.StepperDriver.CreateDisableDriverPayload +[`EnableDriverPayload`]: xref:Harp.StepperDriver.CreateEnableDriverPayload +[`HarpMessage`]: xref:Bonsai.Harp.HarpMessage +[`InterlockEnabledPayload`]: xref:Harp.StepperDriver.CreateInterlockEnabledPayload +[`KeyDown`]: xref:Bonsai.Windows.Input.KeyDown +[`Merge`]: xref:Bonsai.Reactive.Merge +[`Motor1MaximumRunCurrentPayload`]: xref:Harp.StepperDriver.CreateMotor1MaximumRunCurrentPayload +[`Motor1HoldCurrentReductionPayload`]: xref:Harp.StepperDriver.CreateMotor1HoldCurrentReductionPayload +[`Motor1MicrostepResolutionPayload`]: xref:Harp.StepperDriver.CreateMotor1MicrostepResolutionPayload +[`Motor1OperationModePayload`]: xref:Harp.StepperDriver.CreateMotor1OperationModePayload +[`MulticastSubject`]: xref:Bonsai.Expressions.MulticastSubject +[`PublishSubject`]: xref:Bonsai.Reactive.PublishSubject +[`SubscribeSubject`]: xref:Bonsai.Expressions.SubscribeSubject +[`Take`]: xref:Bonsai.Reactive.Take \ No newline at end of file diff --git a/tutorials/stepperdriver-controlmotor.md b/tutorials/stepperdriver-controlmotor.md new file mode 100644 index 00000000..4a06a0d5 --- /dev/null +++ b/tutorials/stepperdriver-controlmotor.md @@ -0,0 +1,234 @@ +# Control Motor + +The following exercises demonstrate how to control motor speed and rotational position with the [Harp StepperDriver](https://github.com/harp-tech/device.stepperdriver). + +> [!WARNING] +> Ensure that you are familiar with the operation of the `StepperDriver` and motors before connecting external loads. Consider using end-of-travel switches in conjunction with a [digital input](xref:Harp.StepperDriver.CreateEnableDigitalInputsPayload) [configuration](xref:Harp.StepperDriver.CreateInput0OpModePayload). Improper use of the `StepperDriver` and motors may result in damage to equipment. + +## Prerequisites + +- Install the `Bonsai.Windows.Input` package from the Bonsai [package manager](https://bonsai-rx.org/docs/articles/packages.html). +- Connect a stepper motor to the `Stepper 1` output on the `StepperDriver`, set up the [device pattern](./stepperdriver-configuration.md#device-pattern), [configure](./stepperdriver-configuration.md) the device, and [enable](./stepperdriver-configuration.md#enable-and-disable-motor-drivers) the `Motor1` stepper driver. + +## Visualize position + +For these exercises, it helps to track the rotational position of the motor. The `StepperDriver` can broadcast a stream of [`AccumulatedSteps`] events, which can be displayed in a visualizer for this purpose. + +:::workflow +![StepperDriver Position Visualizer](../workflows/stepperdriver-controlmotor-visualizer.bonsai) +::: + +Enable the [`AccumulatedSteps`] event register and configure the dispatch rate: + +- Insert a [`SubscribeSubject`] operator named `StepperDriver Events`. +- Insert a [`Take`] combinator and set the `Count` property to 1. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`AccumulatedStepsSamplingRatePayload`]. + - `AccumulatedStepsSamplingRate` - Set the desired sampling rate (e.g. `Rate10Hz` for coarse movements). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Extract the [`AccumulatedSteps`] events and format them for display in the visualizer: + +- Insert a [`SubscribeSubject`] operator named `StepperDriver Events`. +- Insert a [`Parse`] operator and set the `Register` property to [`AccumulatedSteps`]. +- Right-click on the [`Parse`] operator, select "Output (Harp.StepperDriver.AccumulatedStepsPayload)" > "Motor1" from the context menu. +- Insert a [`VisualizerWindow`] node. + +## Exercise 1: Set acceleration profile + +Motor motion is driven by a series of step pulses, and speed can be controlled by specifying the interval between steps (in μs). The acceleration profile is defined by three parameters: + +- the initial/final step interval +- the target step interval at nominal speed +- the change in interval per step during the acceleration/deceleration phase + +:::workflow +![StepperDriver Acceleration Profile](../workflows/stepperdriver-controlmotor-acceleration.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `3`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MaximumStepIntervalPayload`]. + - `Motor1MaximumStepInterval` - Set the initial/final step interval (e.g. 2000). +- Insert a [`CreateMessage`] operator on a new branch and configure these properties: + - `Payload` - Select [`Motor1StepIntervalPayload`]. + - `Motor1StepInterval` - Set the target step interval (e.g. 250). +- Insert a [`CreateMessage`] operator on a new branch and configure these properties: + - `Payload` - Select [`Motor1StepAccelerationIntervalPayload`]. + - `Motor1StepAcceleration` - Set the change in step interval (e.g. 10). +- Combine the three messages with a [`Merge`] combinator. +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press 3 to set the acceleration profile. + +While the workflow is running, you can also adjust the properties, and press 3 to update the acceleration profile and test different settings. + +## Exercise 2: Move relative steps + +The [`MoveRelative`] register moves the motor by a specified number of steps from its current position. + +:::workflow +![StepperDriver Move Relative](../workflows/stepperdriver-controlmotor-moverelative.bonsai) +::: + +To move the motor in the positive direction: + +- Insert a [`KeyDown`] source and set the `Filter` property to `A`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MoveRelativePayload`]. + - `Motor1MoveRelative` - Set the number of steps to move (e.g. 3000). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +To move the motor in the negative direction, set up a separate pipeline: + +- Insert a [`KeyDown`] source and set the `Filter` property to `S`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MoveRelativePayload`]. + - `Motor1MoveRelative` - Set to a negative value (e.g. -3000). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press A to move the motor forward and S to move it back. Observe the accumulated steps in the visualizer to track the motor's position. + +> [!TIP] +> To move multiple motors simultaneously, use the [`MoveRelativePayload`]. + +## Exercise 3: Move to absolute step position + +The [`MoveAbsolute`] register moves the motor to an absolute step position based on the [`AccumulatedSteps`] counter. + +:::workflow +![StepperDriver Move Absolute](../workflows/stepperdriver-controlmotor-moveabsolute.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `D`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MoveAbsolutePayload`]. + - `Motor1MoveAbsolute` - Set the target step position (e.g. 2000). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press D to move the motor to the target position. Observe the accumulated steps in the visualizer to confirm the motor reaches the specified position. + +> [!TIP] +> To move multiple motors simultaneously, use the [`MoveAbsolutePayload`]. + +## Exercise 4: Set position limits + +Position limits restrict the range of motion by defining a minimum and maximum step position based on the [`AccumulatedSteps`] counter. The motor will stop automatically if it reaches either limit. + +:::workflow +![StepperDriver Position Limit](../workflows/stepperdriver-controlmotor-positionlimit.bonsai) +::: + +Set the minimum position limit: + +- Insert a [`KeyDown`] source and set the `Filter` property to `4`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MinPositionPayload`]. + - `Motor1MinPosition` - Set the minimum step position (e.g. 1000). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Set the maximum position limit in a separate pipeline: + +- Insert a [`KeyDown`] source and set the `Filter` property to `5`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MaxPositionPayload`]. + - `Motor1MaxPosition` - Set the maximum step position (e.g. 4000). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press 4 to set the minimum limit and 5 to set the maximum limit. Use the move commands from the previous exercises to verify that the motor stops at each limit. + +While the workflow is running, you can also adjust the properties and press 4 or 5 to update the position limits. + +> [!TIP] +> To set position limits for all motors, use the [`MinPositionPayload`] and [`MaxPositionPayload`]. + +## Exercise 5: Stop motors + +The [`StopMotors`] register immediately halts motors regardless of any current move command and can be used as an emergency stop. + +:::workflow +![StepperDriver Stop Motors](../workflows/stepperdriver-controlmotor-stopmotors.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `F`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`StopMotorsPayload`]. + - `StopMotors` - Select the motor to stop (e.g. `Motor1`). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and use the move commands from the previous exercises to set the motor in motion. Press F to immediately stop the motor. + +> [!TIP] +> To target multiple motors, enter their names, separated by a comma, for the `StopMotors` property (e.g. `Motor0`, `Motor1`). + +## Exercise 6: Move continuously + +The [`StepRelative`] register ignores the acceleration profile and moves the motor continuously at a fixed speed determined by the step interval and a direction indicated by the sign of the value. + +> [!WARNING] +> Ensure that position limits or the stop command are in place before trying this exercise. + +:::workflow +![StepperDriver Move Continuously](../workflows/stepperdriver-controlmotor-movecontinuous.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `G`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1StepRelativePayload`]. + - `Motor1` - Set the step interval and direction (e.g. 1000 for forward). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press G to start continuous motor motion. Press F from the previous exercise to stop the motor. + +> [!TIP] +> To move multiple motors simultaneously, use the [`StepRelativePayload`]. + +## Exercise 7: Reset position + +Writing new values to the [`AccumulatedSteps`] register resets the position tracking to a new origin. + +:::workflow +![StepperDriver Reset Position](../workflows/stepperdriver-controlmotor-resetposition.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `6`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`AccumulatedStepsPayload`]. + - `Motor1` - Set to 0. +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press 6 to reset the accumulated steps. Observe the accumulated steps in the visualizer to verify that the position has been reset. + +> [!WARNING] +> Note that any absolute position moves and position limits set in the previous exercises will now refer to a different physical location. + + +[`AccumulatedSteps`]: xref:Harp.StepperDriver.AccumulatedSteps +[`AccumulatedStepsPayload`]: xref:Harp.StepperDriver.CreateAccumulatedStepsPayload +[`AccumulatedStepsSamplingRatePayload`]: xref:Harp.StepperDriver.CreateAccumulatedStepsSamplingRatePayload +[`CreateMessage`]: xref:Harp.StepperDriver.CreateMessage +[`KeyDown`]: xref:Bonsai.Windows.Input.KeyDown +[`Merge`]: xref:Bonsai.Reactive.Merge +[`MoveRelative`]: xref:Harp.StepperDriver.MoveRelative +[`MoveRelativePayload`]: xref:Harp.StepperDriver.CreateMoveRelativePayload +[`MoveAbsolute`]: xref:Harp.StepperDriver.MoveAbsolute +[`MoveAbsolutePayload`]: xref:Harp.StepperDriver.CreateMoveAbsolutePayload +[`MaxPositionPayload`]: xref:Harp.StepperDriver.CreateMaxPositionPayload +[`StopMotors`]: xref:Harp.StepperDriver.StopMotors +[`StopMotorsPayload`]: xref:Harp.StepperDriver.CreateStopMotorsPayload +[`MinPositionPayload`]: xref:Harp.StepperDriver.CreateMinPositionPayload +[`Motor1MaxPositionPayload`]: xref:Harp.StepperDriver.CreateMotor1MaxPositionPayload +[`Motor1MinPositionPayload`]: xref:Harp.StepperDriver.CreateMotor1MinPositionPayload +[`Motor1MoveAbsolutePayload`]: xref:Harp.StepperDriver.CreateMotor1MoveAbsolutePayload +[`Motor1MoveRelativePayload`]: xref:Harp.StepperDriver.CreateMotor1MoveRelativePayload +[`Motor1StepAccelerationIntervalPayload`]: xref:Harp.StepperDriver.CreateMotor1StepAccelerationIntervalPayload +[`Motor1StepRelativePayload`]: xref:Harp.StepperDriver.CreateMotor1StepRelativePayload +[`Motor1MaximumStepIntervalPayload`]: xref:Harp.StepperDriver.CreateMotor1MaximumStepIntervalPayload +[`Motor1StepIntervalPayload`]: xref:Harp.StepperDriver.CreateMotor1StepIntervalPayload +[`MulticastSubject`]: xref:Bonsai.Expressions.MulticastSubject +[`Parse`]: xref:Harp.StepperDriver.Parse +[`StepRelative`]: xref:Harp.StepperDriver.StepRelative +[`StepRelativePayload`]: xref:Harp.StepperDriver.CreateStepRelativePayload +[`SubscribeSubject`]: xref:Bonsai.Expressions.SubscribeSubject +[`Take`]: xref:Bonsai.Reactive.Take +[`VisualizerWindow`]: xref:Bonsai.Design.VisualizerWindow \ No newline at end of file diff --git a/tutorials/stepperdriver-quickmovement.md b/tutorials/stepperdriver-quickmovement.md new file mode 100644 index 00000000..c808469a --- /dev/null +++ b/tutorials/stepperdriver-quickmovement.md @@ -0,0 +1,135 @@ +# QuickMovement + +The [Harp StepperDriver](https://github.com/harp-tech/device.stepperdriver) features a special `QuickMovement` mode that can be used for extremely fast movements with low trigger latency. It requires calibration and preloading of speed, acceleration and distance parameters. + +> [!TIP] +> For some applications requiring fast movements, [`StepRelative`](./stepperdriver-controlmotor.md#exercise-6-move-continuously) with position limits configured may be sufficient. + +> [!WARNING] +> Ensure that you are familiar with the operation of the `StepperDriver` and motors before connecting external loads. Consider using end-of-travel switches in conjunction with a [digital input](xref:Harp.StepperDriver.CreateEnableDigitalInputsPayload) [configuration](xref:Harp.StepperDriver.CreateInput0OpModePayload). Improper use of the `StepperDriver` and motors may result in damage to equipment, especially with `QuickMovement`. + +## Prerequisites + +- `QuickMovement` requires firmware `fw0.7-harp1.14` and later. Download the firmware from the [release](https://github.com/harp-tech/device.stepperdriver/releases) page and update it with the [Harp Toolkit](https://github.com/harp-tech/toolkit). +- `QuickMovement` requires `Harp.StepperDriver` package `0.4.0` and later, update it with the Bonsai [package manager](https://bonsai-rx.org/docs/articles/packages.html). +- `QuickMovement` is only supported on `Stepper 1` and `Stepper 2` drivers. Connect a stepper motor (`Motor1`) to `Stepper 1` output for these exercises. +- Install the `Bonsai.Windows.Input` package from the Bonsai [package manager](https://bonsai-rx.org/docs/articles/packages.html). +- Set up the [device pattern](./stepperdriver-configuration.md#device-pattern), and [enable](./stepperdriver-configuration.md#enable-and-disable-motor-drivers) the `Motor1` stepper driver. +- Use the [position visualizer](./stepperdriver-controlmotor.md#visualize-position) to monitor the movement. + +## Configure Driver + +Configure the following registers for `QuickMovement`. For all other parameters, refer to the [configuration](./stepperdriver-configuration.md) guide. + +:::workflow +![StepperDriver QuickMovement Driver Configuration](../workflows/stepperdriver-quickmovement-driverconfiguration.bonsai) +::: + +- Insert a [`SubscribeSubject`] operator named `StepperDriver Events`. +- Insert a [`Take`] combinator and set the `Count` property to 1. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MicrostepResolutionPayload`]. + - `Motor1MicrostepResolution` - Select `Microstep8` to achieve the highest speed. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1OperationModePayload`]. + - `Motor1OperationMode` - Select `DynamicMovements`. +- Insert a [`CreateMessage`] operator on another branch and configure these properties: + - `Payload` - Select [`AccumulatedStepsSamplingRatePayload`]. + - `AccumulatedStepsSamplingRate` - Select `Rate100Hz` for a higher position visualizer refresh rate. +- Combine the two messages with a [`Merge`] combinator. +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +## Exercise 1: Calibrate QuickMovement + +Calibrate `QuickMovement` before use by measuring the distance an external load travels per step pulse in micrometers (μm). + +:::workflow +![StepperDriver QuickMovement Calibration](../workflows/stepperdriver-quickmovement-calibration.bonsai) +::: + +Connect the external load to the stepper motor, and move the motor a set number of steps. Make sure the path is clear or set [position limits](./stepperdriver-controlmotor.md#exercise-4-set-position-limits). + +- Insert a [`KeyDown`] source and set the `Filter` property to `A`. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1MoveRelativePayload`]. + - `Motor1MoveRelative` - Set the number of steps to move (e.g. 100). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press A to move the external load. Measure the distance traveled and divide by the number of steps to get the distance per step pulse. + +- Insert a [`SubscribeSubject`] operator named `StepperDriver Events`. +- Insert a [`Take`] combinator and set the `Count` property to 1. +- Insert a [`CreateMessage`] operator and configure these properties: + - `Payload` - Select [`Motor1QuickMovementPulseDistancePayload`]. + - `Motor1QuickMovementPulseDistance` - Set the calibrated step pulse distance, in μm (e.g. 100). +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +## Exercise 2: Arm QuickMovement + +Preload movement parameters to arm the `QuickMovement` for rapid execution. Instead of steps or step intervals, movement parameters will use SI units: +- millimeters (mm) for distance. +- millimeters per second (mm/s) for speed. +- meters per second squared (m/s²) for acceleration. + +:::workflow +![StepperDriver QuickMovement Arming](../workflows/stepperdriver-quickmovement-arming.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `7`. +- Insert a [`CreateMessage`] operator on a separate branch and configure these properties: + - `Payload` - Select [`Motor1QuickMovementInitialSpeedPayload`]. + - `Motor1QuickMovementInitialSpeed` - Set the initial speed in mm/s (e.g. 2). +- Insert a [`CreateMessage`] operator on a separate branch and configure these properties: + - `Payload` - Select [`Motor1QuickMovementNominalSpeedPayload`]. + - `Motor1QuickMovementNominalSpeed` - Set the target speed in mm/s (e.g. 200). +- Insert a [`CreateMessage`] operator on a separate branch and configure these properties: + - `Payload` - Select [`Motor1QuickMovementAccelerationPayload`]. + - `Motor1QuickMovementAcceleration` - Set the acceleration in m/s² (e.g. 5). +- Insert a [`CreateMessage`] operator on a separate branch and configure these properties: + - `Payload` - Select [`Motor1QuickMovementDistancePayload`]. + - `Motor1QuickMovementDistance` - Set the travel distance in mm (e.g. 20 or -20, where the sign determines direction). +- Insert a [`Merge`] operator to combine all the commands. +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +> [!TIP] +> The example values given above will move an external load 20 mm in ~ 100 ms (based on target speed). + +Run the workflow and press 7 to arm the `QuickMovement`. + +While the workflow is running, you can adjust the properties and press 7 to update the `QuickMovement` configuration to test different settings. + +## Exercise 3: Trigger QuickMovement + +Trigger `QuickMovement` with a single command. + +:::workflow +![StepperDriver QuickMovement Trigger](../workflows/stepperdriver-quickmovement-triggering.bonsai) +::: + +- Insert a [`KeyDown`] source and set the `Filter` property to `H`. +- Insert a [`CreateMessage`] operator and configure the following properties: + - `Payload` - Select [`TriggerQuickMovementPayload`]. + - `TriggerQuickMovement` - Select `Motor1`. +- Insert a [`MulticastSubject`] operator named `StepperDriver Commands`. + +Run the workflow and press H to trigger the `QuickMovement`. + + +[`AccumulatedSteps`]: xref:Harp.StepperDriver.AccumulatedSteps +[`AccumulatedStepsSamplingRatePayload`]: xref:Harp.StepperDriver.CreateAccumulatedStepsSamplingRatePayload +[`CreateMessage`]: xref:Harp.StepperDriver.CreateMessage +[`KeyDown`]: xref:Bonsai.Windows.Input.KeyDown +[`Merge`]: xref:Bonsai.Reactive.Merge +[`Motor1MicrostepResolutionPayload`]: xref:Harp.StepperDriver.CreateMotor1MicrostepResolutionPayload +[`Motor1MoveRelativePayload`]: xref:Harp.StepperDriver.CreateMotor1MoveRelativePayload +[`Motor1QuickMovementAccelerationPayload`]: xref:Harp.StepperDriver.CreateMotor1QuickMovementAccelerationPayload +[`Motor1QuickMovementInitialSpeedPayload`]: xref:Harp.StepperDriver.CreateMotor1QuickMovementInitialSpeedPayload +[`Motor1QuickMovementDistancePayload`]: xref:Harp.StepperDriver.CreateMotor1QuickMovementDistancePayload +[`Motor1QuickMovementPulseDistancePayload`]: xref:Harp.StepperDriver.CreateMotor1QuickMovementPulseDistancePayload +[`Motor1QuickMovementNominalSpeedPayload`]: xref:Harp.StepperDriver.CreateMotor1QuickMovementNominalSpeedPayload +[`Motor1OperationModePayload`]: xref:Harp.StepperDriver.CreateMotor1OperationModePayload +[`Motor1MicrostepResolution`]: xref:Harp.StepperDriver.Motor1MicrostepResolution +[`MulticastSubject`]: xref:Bonsai.Expressions.MulticastSubject +[`SubscribeSubject`]: xref:Bonsai.Expressions.SubscribeSubject +[`Take`]: xref:Bonsai.Reactive.Take +[`TriggerQuickMovementPayload`]: xref:Harp.StepperDriver.CreateTriggerQuickMovementPayload \ No newline at end of file diff --git a/tutorials/stepperdriver-setup.md b/tutorials/stepperdriver-setup.md new file mode 100644 index 00000000..1ed8348e --- /dev/null +++ b/tutorials/stepperdriver-setup.md @@ -0,0 +1,25 @@ +# Getting Started + +The [Harp StepperDriver](https://github.com/harp-tech/device.stepperdriver) is a stepper motor controller device for four motors with support for quadrature encoder feedback. + +## Installation + +- Install [Bonsai](https://bonsai-rx.org/docs/articles/installation.html). +- Install the `Harp.StepperDriver` package by searching for it in the [Bonsai package manager](https://bonsai-rx.org/docs/articles/packages.html). + +## Connections + +**Stepper Motor** - The `StepperDriver` supports 4-lead bipolar stepper motors that draw up to 2 A per phase. Ensure that the 4 leads (`A+`, `A-`, `B+`, and `B-`) are correctly connected to the labeled terminals on the device. + +**Power Supply** - The `StepperDriver` requires an external power supply that matches your motor configuration: +- **Voltage** - Select a supply matching the recommended driving voltage listed in the motor datasheet (15-35 V). For high-speed and high-torque applications, supply at least 10 V above the minimum driving voltage, and mount the `StepperDriver` on a metal surface to dissipate heat. +- **Current** - Provide at least double the motor's rated phase current, multiplied by the number of motors (e.g. 8 A for two 2 A motors). + +
+ +--- + +These tutorials were written and tested with:
+**Hardware** v1.0
+**Firmware** v0.7
+**Harp.StepperDriver** v0.4 \ No newline at end of file diff --git a/tutorials/toc.yml b/tutorials/toc.yml index 3d2fb9aa..751dddc7 100644 --- a/tutorials/toc.yml +++ b/tutorials/toc.yml @@ -1,4 +1,9 @@ - name: Harp Hobgoblin - href: hobgoblin-setup.md - href: hobgoblin-acquisition.md -- href: hobgoblin-reaction.md \ No newline at end of file +- href: hobgoblin-reaction.md +- name: Harp StepperDriver +- href: stepperdriver-setup.md +- href: stepperdriver-configuration.md +- href: stepperdriver-controlmotor.md +- href: stepperdriver-quickmovement.md \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-devicepattern.bonsai b/workflows/stepperdriver-configuration-devicepattern.bonsai new file mode 100644 index 00000000..87755e2c --- /dev/null +++ b/workflows/stepperdriver-configuration-devicepattern.bonsai @@ -0,0 +1,43 @@ + + + + + + StepperDriver Commands + + + + Active + On + true + On + Disabled + false + COM9 + + + + + StepperDriver.harp + true + false + Include + + + + + StepperDriver Events + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-devicepattern.svg b/workflows/stepperdriver-configuration-devicepattern.svg new file mode 100644 index 00000000..7045e7ff --- /dev/null +++ b/workflows/stepperdriver-configuration-devicepattern.svg @@ -0,0 +1,73 @@ + + +]> + + + + + + + + + + + + + + + StepperDriver + + + Events + + + + + + StepperDriver + + + DataWriter + + + + + + StepperDriver + + + + + + + StepperDriver + + + Commands + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-interlock.bonsai b/workflows/stepperdriver-configuration-interlock.bonsai new file mode 100644 index 00000000..b8dd48e5 --- /dev/null +++ b/workflows/stepperdriver-configuration-interlock.bonsai @@ -0,0 +1,34 @@ + + + + + + StepperDriver Events + + + + 1 + + + + Write + + Open + + + + StepperDriver Commands + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-interlock.svg b/workflows/stepperdriver-configuration-interlock.svg new file mode 100644 index 00000000..fc22e1d2 --- /dev/null +++ b/workflows/stepperdriver-configuration-interlock.svg @@ -0,0 +1,76 @@ + + +]> + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver. + + + InterlockEnabl + + + + + Take + + + + + + + StepperDriver + + + Events + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-microstepresolution.bonsai b/workflows/stepperdriver-configuration-microstepresolution.bonsai new file mode 100644 index 00000000..fe10868d --- /dev/null +++ b/workflows/stepperdriver-configuration-microstepresolution.bonsai @@ -0,0 +1,34 @@ + + + + + + StepperDriver Events + + + + 1 + + + + Write + + Microstep8 + + + + StepperDriver Commands + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-microstepresolution.svg b/workflows/stepperdriver-configuration-microstepresolution.svg new file mode 100644 index 00000000..ac7ca70d --- /dev/null +++ b/workflows/stepperdriver-configuration-microstepresolution.svg @@ -0,0 +1,76 @@ + + +]> + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Motor1 + + + MicrostepResol + + + + + Take + + + + + + + StepperDriver + + + Events + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-operationparameters.bonsai b/workflows/stepperdriver-configuration-operationparameters.bonsai new file mode 100644 index 00000000..f4c238a8 --- /dev/null +++ b/workflows/stepperdriver-configuration-operationparameters.bonsai @@ -0,0 +1,54 @@ + + + + + + StepperDriver Events + + + + 1 + + + + Write + + QuietMode + + + + Write + + 1 + + + + Write + + ReductionTo25Percent + + + + + + + StepperDriver Commands + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-operationparameters.svg b/workflows/stepperdriver-configuration-operationparameters.svg new file mode 100644 index 00000000..2b059b6c --- /dev/null +++ b/workflows/stepperdriver-configuration-operationparameters.svg @@ -0,0 +1,133 @@ + + +]> + + + + + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + Merge + + + + + + Stepper + + + Driver.Motor1 + + + OperationMod + + + + + + Stepper + + + Driver.Motor1 + + + MaximumRun + + + + + + Stepper + + + Driver.Motor1 + + + HoldCurrentRe + + + + + Take + + + + + + + StepperDriver + + + Events + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-togglemotor.bonsai b/workflows/stepperdriver-configuration-togglemotor.bonsai new file mode 100644 index 00000000..c1b02959 --- /dev/null +++ b/workflows/stepperdriver-configuration-togglemotor.bonsai @@ -0,0 +1,48 @@ + + + + + + + D1 + false + + + + Write + + Motor1 + + + + StepperDriver Commands + + + + D2 + false + + + + Write + + Motor1 + + + + StepperDriver Commands + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-configuration-togglemotor.svg b/workflows/stepperdriver-configuration-togglemotor.svg new file mode 100644 index 00000000..96dcaa73 --- /dev/null +++ b/workflows/stepperdriver-configuration-togglemotor.svg @@ -0,0 +1,110 @@ + + +]> + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Enable + + + DriverPayload + + + + + + Stepper + + + Driver.Disable + + + DriverPayload + + + + + + + KeyDown + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-acceleration.bonsai b/workflows/stepperdriver-controlmotor-acceleration.bonsai new file mode 100644 index 00000000..ead2041a --- /dev/null +++ b/workflows/stepperdriver-controlmotor-acceleration.bonsai @@ -0,0 +1,52 @@ + + + + + + + D3 + false + + + + Write + + 2000 + + + + Write + + 250 + + + + Write + + 10 + + + + + + + StepperDriver Commands + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-acceleration.svg b/workflows/stepperdriver-controlmotor-acceleration.svg new file mode 100644 index 00000000..5dc2cbc9 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-acceleration.svg @@ -0,0 +1,118 @@ + + +]> + + + + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + Merge + + + + + + Stepper + + + Driver.Motor1 + + + MaximumStepI + + + + + + Stepper + + + Driver.Motor1 + + + StepIntervalPay + + + + + + Stepper + + + Driver.Motor1 + + + StepAccelerati + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-moveabsolute.bonsai b/workflows/stepperdriver-controlmotor-moveabsolute.bonsai new file mode 100644 index 00000000..2ad8e966 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-moveabsolute.bonsai @@ -0,0 +1,31 @@ + + + + + + + D + false + + + + Write + + 2000 + + + + StepperDriver Commands + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-moveabsolute.svg b/workflows/stepperdriver-controlmotor-moveabsolute.svg new file mode 100644 index 00000000..ace3a625 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-moveabsolute.svg @@ -0,0 +1,61 @@ + + +]> + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Motor1 + + + MoveAbsolute + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-movecontinuous.bonsai b/workflows/stepperdriver-controlmotor-movecontinuous.bonsai new file mode 100644 index 00000000..5cfcbbb1 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-movecontinuous.bonsai @@ -0,0 +1,31 @@ + + + + + + + G + false + + + + Write + + 1000 + + + + StepperDriver Commands + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-movecontinuous.svg b/workflows/stepperdriver-controlmotor-movecontinuous.svg new file mode 100644 index 00000000..6cb16ba4 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-movecontinuous.svg @@ -0,0 +1,61 @@ + + +]> + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Motor1 + + + StepRelativeP + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-moverelative.bonsai b/workflows/stepperdriver-controlmotor-moverelative.bonsai new file mode 100644 index 00000000..6557cff6 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-moverelative.bonsai @@ -0,0 +1,48 @@ + + + + + + + A + false + + + + Write + + 3000 + + + + StepperDriver Commands + + + + S + false + + + + Write + + -3000 + + + + StepperDriver Commands + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-moverelative.svg b/workflows/stepperdriver-controlmotor-moverelative.svg new file mode 100644 index 00000000..b7b4d35f --- /dev/null +++ b/workflows/stepperdriver-controlmotor-moverelative.svg @@ -0,0 +1,110 @@ + + +]> + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Motor1 + + + MoveRelativeP + + + + + + Stepper + + + Driver.Motor1 + + + MoveRelativeP + + + + + + + KeyDown + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-positionlimit.bonsai b/workflows/stepperdriver-controlmotor-positionlimit.bonsai new file mode 100644 index 00000000..5918c508 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-positionlimit.bonsai @@ -0,0 +1,48 @@ + + + + + + + D4 + false + + + + Write + + 1000 + + + + StepperDriver Commands + + + + D5 + false + + + + Write + + 4000 + + + + StepperDriver Commands + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-positionlimit.svg b/workflows/stepperdriver-controlmotor-positionlimit.svg new file mode 100644 index 00000000..a059e2d0 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-positionlimit.svg @@ -0,0 +1,110 @@ + + +]> + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Motor1 + + + MinPositionPay + + + + + + Stepper + + + Driver.Motor1 + + + MaxPositionPay + + + + + + + KeyDown + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-resetposition.bonsai b/workflows/stepperdriver-controlmotor-resetposition.bonsai new file mode 100644 index 00000000..846c440e --- /dev/null +++ b/workflows/stepperdriver-controlmotor-resetposition.bonsai @@ -0,0 +1,34 @@ + + + + + + + D6 + false + + + + Write + + 0 + 0 + 0 + 0 + + + + StepperDriver Commands + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-resetposition.svg b/workflows/stepperdriver-controlmotor-resetposition.svg new file mode 100644 index 00000000..57827eec --- /dev/null +++ b/workflows/stepperdriver-controlmotor-resetposition.svg @@ -0,0 +1,61 @@ + + +]> + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver. + + + AccumulatedSt + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-stopmotors.bonsai b/workflows/stepperdriver-controlmotor-stopmotors.bonsai new file mode 100644 index 00000000..14b68038 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-stopmotors.bonsai @@ -0,0 +1,31 @@ + + + + + + + F + false + + + + Write + + Motor1 + + + + StepperDriver Commands + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-stopmotors.svg b/workflows/stepperdriver-controlmotor-stopmotors.svg new file mode 100644 index 00000000..cf38eb93 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-stopmotors.svg @@ -0,0 +1,61 @@ + + +]> + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Stop + + + MotorsPayload + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-visualizer.bonsai b/workflows/stepperdriver-controlmotor-visualizer.bonsai new file mode 100644 index 00000000..24ede8ec --- /dev/null +++ b/workflows/stepperdriver-controlmotor-visualizer.bonsai @@ -0,0 +1,59 @@ + + + + + + StepperDriver Events + + + + 1 + + + + Write + + Rate10Hz + + + + StepperDriver Commands + + + StepperDriver Events + + + + + + Motor1 + + + true + + 600 + 300 + + + 500 + 300 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-controlmotor-visualizer.svg b/workflows/stepperdriver-controlmotor-visualizer.svg new file mode 100644 index 00000000..2c419aa1 --- /dev/null +++ b/workflows/stepperdriver-controlmotor-visualizer.svg @@ -0,0 +1,142 @@ + + +]> + + + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + + Visualizer + + + Window + + + + + + Stepper + + + Driver. + + + AccumulatedSt + + + + + + + Motor1 + + + + + Take + + + + + Stepper + + + Driver. + + + AccumulatedSt + + + + + + + StepperDriver + + + Events + + + + + + + StepperDriver + + + Events + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-arming.bonsai b/workflows/stepperdriver-quickmovement-arming.bonsai new file mode 100644 index 00000000..5781f80e --- /dev/null +++ b/workflows/stepperdriver-quickmovement-arming.bonsai @@ -0,0 +1,60 @@ + + + + + + + D7 + false + + + + Write + + 2 + + + + Write + + 200 + + + + Write + + 5 + + + + Write + + 20 + + + + + + + StepperDriver Commands + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-arming.svg b/workflows/stepperdriver-quickmovement-arming.svg new file mode 100644 index 00000000..c9d9dce0 --- /dev/null +++ b/workflows/stepperdriver-quickmovement-arming.svg @@ -0,0 +1,141 @@ + + +]> + + + + + + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + Merge + + + + + + Stepper + + + Driver.Motor1 + + + QuickMoveme + + + + + + Stepper + + + Driver.Motor1 + + + QuickMoveme + + + + + + Stepper + + + Driver.Motor1 + + + QuickMoveme + + + + + + Stepper + + + Driver.Motor1 + + + QuickMoveme + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-calibration.bonsai b/workflows/stepperdriver-quickmovement-calibration.bonsai new file mode 100644 index 00000000..1b24da8f --- /dev/null +++ b/workflows/stepperdriver-quickmovement-calibration.bonsai @@ -0,0 +1,52 @@ + + + + + + + A + false + + + + Write + + 100 + + + + StepperDriver Commands + + + StepperDriver Events + + + + 1 + + + + Write + + 100 + + + + StepperDriver Commands + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-calibration.svg b/workflows/stepperdriver-quickmovement-calibration.svg new file mode 100644 index 00000000..5b332605 --- /dev/null +++ b/workflows/stepperdriver-quickmovement-calibration.svg @@ -0,0 +1,125 @@ + + +]> + + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Motor1 + + + MoveRelativeP + + + + + + Stepper + + + Driver.Motor1 + + + QuickMoveme + + + + + + + KeyDown + + + + + Take + + + + + + + StepperDriver + + + Events + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-driverconfiguration.bonsai b/workflows/stepperdriver-quickmovement-driverconfiguration.bonsai new file mode 100644 index 00000000..d253037d --- /dev/null +++ b/workflows/stepperdriver-quickmovement-driverconfiguration.bonsai @@ -0,0 +1,54 @@ + + + + + + StepperDriver Events + + + + 1 + + + + Write + + Microstep8 + + + + Write + + DynamicMovements + + + + Write + + Rate100Hz + + + + + + + StepperDriver Commands + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-driverconfiguration.svg b/workflows/stepperdriver-quickmovement-driverconfiguration.svg new file mode 100644 index 00000000..9b2e26f2 --- /dev/null +++ b/workflows/stepperdriver-quickmovement-driverconfiguration.svg @@ -0,0 +1,133 @@ + + +]> + + + + + + + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + + Merge + + + + + + Stepper + + + Driver.Motor1 + + + MicrostepResol + + + + + + Stepper + + + Driver.Motor1 + + + OperationMod + + + + + + Stepper + + + Driver. + + + AccumulatedSt + + + + + Take + + + + + + + StepperDriver + + + Events + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-triggering.bonsai b/workflows/stepperdriver-quickmovement-triggering.bonsai new file mode 100644 index 00000000..ddf28175 --- /dev/null +++ b/workflows/stepperdriver-quickmovement-triggering.bonsai @@ -0,0 +1,31 @@ + + + + + + + H + false + + + + Write + + Motor1 + + + + StepperDriver Commands + + + + + + + + \ No newline at end of file diff --git a/workflows/stepperdriver-quickmovement-triggering.svg b/workflows/stepperdriver-quickmovement-triggering.svg new file mode 100644 index 00000000..fb5f1457 --- /dev/null +++ b/workflows/stepperdriver-quickmovement-triggering.svg @@ -0,0 +1,61 @@ + + +]> + + + + + + + + + + + + StepperDriver + + + Commands + + + + + + Stepper + + + Driver.Trigger + + + QuickMoveme + + + + + + + KeyDown + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file