一、前期准备
计算机操作系统是 win7_32bit
成功安装:
- Epics base、medm
- synApps(或者,最简单地,只安装asyn,autosave,busy,calc,motor,sscan这几个必须的模块)
- 将这些模块加入PATH目录,例如 set “PATH=%PATH%;C:/Epics/support/motor-R7-1/bin/win32-x86”
- 将motor,sscan模块中所有的adl文件,放入C:/Epics/adl目录下,并设置EPICS_DISPLAY_PATH=C:/Epics/adl
二、创建IOC
在任意你想要的目录下,创建newportQ8文件夹,然后进入其中创建IOC
mkdir newportXPSQ8
cd newportXPSQ8
makeBaseApp.pl -t ioc xpsQ8
makeBaseApp.pl -i -t ioc xpsQ8
三、配置环境信息
1. 配置configure/RELEASE文件
# Variables and paths to dependent modules:
#MODULES = /path/to/modules
#MYMODULE = $(MODULES)/my-module
SUPPORT=C:/Epics/support
# ASYN is needed to compile asyn device support
ASYN=$(SUPPORT)/asyn-R4-36
# BUSY is this module
BUSY=$(SUPPORT)/busy-R1-7-2
MOTOR=$(SUPPORT)/motor-R7-1
CALC=$(SUPPORT)/calc-R3-7-3
SSCAN=$(SUPPORT)/sscan-R2-11-3
AUTOSAVE=$(SUPPORT)/autosave-R5-10
# EPICS_BASE should appear last so earlier modules can override stuff:
EPICS_BASE = C:/Epics/base-7.0.4
# Set RULES here if you want to use build rules from somewhere
# other than EPICS_BASE:
#RULES = $(MODULES)/build-rules
# These lines allow developers to override these RELEASE settings
# without having to modify this file directly.
-include $(TOP)/../RELEASE.local
-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
-include $(TOP)/configure/RELEASE.local
2. 配置xpsQ8App/src/Makefile
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#=============================
# Build the IOC application
PROD_IOC = xpsQ8
# xpsQ8.dbd will be created and installed
DBD += xpsQ8.dbd
# xpsQ8.dbd will be made up from these files:
xpsQ8_DBD += base.dbd
# Include dbd files from all support applications:
#xpsQ8_DBD += xxx.dbd
xpsQ8_DBD += asyn.dbd
xpsQ8_DBD += drvAsynSerialPort.dbd
xpsQ8_DBD += motorSupport.dbd
xpsQ8_DBD += devNewport.dbd
xpsQ8_DBD += busySupport.dbd
xpsQ8_DBD += calcSupport.dbd
xpsQ8_DBD += sscanSupport.dbd
xpsQ8_DBD += sscanProgressSupport.dbd
xpsQ8_DBD += asSupport.dbd
# Add all the support libraries needed by this IOC
#xpsQ8_LIBS += xxx
xpsQ8_LIBS += asyn
xpsQ8_LIBS += motor
xpsQ8_LIBS += Newport
xpsQ8_LIBS += busy
xpsQ8_LIBS += calc
xpsQ8_LIBS += sscan scanProgress
xpsQ8_LIBS += autosave
# xpsQ8_registerRecordDeviceDriver.cpp derives from xpsQ8.dbd
xpsQ8_SRCS += xpsQ8_registerRecordDeviceDriver.cpp
# Build the main IOC entry point on workstation OSs.
xpsQ8_SRCS_DEFAULT += xpsQ8Main.cpp
xpsQ8_SRCS_vxWorks += -nil-
# Add support from base/src/vxWorks if needed
#xpsQ8_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
# Finally link to the EPICS Base libraries
xpsQ8_LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
3. 配置xpsQ8App/Db/Makefile
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db
### These databases come from motor
DB_INSTALLS += $(MOTOR)/db/asyn_motor.db
DB_INSTALLS += $(MOTOR)/db/asyn_motor_positions.req
DB_INSTALLS += $(MOTOR)/db/asyn_motor_settings.req
DB_INSTALLS += $(MOTOR)/db/basic_asyn_motor.db
DB_INSTALLS += $(MOTOR)/db/profileMoveController.template
DB_INSTALLS += $(MOTOR)/db/profileMoveController_settings.req
DB_INSTALLS += $(MOTOR)/db/profileMoveAxis.template
DB_INSTALLS += $(MOTOR)/db/profileMoveAxis_settings.req
ifdef MOTOR_NEWPORT
### motorNewport was built outside motor
DB_INSTALLS += $(MOTOR_NEWPORT)/db/HXP_extra.db
DB_INSTALLS += $(MOTOR_NEWPORT)/db/HXP_coords.db
DB_INSTALLS += $(MOTOR_NEWPORT)/db/profileMoveControllerXPS.template
DB_INSTALLS += $(MOTOR_NEWPORT)/db/profileMoveControllerXPS_settings.req
DB_INSTALLS += $(MOTOR_NEWPORT)/db/profileMoveAxisXPS.template
DB_INSTALLS += $(MOTOR_NEWPORT)/db/XPS_extra.db
DB_INSTALLS +=</