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

Incorporate pulse/sample parameter #153

Closed
jgvictores opened this issue Dec 14, 2017 · 6 comments · Fixed by #229
Closed

Incorporate pulse/sample parameter #153

jgvictores opened this issue Dec 14, 2017 · 6 comments · Fixed by #229

Comments

@jgvictores
Copy link
Member

We are currently counting on a fixed pulse/sample value (0.001 (?) for velocities and thus 0.001^2 for accelerations):

This looks dangerous and undocumented!

Incorporate a pulse/sample parameter, such as pulsePerSample or better name?

@PeterBowman
Copy link
Member

Incorporate a pulse/sample parameter, such as pulsePerSample or better name?

samplesPerPulse and you get rid of fractions 😏

@jgvictores
Copy link
Member Author

@PeterBowman
Copy link
Member

Sample loop is 1 ms default, see e.g. docs for object 6081h (profile velocity). Regarding object 207Ah (interpolated position 1st order time), it is stated that time "is given in IU which is by default 0.8ms for steppers and 1ms for the other configurations". We don't care about steppers, I'm just curious whether the sample loop refers to that same time dimension in both objects.

@PeterBowman PeterBowman self-assigned this Aug 19, 2019
@PeterBowman
Copy link
Member

samplesPerPulse and you get rid of fractions smirk

Makes more sense the other way around: pulsesPerSample.

Regarding object 207Ah (interpolated position 1st order time), it is stated that time "is given in IU which is by default 0.8ms for steppers and 1ms for the other configurations".

That is, we want to sample a given amount of pulses per one second. Assuming we already translated a degrees/seconds input into pulses/seconds (by applying the reduction factor and taking into consideration the number of encoder lines and pulses per line):

pulses/second * (samples * second)/pulse

I might be wrong in my interpretation regarding time units; however, the maths are clear and 1 millisecond as stated in the manual translates into 1000 pulses per one (sample*second) in my previous formula. For steppers, that would be 1250. And I like this more than fractions.

@PeterBowman
Copy link
Member

Ready at 36b6360.

@PeterBowman
Copy link
Member

I might be wrong in my interpretation regarding time units

Yup, even though the result was correct (not accounting for #253), this is not how real dimensions should be translated to internal units. Instead:

  • Position: degrees -> pulses
  • Velocity: degrees/second -> pulses/sample
  • Acceleration: degrees/second^2 -> pulses/sample^2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants