BLDC component with 8i20 - how to get to work?

More
05 Jul 2024 20:18 #304493 by PCW
I would post your hal/ini files
runaway with FF2 doesn't make any sense
 

Please Log in or Create an account to join the conversation.

More
05 Jul 2024 20:29 #304495 by tommylight
Are the encoders wired to drive/board with shielded cable?
Is the shielding grounded on the drive/board side?
What is the output voltage on the encoder pins?

Please Log in or Create an account to join the conversation.

More
06 Jul 2024 07:19 - 06 Jul 2024 07:22 #304515 by viesturs.lacis
Initial retrofit to LinuxCNC was done 3 or 4 years ago, now I am replacing servodrives (currently one 8i20 is installed and wired up) because originals have started to malfunction and show errors.
Currently I have not yet touched encoder wiring - old Yaskawa drives are still in machine and are exporting encoder signals to LinuxCNC. I do not think that there could be issues with encoder signal. The only change with servodrive wiring is that I have removed motor cable from the drive and attached it to 8i20.

Attached are INI and main HAL file. Relevant to 8i20 are sections of Z axis.
 

File Attachment:

File Name: 5i24.ini
File Size:6 KB

 

File Attachment:

File Name: hm2-servo.hal
File Size:18 KB
Attachments:
Last edit: 06 Jul 2024 07:22 by viesturs.lacis.

Please Log in or Create an account to join the conversation.

More
06 Jul 2024 15:22 #304546 by PCW
One thing  I do see is that the thread order is wrong

The

addf   bldc.0  servo-thread

should be between the 5I24 read and 5I24 write

For tuning, I would add as much D as you can until it becomes unstable
then do the same with P,  and then I and worry about FF2 at the end
 

Please Log in or Create an account to join the conversation.

More
06 Jul 2024 19:54 - 06 Jul 2024 20:54 #304553 by viesturs.lacis
Oh wow actually I have to say a big THANK YOU for pointing this out! I do not remember ever reading that the sequence of addf statements actually matters, I definitely NEVER paid any attention to that and my experience with LinuxCNC (EMC2 at that time) is more than 10 years. oh well better late than never,,,
I will try to check tomorrow morning if that does change anything.
Ok, I will leave FF2 for the last step
Last edit: 06 Jul 2024 20:54 by viesturs.lacis.

Please Log in or Create an account to join the conversation.

More
07 Jul 2024 07:17 - 07 Jul 2024 07:30 #304569 by viesturs.lacis
I moved addf 5i24 write to the very bottom of addf statement list.
With P=1 and D=1.2 and other PID params = 0 I was able to jog Z axis up and down for 10-15 times. Changed to D=2 and a runaway on first attempt to move up. Lowered to D=1.5 and a runaway on first attempt to move up. Back to D=1.2 and I was able to move it for something around 10 times back and forth and then got a runaway.
One more thing is that runaways happen at the start of move when I try to move UP (and the runaway always is in opposite direction). There are 2 pneumatic cylinders that push that whole Z axis thing up to reduce the load on motor. I turned the motor by hand - moving up is slightly harder, I can feel a difference, but I would say that it is small
Last edit: 07 Jul 2024 07:30 by viesturs.lacis.

Please Log in or Create an account to join the conversation.

More
07 Jul 2024 14:44 #304582 by PCW
It really seem like an initial orientation angle problem
have you tried using a bldc offset of 90 degrees?

Please Log in or Create an account to join the conversation.

More
07 Jul 2024 16:26 - 07 Jul 2024 20:20 #304585 by viesturs.lacis
No, I did not try. What does it mean? Increase encoder-offset value by 1/4 of counts/rev (switch to another electrical zero point)?
Or is it meant to be bldc.0,drive-offset pin? Should I try 90 degrees (plus or minus) or experiment with values?

I am not sure about the encoder-offset value. The way I got that value 98 is this:
I followed Andy's suggestion:
1) started LinuxCNC, setp index-enable 1, turn motor by hand until encoder counts reset to 0
2) setp 8i20.current 0.8 (motor gets strong resistance but with some effort can still be rotated by hand) and motor snaps to its desired position
3) turned motor away numerous times in both directions, let it snap back and check the encoder counts value. it was changing in range from -72 to -80 so I took the middle of -76, checked remaining 3 positions where motor wants to snap and the difference in encoder counts was very close to 1000 (full turn is 4000)
4) repeated the same with setp 8i20.current -0.8, but was not sure what to do with those values. just noticed that the difference between these snap points vs previous is not very close to 500 counts
5) tried to spin the motor with encoder-offset of -76, did not work, but +76 was good. except that there was a difference in velocities between positive and negative BLDC input value

So I started increasing the encoder-offset value and the motor velocity for the same BLDC input value started increasing until velocity did not noticably change when encoder-offset increased from 96 to 98, so I sticked to it. (I did not try decreasing initial value of 76).

So that is 20 encoder counts away from initial position to which the motor wants to snap in, but given that one electrical revolution is 1000 counts, that does not seem too much, but I have no idea about the electrical processes in servo motors.

Please let me know what else could I check and try.
Last edit: 07 Jul 2024 20:20 by viesturs.lacis.

Please Log in or Create an account to join the conversation.

More
08 Jul 2024 14:07 #304668 by viesturs.lacis
I did some more tests - I still get runaways. This time I paid attention to bldc.0.rotor-angle and bldc.0.phase-angle values and I did little fiddle with bldc.0.drive-offset parameter.
Difference between rotor-angle and phase-angle is 0.25 or 0.75, quarter of electrical revolution or 90 degrees. And it does not change if drive-offset parameter value is changed. I tried 0, 45, 90 and -30 degrees.
What is relation between rotor-angle, phase-angle and drive-offset in BLDC component?

Please Log in or Create an account to join the conversation.

More
08 Jul 2024 14:37 #304670 by PCW
Can you try the non-index initialization ((q) mode?
I really cannot see how to get a full runaway unless the
initial angle is wrong.

When you say a runaway, do you mean continuous spinning?
(this would mean the encoder is working)

Loss of control (which is different than a runaway) may result
from  encoder issues. (lost counts etc)

You may need to disconnect the drive from the linear axis
and set huge following error limits to debug this fully

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.102 seconds
Powered by Kunena Forum