epics application development

19
EPICS APPLICATION EPICS APPLICATION DEVELOPMENT DEVELOPMENT EPICS Seminar EPICS Seminar Presented by SHIFU Presented by SHIFU XU ,IHEP XU ,IHEP 20 August 2002 20 August 2002

Upload: melvina-hartnett

Post on 03-Jan-2016

43 views

Category:

Documents


0 download

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

Page 1: EPICS APPLICATION DEVELOPMENT

EPICS APPLICATION EPICS APPLICATION DEVELOPMENTDEVELOPMENT

EPICS SeminarEPICS Seminar

Presented by SHIFU XU ,IHEPPresented by SHIFU XU ,IHEP

20 August 200220 August 2002

Page 2: EPICS APPLICATION DEVELOPMENT

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

Page 3: EPICS APPLICATION DEVELOPMENT

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

Page 4: EPICS APPLICATION DEVELOPMENT

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

Page 5: EPICS APPLICATION DEVELOPMENT

PCI device driver--testPCI device driver--test

Page 6: EPICS APPLICATION DEVELOPMENT

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

Page 7: EPICS APPLICATION DEVELOPMENT

Ethernet-based Device driverEthernet-based Device driver

X t er mi nat orHP wor kst at i on

I OC PPC603PC

Ethernet

DA100

Page 8: EPICS APPLICATION DEVELOPMENT

Ethernet-based Device driverEthernet-based Device driver

Page 9: EPICS APPLICATION DEVELOPMENT

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)

Page 10: EPICS APPLICATION DEVELOPMENT

VME I/O device driverVME I/O device driver

Page 11: EPICS APPLICATION DEVELOPMENT

VME I/O device driverVME I/O device driver

Page 12: EPICS APPLICATION DEVELOPMENT

VME I/O device driverVME I/O device driver

Page 13: EPICS APPLICATION DEVELOPMENT

Files involvedFiles involved

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

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

exampleApp.dbdexampleApp.dbd

st.cmdst.cmd

MakefileMakefile

Page 14: EPICS APPLICATION DEVELOPMENT

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)

Page 15: EPICS APPLICATION DEVELOPMENT

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")}}

Page 16: EPICS APPLICATION DEVELOPMENT

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")

}}

Page 17: EPICS APPLICATION DEVELOPMENT

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

Page 18: EPICS APPLICATION DEVELOPMENT

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

Page 19: EPICS APPLICATION DEVELOPMENT

ThanksThanks