[MAT logo][Prev][Up][Next]

CIF I/O

Introduction

This MAT module, together with the corresponding kernel module (device driver), interfaces with CIF I/O cards.

These cards support the following networks and protocols (in alphabetical order): ASi, CANopen, ControlNet, DeviceNet, Interbus, ModBus Plus, PROFIBUS and Sercos. Hilscher implements the protocol and pays the license in their firmware. By using this as the interface to the bus, we can still use GPL-able code to talk to the firmware on the card and out through the network.

Download note

The CIF kernel driver is not included in some of the downloads, for instance the weekly tarball, because of its size. If you plan to use this module, make sure that you download a version which includes it.

Mapping

The <io_addr> column of the map is a simple offset.bit format. The offset ranges from 0 to the process image size, and the bit ranges from 0 to 7.

Numbers may be given in decimal (58) or hexadecimal (0x3A). The .bit part may be omitted.

MatPLC points larger than 1 bit will be mapped starting at the given <offset>.<bit> location, and carry on from there. Note that this means that the data of a matplc point may also fall onto the subsequent bytes of the process image, if required.

Examples:

map out 0.0 a_mat_1bit_point
the mat point will only fall on 0.0

map out 1.0 a_mat_16bit_point
the mat point will fall on 1.0 to 2.7

map out 3.0 a_mat_32bit_point
the mat point will fall on 3.0 to 6.7

map out 10.4 a_mat_8bit_point
the mat point will fall on 10.4 to 11.3

map out 20.6 a_mat_32bit_point
the mat point will fall on 20.6 to 24.5

Configuration

BoardID
The CIF card BoardId. This is the ID the kernel module uses to identify the card we want to use.

The CIF module of the MatPLC does not directly access the CIF card. It does so through a kernel module (i.e. a device driver) specific for CIF cards. When this module is loaded, it finds every PCI based CIF card automatically. Cards on the ISA bus have to be explicitly specified on the command line when the device driver is loaded. Each card that the device driver can correctly access is given a unique number from 0..3. Since this module uses the device driver to control the CIF card, what the module needs is the number the device driver gave the CIF card.

Defaults to 0

DPMsize
The DPM (Dual Port Memory) Size, in kBytes.

This is the size of the DPM on the card the module will be using. Actually this parameter is not very important, this is basically just to allow the CIF mofule to verify at configuration time if any plc point will be mapped onto an offset that falls outside the card's process image. The In and Out process images are disjoint, and do not overlap. The size (in bytes) of each process image depends on the DPM size (in kBytes) and is given by: ((DPMsize * 1024) - 1024) / 2

At runtime the module will verify if the card that it is using really does have a DPM the size the user says it should have.

Defaults to 8. Other possible value seems to be 2 (kBytes).

timeout
Maximum timeout when trying to access the CIF card. Value is interpreted as ms, 0 means no timeout. Default is 100 (ms).

[Prev][Up][Next]

$Date: 2004/12/28 05:32:10 $