EPICS Seminar: Developing Device Drivers for PCI, ISA, and VME on Linux and VxWorks
This seminar presents an overview of developing device drivers for PCI and ISA devices on the Linux platform, specifically using Redhat 7.1 and EPICS base release 3.14.alpha02/01. It includes remote device driver implementation via Ethernet and VME I/O device driver details with VxWorks 5.31. The session covers practical application development, including test drivers, asynchronous device drivers, and example databases related to specific hardware setups, including A/D and D/A configurations with various communication standards.
EPICS Seminar: Developing Device Drivers for PCI, ISA, and VME on Linux and VxWorks
E N D
Presentation Transcript
EPICS APPLICATION DEVELOPMENT EPICS Seminar Presented by SHIFU XU ,IHEP 20 August 2002
Outline • PCI & ISA device driver on Linux Platform • Remote device driver via Ethernet • VME I/O device driver on vxWorks • Application to develop
PCI & ISA device driver • OS:Linux Redhat 7.1 • EPICS base release:3.14 alpha02/01 • ISA board:PC6310 A/D,12bits,32 channels • PCI board:PCI8020 • 12bits A/D,8 channels (bipolar) • 8bits D/A, 2 channels • 0~5v unipolar or -5v~+5v bipolar (AI) • Conversion time < 10us
Ethernet-based Device driver • Asynchronous Device driver • IOC 3.13 • OPI MEDM • vxworks5.31, tornado1.01 • compiler:ccppc • gmake
VME I/O device driver • Sun solaris 2.8 + Torado 2.02 • vxWorks 5.4 • MVME2431 cpu board • MVME512—004 I/O module • 12bits D/A, 2 channels • 16bits A/D, 16 channels (bipolar input)
Files involved • devM512.c, drvM512.c • mydbExample1.db, mydbExample2.db • exampleApp.dbd • st.cmd • Makefile
exampleApp.dbd • include "base.dbd" • device(ai,VME_IO,devAiM512,"MVME512board") • device(ao,VME_IO,devAoM512,"MVME512board") • driver(drvM512)
mydbExample1.db record(ao, "$(user):myaoExample") { field(DTYP, "MVME512board") field(OUT, "#C0 S1 @") field(SCAN, "Passive") field(LINR, "LINEAR") field(ESLO, "0.00488281") #20.0/0xFFF field(EGUF, "10.0") field(EGUL, "-10.0") field(OMSL, "closed_loop") field(DOL, "$(user):calcExample.VAL NPP NMS") field(HOPR, "10") field(LOPR, "-10") }
mydbExample1.db(cont.) record(ai, "$(user):myaiExample") { field(DTYP, "MVME512board") field(INP, "#C0 S0 @") field(SCAN,"Passive") field(LINR, "LINEAR") field(ESLO, "0.00030518") #20.0/0xFFFF field(EGUF, "10") field(EGUL, "-10") field(HOPR, "10") field(LOPR, "-10") }
st.cmd cd "/export/home/xusf/epicsapp/512/bin/ppc604" ld < iocCore ld < seq ld < exampleLib cd "/export/home/xusf/epicsapp/512/iocBoot/iocm512" dbLoadDatabase("../../dbd/exampleApp.dbd") dbLoadRecords("../../db/mydbExample1.db","user=xusf") dbLoadRecords("../../db/mydbExample2.db","user=xusf") drvM512Verbose=(short)1 devM512Verbose=(short)1 iocInit
Our plan • CAN bus device driver based on VME • Controlnet device driver based on VME or via ethernet