epics application development

Post on 03-Jan-2016

43 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

EPICS APPLICATION EPICS APPLICATION DEVELOPMENTDEVELOPMENT

EPICS SeminarEPICS Seminar

Presented by SHIFU XU ,IHEPPresented by SHIFU XU ,IHEP

20 August 200220 August 2002

OutlineOutline

PCI & ISA device driver on Linux PlatformPCI & ISA device driver on Linux Platform

Remote device driver via EthernetRemote device driver via Ethernet

VME I/O device driver on vxWorksVME I/O device driver on vxWorks

Application to developApplication to develop

PCI & ISA device driver PCI & ISA device driver

OS:Linux Redhat 7.1 OS:Linux Redhat 7.1

EPICS base release:3.14 alpha02/01EPICS base release:3.14 alpha02/01

ISA board:PC6310 A/D,12bits,32 channelsISA board:PC6310 A/D,12bits,32 channels

PCI board:PCI8020 PCI board:PCI8020 12bits A/D,8 channels (bipolar)12bits A/D,8 channels (bipolar) 8bits D/A, 2 channels8bits D/A, 2 channels 0~5v unipolar or -5v~+5v bipolar (AI)0~5v unipolar or -5v~+5v bipolar (AI) Conversion time < 10usConversion time < 10us

PCI device driver--hardwarePCI device driver--hardware

Workstation

unix or linux:bepc19.ihep.ac.cn

IOC

ETHERNET

PC

PC motherboard PCI ISA card

PC

Winnt/win98control3.ihep.ac.cn

Linux:controlx.ihep.ac.cn

OPI

CA

PCI device driver--testPCI device driver--test

Ethernet-based Device driverEthernet-based Device driver

AsynchronousAsynchronous Device driver Device driver IOC 3.13IOC 3.13 OPI MEDMOPI MEDM vxworks5.31, tornado1.01vxworks5.31, tornado1.01 compiler:ccppccompiler:ccppc gmakegmake

Ethernet-based Device driverEthernet-based Device driver

X t er mi nat orHP wor kst at i on

I OC PPC603PC

Ethernet

DA100

Ethernet-based Device driverEthernet-based Device driver

VME I/O device driverVME I/O device driver

Sun solaris 2.8 + Torado 2.02Sun solaris 2.8 + Torado 2.02

vxWorks 5.4vxWorks 5.4

MVME2431 cpu boardMVME2431 cpu board

MVME512—004 I/O moduleMVME512—004 I/O module 12bits D/A, 2 channels12bits D/A, 2 channels 16bits A/D, 16 channels (bipolar input)16bits A/D, 16 channels (bipolar input)

VME I/O device driverVME I/O device driver

VME I/O device driverVME I/O device driver

VME I/O device driverVME I/O device driver

Files involvedFiles involved

devM512.c, drvM512.cdevM512.c, drvM512.c

mydbExample1.db, mydbExample2.dbmydbExample1.db, mydbExample2.db

exampleApp.dbdexampleApp.dbd

st.cmdst.cmd

MakefileMakefile

exampleApp.dbdexampleApp.dbd

include "base.dbd"include "base.dbd"

device(ai,VME_IO,devAiM512,"MVME512board")device(ai,VME_IO,devAiM512,"MVME512board")

device(ao,VME_IO,devAoM512,"MVME512board")device(ao,VME_IO,devAoM512,"MVME512board")

driver(drvM512)driver(drvM512)

mydbExample1.dbmydbExample1.db

record(ao, "$(user):myaoExample")record(ao, "$(user):myaoExample"){{ field(DTYP, "MVME512board")field(DTYP, "MVME512board") field(OUT, "#C0 S1 @")field(OUT, "#C0 S1 @") field(SCAN, "Passive")field(SCAN, "Passive") field(LINR, "LINEAR")field(LINR, "LINEAR") field(ESLO, "0.00488281") #20.0/0xFFFfield(ESLO, "0.00488281") #20.0/0xFFF field(EGUF, "10.0")field(EGUF, "10.0") field(EGUL, "-10.0")field(EGUL, "-10.0") field(OMSL, "closed_loop")field(OMSL, "closed_loop") field(DOL, "$(user):calcExample.VAL NPP NMS")field(DOL, "$(user):calcExample.VAL NPP NMS") field(HOPR, "10")field(HOPR, "10") field(LOPR, "-10")field(LOPR, "-10")}}

mydbExample1.db(cont.)mydbExample1.db(cont.)

record(ai, "$(user):myaiExample")record(ai, "$(user):myaiExample"){{

field(DTYP, "MVME512board")field(DTYP, "MVME512board")field(INP, "#C0 S0 @")field(INP, "#C0 S0 @")field(SCAN,"Passive")field(SCAN,"Passive")field(LINR, "LINEAR")field(LINR, "LINEAR")field(ESLO, "0.00030518") #20.0/0xFFFFfield(ESLO, "0.00030518") #20.0/0xFFFFfield(EGUF, "10")field(EGUF, "10")field(EGUL, "-10")field(EGUL, "-10")field(HOPR, "10")field(HOPR, "10")field(LOPR, "-10")field(LOPR, "-10")

}}

st.cmdst.cmdcd "/export/home/xusf/epicsapp/512/bin/ppc604"cd "/export/home/xusf/epicsapp/512/bin/ppc604"ld < iocCoreld < iocCoreld < seqld < seqld < exampleLibld < exampleLibcd "/export/home/xusf/epicsapp/512/iocBoot/iocm512"cd "/export/home/xusf/epicsapp/512/iocBoot/iocm512"dbLoadDatabase("../../dbd/exampleApp.dbd")dbLoadDatabase("../../dbd/exampleApp.dbd")dbLoadRecords("../../db/mydbExample1.db","user=xusf")dbLoadRecords("../../db/mydbExample1.db","user=xusf")dbLoadRecords("../../db/mydbExample2.db","user=xusf")dbLoadRecords("../../db/mydbExample2.db","user=xusf")drvM512Verbose=(short)1drvM512Verbose=(short)1devM512Verbose=(short)1devM512Verbose=(short)1iocInitiocInit

Our plan Our plan

CAN bus device driver based on VMECAN bus device driver based on VME

Controlnet device driver based on VMEControlnet device driver based on VME

or via ethernetor via ethernet

ThanksThanks

top related