BLDC component with 8i20 - how to get to work?
- viesturs.lacis
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 4
08 Jul 2024 17:37 - 08 Jul 2024 19:28 #304683
by viesturs.lacis
Replied by viesturs.lacis on topic BLDC component with 8i20 - how to get to work?
Ok, sounds very legit, I definitely can try that. How does the "q" mode work? Bldc man page is not very descriptive on this. I guess I have to disconnect index-enable pin and observe bldc.0.offset-measured. Anything else?
With runaway I mean fast motion in the opposite direction until following error is triggered, so I guess that does correspond to "continuous motion". Yes, I am sure that encoder signal is good because I have old servo drives still in the cabinet that export the signal to LinuxCNC and this machine was introduced to LinuxCNC 3-4 years ago and never have been issues with encoder feedback (there have been no changes so far how the encoder signal is delivered to LinuxCNC).
With runaway I mean fast motion in the opposite direction until following error is triggered, so I guess that does correspond to "continuous motion". Yes, I am sure that encoder signal is good because I have old servo drives still in the cabinet that export the signal to LinuxCNC and this machine was introduced to LinuxCNC 3-4 years ago and never have been issues with encoder feedback (there have been no changes so far how the encoder signal is delivered to LinuxCNC).
Last edit: 08 Jul 2024 19:28 by viesturs.lacis.
Please Log in or Create an account to join the conversation.
- viesturs.lacis
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 4
08 Jul 2024 20:41 - 08 Jul 2024 20:41 #304699
by viesturs.lacis
Replied by viesturs.lacis on topic BLDC component with 8i20 - how to get to work?
I tried "q" mode.
I am pretty sure that there is something missing in the procedure that I was doing.
I commented out 2 lines that link bldc index-enable pin and sets encoder-offset value.
Started LinuxCNC, let the init process finish, observe bldc.0.offset-measured value, write it down, close LinuxCNC and repeat 2 more times.
Values that I got: 39984, 24798, 49060. Since that is 1000 PPR encoder that would give 4000 counts per shaft turn (1000 counts per electric turn), then those differences of ten thousand counts do not make sense to me.
And what does this offset-measured mean exactly? Distance in encoder counts between what 2 locations? One should be electrical zero of rotor, but what is the other if index is ignored in "q" mode?
Or should I place the motor on index manually and then start LinuxCNC and let it do the init process?
I am pretty sure that there is something missing in the procedure that I was doing.
I commented out 2 lines that link bldc index-enable pin and sets encoder-offset value.
Started LinuxCNC, let the init process finish, observe bldc.0.offset-measured value, write it down, close LinuxCNC and repeat 2 more times.
Values that I got: 39984, 24798, 49060. Since that is 1000 PPR encoder that would give 4000 counts per shaft turn (1000 counts per electric turn), then those differences of ten thousand counts do not make sense to me.
And what does this offset-measured mean exactly? Distance in encoder counts between what 2 locations? One should be electrical zero of rotor, but what is the other if index is ignored in "q" mode?
Or should I place the motor on index manually and then start LinuxCNC and let it do the init process?
Last edit: 08 Jul 2024 20:41 by viesturs.lacis.
Please Log in or Create an account to join the conversation.
08 Jul 2024 21:19 #304702
by PCW
Replied by PCW on topic BLDC component with 8i20 - how to get to work?
Can you
1. use you original (qi) setup
2. decouple the motor from the linear axis
3. set the following error limits to huge numbers
4. See if the d term causes a multi-turn runaway
1. use you original (qi) setup
2. decouple the motor from the linear axis
3. set the following error limits to huge numbers
4. See if the d term causes a multi-turn runaway
Please Log in or Create an account to join the conversation.
- viesturs.lacis
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 4
09 Jul 2024 10:36 - 09 Jul 2024 11:28 #304740
by viesturs.lacis
Replied by viesturs.lacis on topic BLDC component with 8i20 - how to get to work?
Here you go:
In essence: BLDC component in "qi" mode, ferror set at 5000 mm and belt removed. I can jog the motor back and forth with D = 1, but it immediately runs away as soon as set D = 4 and press "test".
I have attached INI and HAL files
In essence: BLDC component in "qi" mode, ferror set at 5000 mm and belt removed. I can jog the motor back and forth with D = 1, but it immediately runs away as soon as set D = 4 and press "test".
I have attached INI and HAL files
Last edit: 09 Jul 2024 11:28 by viesturs.lacis.
Please Log in or Create an account to join the conversation.
09 Jul 2024 15:02 #304758
by PCW
Replied by PCW on topic BLDC component with 8i20 - how to get to work?
Honestly it sounds like the initial angle is still not correct
You might try adjusting the offset by small increments
and checking how high you can set the D term
Also the negative init current seem strange
Another possibility is checking whether raising the servo
thread rate (to say 4 KHz) helps
You might try adjusting the offset by small increments
and checking how high you can set the D term
Also the negative init current seem strange
Another possibility is checking whether raising the servo
thread rate (to say 4 KHz) helps
Please Log in or Create an account to join the conversation.
- viesturs.lacis
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 4
09 Jul 2024 15:46 #304759
by viesturs.lacis
Replied by viesturs.lacis on topic BLDC component with 8i20 - how to get to work?
Should I try with motor only or put the belt back on (e.g. the lack of load - is it going to highlight the issue no)?
Negative init is for reversing direction of motion during init process. I tried setp bldc.0.rev 1 (I am not sure what does this do) but it seemed to me that the direction did not change.
Negative init is for reversing direction of motion during init process. I tried setp bldc.0.rev 1 (I am not sure what does this do) but it seemed to me that the direction did not change.
Please Log in or Create an account to join the conversation.
- viesturs.lacis
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 4
17 Jul 2024 09:57 - 17 Jul 2024 12:13 #305470
by viesturs.lacis
Replied by viesturs.lacis on topic BLDC component with 8i20 - how to get to work?
Peter could you please explain the relation of all the scale parameters?
There is max_output in PID module
There are several scale parameters for 8i20
I understand scale and max_output for PID when analog servodrives are controlled and then it is only one place to specify.
Now there are also scale values in 8i20. The motor has rated current of 11,7A. How do I translate it into these values? My conclusion is that playing with 8i20.current-scalemax and pid.maxoutput does affect at what velocity does the runaway happen.
There is max_output in PID module
There are several scale parameters for 8i20
I understand scale and max_output for PID when analog servodrives are controlled and then it is only one place to specify.
Now there are also scale values in 8i20. The motor has rated current of 11,7A. How do I translate it into these values? My conclusion is that playing with 8i20.current-scalemax and pid.maxoutput does affect at what velocity does the runaway happen.
Last edit: 17 Jul 2024 12:13 by viesturs.lacis.
Please Log in or Create an account to join the conversation.
17 Jul 2024 14:17 #305490
by PCW
Replied by PCW on topic BLDC component with 8i20 - how to get to work?
I would set the 8I20 current scalemax and PID max output
to the _peak_ current rating of the motor.
Did you try raising the servo thread rate to say 4 KHz?
to the _peak_ current rating of the motor.
Did you try raising the servo thread rate to say 4 KHz?
Please Log in or Create an account to join the conversation.
- viesturs.lacis
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 4
18 Jul 2024 10:34 - 18 Jul 2024 10:53 #305565
by viesturs.lacis
Replied by viesturs.lacis on topic BLDC component with 8i20 - how to get to work?
Please find attached main INI and HAL files.
8I20 current scalemax and PID max output are set to 30, while 8i20 nvmaxcurrent is 750 (is that 7,5A?)
I tried increasing servo thread rate to 4 kHz but the pc could not handle that - I got immediate realtime errors. Now the servo thread rate is 2,5kHz with traj_period set to 3x longer than servo_period (that did improve picture in latency histogram).
Another change from previous attempts is reinstalled to Debian12 and LinuxCNC 2.9.3. What I have now is that bare motor moves fine, PID is tuned to a peak ferror of 0.2, but when I put the belt on, there is no motion at all. It cannot do even init move for bldc. I can easily move the motor by hand and that is how I get init-done. Then if I try to jog, there is no motion at all. pid output goes up until it reaches max, but nothing moves. Take off belt and motor moves just fine and is strong enough that I cannot turn it by hand.
As I started blind attempts few days ago after my previous post at first there were runaways approximately at 2-3 m/min when going in "positive" direction. Changing pid maxoutput and scalemax values resulted in motor spinning in both direction at 100m/min (which is close to 4K RPM). And I get more or less equal velocity (positive or negative) if I manually set bldc.value to plus or minus 0.2A, (this was suggested by you in some forum thread) so I think that encoder-offset should be if not perfect than at least usable to get at least some motion.
Today I wanted to try with the belt on and it does not move at all. Pid output is saturated, 8i20 current pin value is 30A and motor is not even warm. It seems to me that there is some parameter in the way and motor is not receiving anything even close to 30A. As I mentioned, nvcurrentmax is 750. I am not sure I understand the manual correctly but it seems that this means 7,5A. Is that correct? How do I change that? Is there any other parameter I should look at?
8I20 current scalemax and PID max output are set to 30, while 8i20 nvmaxcurrent is 750 (is that 7,5A?)
I tried increasing servo thread rate to 4 kHz but the pc could not handle that - I got immediate realtime errors. Now the servo thread rate is 2,5kHz with traj_period set to 3x longer than servo_period (that did improve picture in latency histogram).
Another change from previous attempts is reinstalled to Debian12 and LinuxCNC 2.9.3. What I have now is that bare motor moves fine, PID is tuned to a peak ferror of 0.2, but when I put the belt on, there is no motion at all. It cannot do even init move for bldc. I can easily move the motor by hand and that is how I get init-done. Then if I try to jog, there is no motion at all. pid output goes up until it reaches max, but nothing moves. Take off belt and motor moves just fine and is strong enough that I cannot turn it by hand.
As I started blind attempts few days ago after my previous post at first there were runaways approximately at 2-3 m/min when going in "positive" direction. Changing pid maxoutput and scalemax values resulted in motor spinning in both direction at 100m/min (which is close to 4K RPM). And I get more or less equal velocity (positive or negative) if I manually set bldc.value to plus or minus 0.2A, (this was suggested by you in some forum thread) so I think that encoder-offset should be if not perfect than at least usable to get at least some motion.
Today I wanted to try with the belt on and it does not move at all. Pid output is saturated, 8i20 current pin value is 30A and motor is not even warm. It seems to me that there is some parameter in the way and motor is not receiving anything even close to 30A. As I mentioned, nvcurrentmax is 750. I am not sure I understand the manual correctly but it seems that this means 7,5A. Is that correct? How do I change that? Is there any other parameter I should look at?
Last edit: 18 Jul 2024 10:53 by viesturs.lacis.
Please Log in or Create an account to join the conversation.
18 Jul 2024 14:18 - 18 Jul 2024 14:24 #305576
by PCW
Replied by PCW on topic BLDC component with 8i20 - how to get to work?
Yes, it's set for 7.5 A full scale
I would set it for 30 A full scale
with
setp xxxx.xxxx.nvmaxcurrent 3000
in the hal file
(this will only take effect after a 8I20 low voltage power cycle)
(pretty sure this will work on a 8I20 Otherwise it will need setsserial)
What are the nameplate ratings of the motor? (voltage and peak amps)
I would set it for 30 A full scale
with
setp xxxx.xxxx.nvmaxcurrent 3000
in the hal file
(this will only take effect after a 8I20 low voltage power cycle)
(pretty sure this will work on a 8I20 Otherwise it will need setsserial)
What are the nameplate ratings of the motor? (voltage and peak amps)
Last edit: 18 Jul 2024 14:24 by PCW.
Please Log in or Create an account to join the conversation.
Time to create page: 0.091 seconds