Summary | Admin | Home Page | Forums | Tracker | Bugs | Support | Patches | Lists | Tasks | Docs | Surveys | News | CVS | Files
Back to compatibility list

Advantech PCL-812PG

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.

Required Material


  1. 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.

  2. 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.

  3. Download MatPLC from cvs ( into a directory (in my case /usr/local/mat/matcvs/).

  4. 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.

  5. Compile the new kernel using the new kernel-source. There should be plenty of documentation elsewhere on how to build a kernel, but briefly:
    1. Get the new kernel source using "apt-get install kernel-source-2.4.18"
    2. Inside /usr/src extract the kernel sources using "tar -xjf kernel-source-2.4.18.tar.bz2"
    3. 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"
    4. cp /usr/src/linux-source-2.4.18/arch/i386/boot/bzImage /boot/bzImage2.4.18
    5. Add /boot/bzImage2.4.18 to /etc/lilo.conf and run lilo to update the boot record. Check lilo documentation for this step.
    6. Restart the machine, select the new kernel at the lilo prompt. We need the new kernel to be working before continuing.

  6. Install comedi, comedi has two parts comedi and comedilib:
    1. Install comedilib using "apt-get install libcomedi-dev"
    2. Get comedi source, "apt-get install comedi-source"
    3. Inside /usr/src extract comedi using "tar -xzf comedi.tar.gz"
    4. Inside /usr/src/module/comedi execute configure, make, make install.
    5. If this is the first time you install comedi also do "make dev" to create /dev/comediN (where N = 0..3)

  7. Load the modules using "modprobe comedi" and "modprobe pcl812"

  8. 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

  9. Set library path, "export LD_LIBARY_PATH=/usr/local/mat/matcvs/lib/.libs"

  10. 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
And that will be all.

Juan Carlos Orozco
ACElab Industrial Automation

$Date: 2003/09/11 14:18:18 $