To use this card, you will have to write a HAL realtime component.
It sounds like doing this for your card will be fairly simple.
First, install the packages 'emc2-dev' and 'build-essential' using the
package manager. Then, have a look at the documentation for "comp":
http://linuxcnc.org/docs/html/hal_comp.html
you can either write .c code or .comp code, then compile & install it
with 'sudo comp --install'.
The standard set of HAL pins and parameters for an encoder-type input
are described here:
http://linuxcnc.org/docs/html/hal_general_ref.html#sec:CanonEncoder
.. in addition to "number of counts" (you'll have to derive a 32-bit
quantity from your card's 24-bit quantity), you will also need to
implement at least "position" (position = (double)counts / scale) for a
positional axis; for a spindle capable of threading, you also need
"index-enable".
You can take a gander at the other hardware drivers' source code here:
http://cvs.linuxcnc.org/cvs/emc2/src/hal/drivers/
hal_evoreg.c may not be a bad starting point -- it shows how to read
16-bit encoder counts and extend to 32 bits, read digital inputs and
outputs, and the boilerplate you have to write if you prefer to write
your component in .c and not in .comp. However, it doesn't show how
index-enable works.
Jeff
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users