Steve Blackmore wrote:
> On Wed, 30 Sep 2009 13:02:12 -0500, you wrote:
>
>
>   
>>> For interest, these are the only lines in my hal file that refer to
>>> encoder, can anybody see anything wrong or missing?
>>>
>>> loadrt encoder num_chan=1
>>>
>>> setp encoder.0.position-scale 500.000000
>>> net spindle-position encoder.0.position => motion.spindle-revs
>>> net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
>>> net spindle-index-enable encoder.0.index-enable <=>
>>> motion.spindle-index-enable
>>> net spindle-phase-a encoder.0.phase-A
>>> net spindle-phase-b encoder.0.phase-B
>>> net spindle-index encoder.0.phase-Z
>>>
>>>   
>>>       
>> There has to be an addf for the encoder component for it to be run, that 
>> assigns which RT thread
>> it runs at, hence its sampling rate.
>>     
>
> oops missed
>
> addf encoder.update-counters base-thread
>
>   
OK, good, but what is the rate of the bate thread set to?  That value is 
brought over
from a line in your xxxx.ini file.  There are probably 3 lines that read 
something like :
# Base task period, in nanoseconds - this is the fastest thread in the 
machine
BASE_PERIOD =                50000
# Servo task period, in nanoseconds - will be rounded to an integer multiple
#   of BASE_PERIOD
SERVO_PERIOD =               1000000
# Trajectory Planner task period, in nanoseconds - will be rounded to an
#   integer multiple of SERVO_PERIOD
TRAJ_PERIOD =                10000000

Can you tell me what laa of these lines read in your .ini file?

But, at least, you have the encoder counters running at the base-thread 
rate.  I was afraid you might have
been running the counter at the servo thread rate, which would really 
slow the sampling rate.  (Note the
above quoted numbers are NOT a recommended setting, just to show the 
part of the file in question.


Jon

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to