On Wed, 2008-02-20 at 19:49 -0500, John Kasunich wrote: > Kirk Wallace wrote: > > I have a command/response test program working with a ModIO controller. > > You can see the C file read_Din-1b.c here: > > > > http://www.wallacecompany.com/machine_shop/EMC2/modbus/ > > > > Next, I would like to get it working with EMC2. I believe, I can just > > call my C program from a .hal file using "loadusr read_Din-1b". But how > > can I allow for HAL pins in my C file? Thanks. > > > The short version: include hal.h and call hal_init(), then > hal_pin_new(). There are lots of comments in hal.h that document the > API, and there are manpages for the API as well. > > Regards, > > John Kasunich
I just noticed the --userspace flag for comp. Can I just massage my C file into comp form and have comp do all the real work? Then just use "loadusr" instead of the "loadrt" I am used to with comp files? What do I do with "main"? Anyone have a favorite modern C book? (FYI - I saw a reference to Makers on PBS (Quest?) recently. They showed a CNC Cheese-Wiz prototyper, plasma cutter and BP type machine. Makers link here: http://makerfaire.com/ , http://www.kqed.org/quest/television/view/610 ) -- Kirk Wallace (California, USA http://www.wallacecompany.com/machine_shop/ Hardinge HNC lathe, Bridgeport mill conversion, doing XY now, Zubal lathe conversion pending) ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
