On 7/4/24 08:23, Stuart Stevenson wrote:
Gene,
Just picking a nit here.
Your claim of "A machine with stepper/servo's needs no PID's" is directly
countered by your previous statement "by the PID in the controller"
therefore the machine does have a PID somewhere.
I (and everyone else) know(s) what you meant. I just had to smile and then
I had to comment.
regards
Stuart
+100 Stuart, BTDT myself. I should have said "linuxcnc" needs no PID's,
The pid is totally in the controller, and linuxcnc knows nothing about
it. I have 5 of those motors in the garage, 2 in the sheldon, 2 in the
Z/B axises of my 6040 mill and one as an A axis on the GO704. 5 will
become 8 if I don't miss roll call first, as I've now collected a full
replacement for my normal steppers moving the GO704. I just need to get
my leg edema from diabetes under control so I can be more hours on my
feet to get it done. Its entirely too easy to forget that my next
birthday in October will be my 90th.
And 4 more are in various states of operational in 3d printers I'm
rebuilding. The improvement of the print by the better motor control is
very easily seen.
On Thu, Jul 4, 2024 at 5:21 AM gene heskett <ghesk...@shentel.net> wrote:
On 7/4/24 05:10, andy pugh wrote:
On Wed, 3 Jul 2024 at 20:32, Viesturs Lācis <viesturs.la...@gmail.com>
wrote:
I believe that I need to specify encoder-offset parameter, but I do
not understand how exactly encoder-offset value for BLDC component is
calculated.
I think that the motor "zero" angle for the 8i20 is defined as where
the motor sits with V+ connected to U and V- to V and W. If this is
where the index pulse is, then your encoder offset is zero.
You could do this with a bench PSU, but it's mayeb easier (and closer
to the real setup) to do it in a command-line hal session reset the
encoder to the index, then setp the angle to zero and setp the current
to a couple of amps (or enough to move the rotor) in each direction
and the encoder offset is the midpoint. (it's in counts)
Things are slightly complicated by the 8i20 built-in lead-angle
calculation. (ie, you give it _rotor_ angle and it calculates _phase_
angle)
eg:
halrun
loadrt hostmot2
loadrt hm2_eth board_ip=10.10.10.10
show pin
loadrt threads
addf hm2_....read thread1
addf hm2.....write thread1
start
loadusr halshow
{setup a watch of the encoder index-enable and counts)
setp encoder.0.index-enable 1
{rotate motor by hand until the index-enable resets)
setp hm2...8i20...current 0.5
{note the encoder counts}
setp hm2....8i20...current -0.5
{note the encoder counts)
{maybe repeat to get good statistics)
There may be enables to set, it's been a long time. You might need
more, or less, current. Depending on the pole count there will be
several zeros, one is likely to align very closely with the index.
If the encoder offset turns out to be zero, or close to zero, at this
point you should be able to scale the encoder to give a zero-to-one
output per _electrical_ revolution and connect the encoder angle to
the 8i20 commutation angle and spin the motor with current commands.
Thank you for a very educational post, Andy.
I personally have not used any BLDC motors as I've found the
stepper/servo to be an amazingly better control for me. They do exactly
what the stepper driver tells them to do as the motor is locked to the
stepper drivers output by the PID in the controller, which LCNC is not
aware of. A machine with stepper/servo's needs no PID's.
But I've pinned the above post and others should too as it seems to be
the best BLDC setup instructions we have seen here.
Take care & stay well Andy.
Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users