hal functions
- Z3rni3
- Offline
- Junior Member
-
Less
More
- Posts: 27
- Thank you received: 3
13 May 2025 08:52 - 13 May 2025 08:57 #328360
by Z3rni3
Replied by Z3rni3 on topic hal functions
Following this but it seems the same problem has come up again.
Might I be missing a crucial step?
Everything is working as intended, until the encoder come into play...
FYI: Encoders Scale is (1000PPR*4mm/rev)/4=1000
Might I be missing a crucial step?
Everything is working as intended, until the encoder come into play...
FYI: Encoders Scale is (1000PPR*4mm/rev)/4=1000
Last edit: 13 May 2025 08:57 by Z3rni3.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23323
- Thank you received: 4948
13 May 2025 12:01 #328371
by andypugh
Replied by andypugh on topic hal functions
And what is "the exact same problem" ?
ie, what is the actual error message?
ie, what is the actual error message?
Please Log in or Create an account to join the conversation.
- Z3rni3
- Offline
- Junior Member
-
Less
More
- Posts: 27
- Thank you received: 3
13 May 2025 12:21 - 13 May 2025 12:50 #328373
by Z3rni3
Replied by Z3rni3 on topic hal functions
When i home my X-axis i get a "joint 0 following error" after having moved about 0.2mm (the distance depends on where i set my FERROR).
Last edit: 13 May 2025 12:50 by Z3rni3.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18583
- Thank you received: 5106
13 May 2025 13:58 #328380
by PCW
Replied by PCW on topic hal functions
You will need to plot the following error with halscope to see whats going on
Note that FF1 will be 1.000 if the encoder and stepgen are scaled properly.
That is, the encoder position should match the stepgen feedback position if
both are scaled properly so as far a the PID sees things, they are nearly identical.
Note that FF1 will be 1.000 if the encoder and stepgen are scaled properly.
That is, the encoder position should match the stepgen feedback position if
both are scaled properly so as far a the PID sees things, they are nearly identical.
Please Log in or Create an account to join the conversation.
- Z3rni3
- Offline
- Junior Member
-
Less
More
- Posts: 27
- Thank you received: 3
14 May 2025 06:37 - 14 May 2025 10:34 #328432
by Z3rni3
Replied by Z3rni3 on topic hal functions
Thank you! That did the trick!
I'm currently getting familiar with the HAL Scope.
After displaying the encoder position and the stepgen feedback position, I noticed that the stepgen was counting positive while moving in the positive direction.
I corrected this by adding a minus sign in front of the STEP_SCALE.
However, this caused the motor to spin in the positive direction during homing.
I fixed that by removing the negative signs from the homing and latching velocities.
There probably is a nice way to fix that, isn't there?
Edit: I've added working .hal and .ini files for future Reference. (only X has encoder feedback)
I'm currently getting familiar with the HAL Scope.
After displaying the encoder position and the stepgen feedback position, I noticed that the stepgen was counting positive while moving in the positive direction.
I corrected this by adding a minus sign in front of the STEP_SCALE.
However, this caused the motor to spin in the positive direction during homing.
I fixed that by removing the negative signs from the homing and latching velocities.
There probably is a nice way to fix that, isn't there?
Edit: I've added working .hal and .ini files for future Reference. (only X has encoder feedback)
Last edit: 14 May 2025 10:34 by Z3rni3.
Please Log in or Create an account to join the conversation.
Time to create page: 0.286 seconds