dispatcher function questions
- Subject: dispatcher function questions
- From: garrett beaubien <garrettb77-at-yahoo.com>
- Date: Wed, 27 Sep 2000 15:43:32 -0700 (PDT)
- Content-Transfer-Encoding: 8bit
- Content-Type: text/plain; charset=us-ascii
Hello,
I have been trying to write a module for my homebuilt
single axis servo. I now have code that I can compile
and run using EMC, due to much help I got on this
list. The code doesn’t do much yet, as there are
problems with it. When I start EMC, and “home” the
axis, the commanded position keeps increasing (even
beyond the soft limit in the emc.ini file). I have
narrowed this problem down to my extEncoderReadAll
function. If I set the axis position to a constant
value (ie *counts[0] =128.0; *counts[1] = 0;
*counts[2] = 0;), I can home the axis. When I try and
read the value from the actual hardware, (ie
*counts[0] = inb(257); *counts[1] = 0; *counts[2] =
0;), the axis will not home. For both of these test
compilations, the rest of the code is identical. I
coded the function that reads the home switch to
always return a 0. I guess I should mention I only
have a single axis with hardware, but the emc.ini file
has 3 axes.
I have a couple of questions.
How does EMC “home” an axis? I thought that it would
just output a drive to the axis of interest, and keep
polling the home switch, and would home (turn green)
when the switch value was of the same polarity as that
specified in the emc.ini file? Does EMC care about
the encoder value counts during this operation? Could
it be that there is a problem with my function, and my
encoder values are constantly changing, making it
impossible to home the axis?
Would it be possible to insert an rtl_printf statement
into these dispatcher functions? I think that I would
have to substatially increase the scan times (or else
rtl_printf may crash the system?), but then at least I
could see what the encoder values actually are. I
tried to insert this statement into the function, and
put a #include<rtl.h> at the top of the file, but the
compiler complained when I did a make PLAT-rtlinux_2_0
all. Is there any way to print or log values?
Thanks in advance
Garrett.
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/
Date Index |
Thread Index |
Back to archive index |
Back to Mailing List Page
Problems or questions? Contact