Compatible Hardware

More
19 Oct 2011 21:46 #14067 by tulleg
Compatible Hardware was created by tulleg
Hello,

New to CNC and EMC. I'm an electronic engineer with an interest in CNC and EMC. I've been looking at the available hardware and it occurred to me that there may be a market for configurable, expandable hardware interfaces.

Can anyone point me at documentation that details how to write driver software for EMC?

There is a PCI interface development kit from ALTERA: DK-MAXII-1270N see www.altera.com/products/devkits/altera/kit-maxii-1270.html

Thanks

geoff

Please Log in or Create an account to join the conversation.

More
19 Oct 2011 22:10 #14068 by andypugh
Replied by andypugh on topic Re:Compatible Hardware
tulleg wrote:

Can anyone point me at documentation that details how to write driver software for EMC?


It is scattered about a bit.
The interface between all current drivers and EMC2 is the HAL (Hardware Abstraction Layer)
Simple drivers (and some fairly complicated ones) can be written in comp.
linuxcnc.org/docs/html/hal_comp.html
An example of a simple driver written in comp (for an ISA card, but the principle is the the same) can be seen here:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...1b82c0055d71568edc73
The comp pre-processor expands that file into something looking like the Motenc PCI driver:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...1b82c0055d71568edc73
The useful HAL API and RTAPI calls are listed and linked at the bottom of this page:
www.linuxcnc.org/docview/html/

The most important is possibly www.linuxcnc.org/docview/html/man/man3/rtapi_inb.3rtapi.html, but your driver needs to have the right structure (for example a function called rtapi_app_main )

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum