Info on HAL device driver

More
25 Nov 2009 11:09 #1191 by MarcoG
Hi all,
I'm new to Linux and EMC2 world, so I'm very noob, but I'm very interested on using it.

I read the docs and the wiki, and I know that EMC can actually support only a limited number of IO board.

My question is: if i want to use any athor board, i have to write a real time driver for it? So the best way is to start from zero or from source code (of course in case the maker release it)?
I found a reseller selling a board that have all the functionality I need (analog output for servo, incremental encoder counter, some digital IO). He make me available a RTAI driver, can I use it directly in EMC? (in fact I know that both have a "HAL" layer, is the same?)

The question arise because I'm italian (sorry for my english), and I'm looking for an interface board from a reseller/producer in Italy or at least in Europe.

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

More
25 Nov 2009 12:00 #1194 by BigJohnT
Being new to Linux I'd stick with something that is known to work with EMC. I would look at the Mesa cards as they are well supported.

EMC's HAL is only for EMC and is not the same as other HAL's.

What kind of board is it?

I don't know much about the RTAI but I doubt you could use his.

John

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

More
25 Nov 2009 16:20 #1195 by MarcoG
Replied by MarcoG on topic Re:Info on HAL device driver
First of all, thanks for the reply John.
I try to clarify my situation.

I'm an Industrial Automation Engineer, with my team, we are studying and researching for a system to control robot or little CNC, we found and discovered EMC so being open-source we would like to use it for our applications.

The board I refer to is the PCI-8136 by ADLink, which I can buy from a local reseller, and as I said earlier, we have to use this bord (or one like this) who is available in Italy market.

When I said that I'm new to Linux and EMC2 software, I mean that I haven't a lot of experience yet, but I know pretty well C language and programming in general, so i think we are able to develop an appropriate driver for EMC.

Are there some manual or tutorial or guideline to follow for writing and developing a driver of this kind?

Thanks in advance.

Marco

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

More
25 Nov 2009 20:42 #1198 by micges
Replied by micges on topic Re:Info on HAL device driver
Hello,

You can write realtime HAL driver for PCI-8136 by ADLink to use with EMC but it is quite hard and there is no guide, but there are some rules to follow:
www.linuxcnc.org/docview/devel/html//hal_general_ref.html.

hal skeleton driver:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...b4319534d5b1a7289f61

emc hal driver for LPT port:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...b4319534d5b1a7289f61

and source tree for driver for simmilar card to 8136:
git.linuxcnc.org/gitweb?p=emc2.git;a=tre...b4319534d5b1a7289f61

regards,
Michael

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

More
26 Nov 2009 10:05 #1204 by MarcoG
Replied by MarcoG on topic Re:Info on HAL device driver
Hi Michael.

I think I have a lot of work to do, but your advice is to write the C code instead of using the COMP tool?

I downloaded the "HAL_User_Manual.pdf", did it contain the same info in respect to the html develop version?

Marco

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

More
26 Nov 2009 10:53 - 26 Nov 2009 10:55 #1205 by micges
Replied by micges on topic Re:Info on HAL device driver
Comp tool isn't prepared for writing device drivers and it could haven't some functionality you will require.
So I propose to stick with C (it's harder but you have total control).

In HAL_User_Manual.pdf chapter 4 there are interface defining info you will require.
[update] But in pdf info are in additional to devel html version.

regards,
Michael
Last edit: 26 Nov 2009 10:55 by micges.

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

More
26 Nov 2009 11:17 #1206 by MarcoG
Replied by MarcoG on topic Re:Info on HAL device driver
Thanks to all for the reply.

I'll come back as soon as I have more question.

PS: I'm at the beginning yet, but this is a great software with a great community!

Best regards,
Marco

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

Time to create page: 0.094 seconds
Powered by Kunena Forum