I solved this problem, now I can home the the motor.

Now i would like to control the motor with PID. The problem is, that when i set 
some maximum value to bldc.value input, the motor does not accelerate, but 
stays still (the motor winding are powered). If i print the bldc.rotor-angle 
and bldc.phase angle, i can see there is 90 degree lead/lag (depending on the 
input value sign). So everything seem fine.

I noticed that at the index the rotor angle is set to 0. Is it possible that 
there should be some offset regarding to real motor angle? I did not find any 
rotor angle offset input in bldc.component. Is this the way to solve this?


Regards
Klemen



________________________________
 From: Peter C. Wallace <p...@mesanet.com>
To: Klemen Dovrtel <klemen_dovr...@yahoo.com>; Enhanced Machine Controller 
(EMC) <emc-users@lists.sourceforge.net> 
Sent: Thursday, February 21, 2013 5:51 PM
Subject: Re: [Emc-users] hal - bldc - linear motor
 
On Thu, 21 Feb 2013, Klemen Dovrtel wrote:

> Date: Thu, 21 Feb 2013 00:12:21 -0800 (PST)
> From: Klemen Dovrtel <klemen_dovr...@yahoo.com>
> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
> Subject: [Emc-users] hal - bldc - linear motor
> 
> Hello everybody,
> I would like to control the linear ac motor using bldc hal component. 
> 
> 1. I am not sure how should i set the:
> 
> bldc.N.scale s32 rw = The number of encoder counts per rotor revolution.
> bldc.N.poles s32 rw = The number of motor poles. The encoder scale will be 
> divided by this value to determine the number of encoder counts per 
> electrical revolution
> 
> I attached motor schematics. So if I understand this correctly, the motor has 
> 4 poles and the number of encoder counts per rotor revolution is 
> length_of_the_motor/encoder_resolution? The length_of_the_motor equals the 
> length of 4 magnetic poles?

Yes that sounds right

> 2. I am using the quadrature encoder with index signal for homing. I am 
> monitoring the encoder position using fpga that stores the position_value. 
> The position_value is set to 0 when fpga detects the index signal. I zero the 
> position value inside the fpga because the emc runs too slow to detect index 
> signal. So the problem is that this is somehow mixed quadrature and absolute 
> encoder. Is there a way to use the existing hal bldc component for homing my 
> motor. I can not use the "i Input type" because the emc should not offset the 
> encoder value and i can not use "a Input type" because i still have to home 
> the motor.

If the index is handled in the normal LinuxCNC way it should be OK, but 
clearing the counter may cause problems as you dont want any change in the 
raw-counts that are used for commutation while homing. I think most of the 
LinuxCNC encoder counters (both the software and various hardware counters)
_latch_ the count at index rather than clearing the count for 2 reasons:
1. Not losing the raw counts value and 2. not messing up the velocity estimation

> Regards
> Klemen

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to