[ag-automation] LDI-Interface

Robert Schwebel r.schwebel at pengutronix.de
Thu Jul 19 08:41:57 CEST 2007


On Thu, Jul 19, 2007 at 08:02:37AM +0200, Thomas Rothfuss wrote:
> > For the OSADL framework, things will have to be integrated into the C
> > code. But anyway, that's a thing we can do a little bit later, when the
> > framework itself has stabilized.
> 
> The interface is a C interface. See FAPIA.h.

We want to keep the overhead low. Note that not all people out there are
in the luxury situation to have a big machine under the code; note that
there are also things like netX with 8 MB RAM, or ARM720 with 75 MHz,
but CAN bus. We also want to keep the build prerequisites low.

> I uploaded the whole project into 
> https://www.osadl.org/svn/osadl/software/fieldbus-framework/fapia-trunk

Great, thanks! I'll have a look as soon as I have the lowlevel stuff in
a little bit better shape.

> > I still don't understand it. Ok, there may be "parameters", which
> > are key/value pairs. But how do you use it? Can you explain an
> > example for a real-world parameter? How is it _used_?
> 
> There are two possibilities.
> 
> 1. The parameter is a hardware address without mapping. There's a PLC
> which wants to communicate with the CAN. The PLC-Process sends the
> key/value to the CAN-Process. The CAN-Process interprets the
> parameter name which is the address and writes the value direct via
> the CAN-Driver to the device.

Hardware address of ... what? Speaking of CAN, that doesn't have such a
thing. It just has messages, identifiers and message payload, and they
are communicated to the driver via sockets, so there is no need to know
anything about hardware addresses outside of the kernel driver. Or
CANopen? Do you mean Object Dictionairy addresses?

Note also that, at the moment, there is no such thing as a CAN process.
All backend implementation is done with shared library "drivers", being
loaded dynamically with dlopen. I suppose you are talking about these
adapter code.

> 2. There is a logical device with parameters The CNC wants to set the
> parameter "speed" at the "X-axis". The CNC-Process sets the
> logical_object_name in the FAPIACommunication struct to "X-axis". In
> the FAPIAParameter struct the parameter_name is set to "speed". In the
> FAPIAValue struct the data_value is set. Now the function
> fapia_parameter_write_request is called. FAPIA looks up in the
> configuration file named fieldbus_conf.xml where the "X-axis" is
> located. This is e.g. the "Profinet"-Process. So the message is sent
> to the Profinet-Process. This process does the conversion from the
> Logical Device Interface (LDI) to the FDDI.
>
> So the only thing FAPIA has to interpret is the configuration file to
> retrieve the destination address.

I had the impression that we would be talking about async communications
here?

Nevertheless, I'll have a deeper look when ... see above.

And I still think that a face-to-face meeting between the people
involved in this stuff would be a pretty good idea.

> Well if you look closer to the license of FAPIA you'll determine
> that FAPIA is completely free (even more free than GPL ;-)). You
> may even use it in commercial software.

Great! That's also the case with GPL+LinkException, btw. Nevertheless,
compatibility has to be checked carefully before something can be
integrated.

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9



More information about the ag-automation mailing list