Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisions to stepper-2.0 #81

Merged
merged 4 commits into from
Jan 19, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 30 additions & 26 deletions stepper-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,16 @@ Protocol

**Stepper step (relative move)**

Position is specified as a 32-bit signed long.
Steps to move is specified as a 32-bit signed long.

The speed value is a float composed of a 23-bit significand (mantissa) and a 4-bit exponent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For just one of the 3 sections that describes how the float is composed, can you provide an example for a specific number or two (maybe 500.0 and 0.000234 or something like that) how this would be broken out into the 3 parts specified in the table?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better if the example(s) align to a specific duration (such as 1 step per hour for "slow" and 10 steps per second for "fast"). You probably have a better sense for practical examples than I do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I might mention the custom float format up front, describe it in detail at the end of the document (with examples) and for each method where it's used just refer users to that detailed description.

Sound good?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm

(biased -18 with an explicit 1's bit) and a sign bit.
(biased -17 with an explicit 1's bit) and a sign bit.

|27 |26-23 |22-0 |
|-----|--------|-----------|
|sign |exponent|significant|
|1 bit|4 bits |23 bits |


```
0 START_SYSEX (0xF0)
1 Stepper Command (0x62)
Expand All @@ -100,7 +99,7 @@ Sets a stepper to a desired position based on the number of steps from the zero
Position is specified as a 32-bit signed long.

The speed value is float composed of a 23-bit significand (mantissa) and a 4-bit exponent
(biased -18 with an explicit 1's bit) and a sign bit.
(biased -17 with an explicit 1's bit) and a sign bit.

|27 |26-23 |22-0 |
|-----|--------|-----------|
Expand All @@ -112,11 +111,11 @@ The speed value is float composed of a 23-bit significand (mantissa) and a 4-bit
1 Stepper Command (0x62)
2 to command (0x03)
3 device number (0-9)
4 num steps, bits 0-6
5 num steps, bits 7-13
6 num steps, bits 14-20
7 num steps, bits 21-27
8 num steps, bits 28-32
4 position, bits 0-6
5 position, bits 7-13
6 position, bits 14-20
7 position, bits 21-27
8 position, bits 28-32
9 speed, bits 0-6 (steps per second)
10 speed, bits 7-13
11 speed, bits 14-20
Expand Down Expand Up @@ -179,7 +178,7 @@ When a limit pin (digital) is set to its limit state, movement in that direction
**Stepper set acceleration**

Sets the acceleration/deceleration in steps/sec^2. The accel value is composed of a 23-bit
significand (mantissa) and a 4-bit exponent (biased -18 with an explicit 1's bit) and a sign bit.
significand (mantissa) and a 4-bit exponent (biased -17 with an explicit 1's bit) and a sign bit.

|27 |26-23 |22-0 |
|-----|--------|-----------|
Expand Down Expand Up @@ -223,21 +222,27 @@ Stepper instances that have been created with the stepper configuration command

**MultiStepper to**

Sets each stepper in a group to a desired position based on the number of
steps from its zero position. Positions are specified as a 32-bit signed long.

Stepper movements will be coordinated so that all arrive at their desired
position simultaneously. The duration of this move is based on which stepper
will take the longest given the change in position and the stepper's max speed.

```
0 START_SYSEX (0xF0)
1 Stepper Command (0x62)
2 multi to command (0x21)
3 group number (0-127)
4 member number (0-9)
5 num steps, bits 0-6
6 num steps, bits 7-13
7 num steps, bits 14-20
8 num steps, bits 21-27
9 num steps, bits 28-32
4 position, bits 0-6
5 position, bits 7-13
6 position, bits 14-20
7 position, bits 21-27
8 position, bits 28-32

*Optionally repeat 4 through 9 for each device in group*
*Repeat 4 through 8 for each device in group*

63 END_SYSEX (0xF7)
53 END_SYSEX (0xF7)
```

**MultiStepper stop**
Expand All @@ -258,14 +263,13 @@ Sent when a move completes or stop is called.
1 Stepper Command (0x62)
2 multi stop reply command (0x24)
3 group number (0-127)
4 member number (0-9)
5 position, bits 0-6
6 position, bits 7-13
7 position, bits 14-20
8 position, bits 21-27
9 position, bits 28-32
4 position, bits 0-6
5 position, bits 7-13
6 position, bits 14-20
7 position, bits 21-27
8 position, bits 28-32

*Optionally repeat 4 through 9 for each device in group*
*Repeat 4 through 8 for each device in group*

63 END_SYSEX (0xF7)
53 END_SYSEX (0xF7)
```