EPICS驱动Newport XPS-Q8控制器

一、前期准备

计算机操作系统是 win7_32bit
成功安装:

  1. Epics base、medm
  2. synApps(或者,最简单地,只安装asyn,autosave,busy,calc,motor,sscan这几个必须的模块)
  3. 将这些模块加入PATH目录,例如 set “PATH=%PATH%;C:/Epics/support/motor-R7-1/bin/win32-x86”
  4. 将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 +=</
  • 6
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值