Home Page |
Back to compatibility list
The next information will be specific to linux debian 3.0 and a PCL-812PG
Advantech ISA I/O board, although it could be used as a starting point for
a different configuration.
- An old PC. Remember we need an ISA socket for this card. Besides that,
it is a good idea to test IO with a cheap machine. For the demo we will
need GTK and therefore XWindows so we will need some computation power IMO
you will be OK with any Pentium type of machine. 64MRam, 4GB HD, CDROM.
- Debian 3.0 (I used 3.0r1) CD's.
- Advantech PCL-812PG card 20 wire ribbon connectors and the
corresponding terminal boards.
- A multimeter.
And that will be all.
- Using the Advantech card manual configure the board to the desired
settings by moving the dip-switches and jumpers, then write down the
settings. In my case Address 0x220, 0 to 10V DAC, -10 to 10V ADC, no
IRQ, no DMA. Place the board in the computer connect the ribbon cables
to the terminal boards and close the computer.
- Install the debian OS in the machine. I used the first debian 3.0r1
CDROM and configured an Internet connection trough Ethernet using the
companies gateway connected through ADSL to the ISP. Adding a debian ftp
site to the apt/sources.list. Having this it is possible to grab debian
packages just by invoking the usual "apt-get install package_name". I
did all this installation as root user.
- Download MatPLC from cvs (mat.sf.net) into a directory (in my case
- Install the libgtkextra-dev package. This package is needed to compile
the hmi_gtk module. We will also need to get glade and gnome developer
packages. Install libncurses-dev package.
- Compile the new kernel using the new kernel-source. There should be
plenty of documentation elsewhere on how to build a kernel, but briefly:
- Get the new kernel source using "apt-get install
- Inside /usr/src extract the kernel sources using "tar -xjf
- From /usr/src/kernel-source-2.4.18/ use "make menuconfig" select
the kernel options be sure to include the needed hardware compatibility
then do "make dep", "make clean bzImage", "make modules", "make modules_install"
- cp /usr/src/linux-source-2.4.18/arch/i386/boot/bzImage
- Add /boot/bzImage2.4.18 to /etc/lilo.conf and run lilo to
update the boot record. Check lilo documentation for this step.
- Restart the machine, select the new kernel at the lilo prompt. We
need the new kernel to be working before continuing.
- Install comedi, comedi has two parts comedi and comedilib:
- Install comedilib using "apt-get install libcomedi-dev"
- Get comedi source, "apt-get install comedi-source"
- Inside /usr/src extract comedi using "tar -xzf comedi.tar.gz"
- Inside /usr/src/module/comedi execute configure, make, make
- If this is the first time you install comedi also do "make dev" to
create /dev/comediN (where N = 0..3)
- Load the modules using "modprobe comedi" and "modprobe pcl812"
- Based on the information taken from the board switches and jumper
settings and following the configuration options described on the head
of the pcl812.c program configure the port using:
comedi_config /dev/comedi0 pcl812pg 0x220,0,0,0,1,1
- Set library path, "export
- Compile MatPLC. Change to /usr/local/mat/matcvs/demo/basic_comedi/
type make and then ./demo. Remember that /usr/local/mat/matcvs/ is where
I uploaded Mat but if you choose a diferent directory change this step
and the previous one accordingly
Juan Carlos Orozco
ACElab Industrial Automation
$Date: 2003/09/11 14:18:18 $