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

acceleration and deceleration #23

Open
valentinptc opened this issue Apr 23, 2020 · 9 comments
Open

acceleration and deceleration #23

valentinptc opened this issue Apr 23, 2020 · 9 comments

Comments

@valentinptc
Copy link

valentinptc commented Apr 23, 2020

Hi,
I would love to slowly accelerate and deceleration the motor to a precise angle.
I get it to to accelerate, but I cant figure out how to slow down the motor at the end of the command. I can only call another degree command and the motor will transition from one to the other speed.

I can find the following in your documentation* but its unlcear what the meaning is:

0x0000000? | Acc.- profile
0x000000?0 | Decc.- profile

*3.27.9. Output Sub Command - StartSpeedForDegrees(Degrees, Speed, MaxPower, EndState, UseProfile) [0x0B]

Here is the command I send:

0x0D, 0x00, 0x81, port, 0x11, 0x0B, motorbytes[0],motorbytes[1],motorbytes[2],motorbytes[3], speed, 100, 127, 0x00000021]);

I was playing around with the last byte wondering if I can figure out what the meaning of the two question marks are.

@Vouzamo
Copy link

Vouzamo commented Apr 24, 2020

I believe the profile is a byte where bit flags are used for profiles.

As such, the following would apply:

  • 0b00000000 No profile
  • 0b00000001 Accelerate
  • 0b00000010 Decelerate
  • 0b00000011 Both

@valentinptc
Copy link
Author

valentinptc commented Apr 24, 2020

I have set both profiles separately and I also applied the flags to set the motor moving. One thing thats confusing with setting the profiles is ProfileNo [Int8]: [0..MAX_PROFILES]

If I change ProfileNo to anything else than 0x01 for acceleration, the motor behaves unexpected.
The deceleration profile seems to have absolutely no impact. I tried changing all kinds of values for an hour or so. I think I tried all possible combinations. Something important is missing from the documentation or the boost firmware has a bug.

@valentinptc
Copy link
Author

anymore hints? Acceleration is working, deceleration is not working. I there anyone else who got this working?

@Vouzamo
Copy link

Vouzamo commented Apr 27, 2020 via email

@valentinptc
Copy link
Author

I did, yes. Actually I tried every possible combination. The documentation could win a lot if there could be one or two more paragraphs to explain the exact relationship between the bitmask and the profiles. At this point however I believe there is a bug in the firmware.

@Vouzamo
Copy link

Vouzamo commented Apr 27, 2020 via email

@valentinptc
Copy link
Author

valentinptc commented Apr 27, 2020

Thank you! When do you expect to have more time?

@renegrob
Copy link

renegrob commented Dec 31, 2021

For me it worked:
I called SetAccTime and SetDecTime for profile 0, note that the millis is a 16 bit value where the first byte is the low byte (little-endian), then I called StartSpeedForTime with profile = 3 (0b0011).
I used accTime = 1000, decTime = 1000 and a time > 2000 for StartSpeedForTime.
Trying to set the profile value for SetAccTime different than 0 caused the connection to abort.

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

No branches or pull requests

3 participants