forked from epics_driver_modules/motorBase
211 lines
6.6 KiB
Plaintext
211 lines
6.6 KiB
Plaintext
# The is the "ASYN" example for communication to either a Newport MM4000/5 or an
|
|
# IMS483 controller. The examples must be configured by including or omitting
|
|
# comment characters (i.e., #'s) from this file.
|
|
|
|
# "#!" marks lines that can be uncommented.
|
|
|
|
# The following must be added for many board support packages
|
|
#!cd "... IOC st.cmd complete directory path ... "
|
|
|
|
< cdCommands
|
|
#!< ../nfsCommands
|
|
|
|
cd topbin
|
|
|
|
# If the VxWorks kernel was built using the project facility, the following must
|
|
# be added before any C++ code is loaded (see SPR #28980).
|
|
sysCplusEnable=1
|
|
|
|
ld < WithMPFVx.munch
|
|
|
|
cd startup
|
|
dbLoadDatabase("$(TOP)/dbd/WithMPFVx.dbd")
|
|
WithMPFVx_registerRecordDeviceDriver(pdbbase)
|
|
|
|
dbLoadTemplate("motor.substitutions")
|
|
dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:")
|
|
|
|
# Configure the ASYN server code. This MUST be configured too!
|
|
< st_asynserver.cmd.Vx
|
|
|
|
# Newport MM3000 and MM4000/5/6 driver setup parameters:
|
|
# (1) maximum number of controllers in system
|
|
# (2) motor task polling rate (min=1Hz,max=60Hz)
|
|
#!MM3000Setup(1, 10)
|
|
#!MM4000Setup(1, 10)
|
|
|
|
# Newport MM3000 and MM4000/5/6 driver configuration parameters:
|
|
# (1) controller# being configured
|
|
# (2) ASYN port name
|
|
# (3) address (GPIB only)
|
|
#!MM3000Config(0, "a-Serial[0]")
|
|
#!drvMM3000debug=4
|
|
#!MM4000Config(0, "a-Serial[0]")
|
|
#!drvMM4000debug=4
|
|
|
|
# The MM4000 driver does not set end of string (EOS).
|
|
# for RS232 serial,
|
|
#!asynOctetSetInputEos( "a-Serial[0]",0,"\r")
|
|
#!asynOctetSetOutputEos("a-Serial[0]",0,"\r")
|
|
# for GPIB,
|
|
#!asynInterposeEosConfig("L0", 10, 1, 1)
|
|
#!asynOctetSetInputEos( "L0",10,"\r")
|
|
#!asynOctetSetOutputEos("L0",10,"\r")
|
|
|
|
# Newport PM500 driver setup parameters:
|
|
# (1) maximum number of controllers in system
|
|
# (2) motor task polling rate (min=1Hz,max=60Hz)
|
|
#!PM500Setup(1, 10)
|
|
|
|
# Newport PM500 configuration parameters:
|
|
# (1) controller# being configured
|
|
# (2) ASYN port name
|
|
# (3) address (GPIB only)
|
|
#!PM500Config(0, "a-Serial[0]")
|
|
#!drvPM500debug=4
|
|
|
|
# IMS IM483 driver setup parameters:
|
|
# (1) maximum number of controllers in system
|
|
# (2) motor task polling rate (min=1Hz,max=60Hz)
|
|
# SM - single mode PL - party mode
|
|
#!IM483SMSetup(1, 10)
|
|
#!IM483PLSetup(1, 10)
|
|
|
|
# IMS IM483 configuration parameters:
|
|
# (1) controller# (chain#) being configured,
|
|
# (2) ASYN port name
|
|
# SM - single mode PL - party mode
|
|
#!IM483SMConfig(0, "a-Serial[0]")
|
|
#!drvIM483SMdebug=4
|
|
#!IM483PLConfig(0, "a-Serial[0]")
|
|
#!drvIM483PLdebug=4
|
|
|
|
# MCB-4B driver setup parameters:
|
|
# (1) maximum # of controllers,
|
|
# (2) motor task polling rate (min=1Hz, max=60Hz)
|
|
#!MCB4BSetup(1, 10)
|
|
|
|
# MCB-4B driver configuration parameters:
|
|
# (1) controller
|
|
# (2) ASYN port name
|
|
#!MCB4BConfig(0, "a-Serial[0]")
|
|
#!asynOctetSetInputEos("a-Serial[0]",0,"\r")
|
|
#!asynOctetSetOutputEos("a-Serial[0]",0,"\r")
|
|
#!drvMCB4BDebug=4
|
|
|
|
# Newport ESP300 driver setup parameters:
|
|
# (1) maximum number of controllers in system
|
|
# (2) motor task polling rate (min=1Hz,max=60Hz)
|
|
#!ESP300Setup(1, 10)
|
|
|
|
# Newport ESP300 driver configuration parameters:
|
|
# (1) controller# being configured
|
|
# (2) ASYN port name
|
|
# (3) address (GPIB only)
|
|
#!ESP300Config(0, "a-Serial[0]")
|
|
#!drvESP300debug = 4
|
|
|
|
# MicroMo MVP2001 driver setup parameters:
|
|
#
|
|
# NOTE: The 1st controller on each chain should have it's address = 1.
|
|
# The rest of the controllers on a chain should follow sequentially.
|
|
#
|
|
#
|
|
# int MVP2001Setup(int num_cards, /* number of CHAINS of controllers */
|
|
# int scan_rate) /* polling rate (Min=1Hz, max=60Hz) */
|
|
#!MVP2001Setup(1, 10)
|
|
|
|
# int MVP2001Config(int card, /* CHAIN being configured */
|
|
# (2) ASYN port name
|
|
#!MVP2001Config(0, "a-Serial[0]")
|
|
#!drvMVP2001debug=4
|
|
|
|
# PI C-844 driver setup parameters:
|
|
# (1) maximum number of controllers in system
|
|
# (2) motor task polling rate (min=1Hz,max=60Hz)
|
|
#!PIC844Setup(1, 10)
|
|
|
|
# PI C-844 driver configuration parameters:
|
|
# (1) controller# being configured
|
|
# (2) ASYN port name
|
|
# (3) address (GPIB only)
|
|
#!PIC844Config(0, "a-Serial[0]")
|
|
#!drvPIC844debug = 4
|
|
|
|
# Micos MoCo driver setup parameters:
|
|
# Load MicosSetup once.
|
|
# (1) max # of controller groups. Controller groups are per serial
|
|
# port.
|
|
# (2) max # axes per controller group. Maximum 16. (addr 0-15)
|
|
# (3) motor task polling rate (min=1Hz, max=60Hz, 10Hz works well)
|
|
# Example:
|
|
# MicosSetup(1, 2, 10) 1 group. 2 axes (controllers) in the group.
|
|
# 10Hz poll.
|
|
#!MicosSetup(1, 2, 10)
|
|
|
|
# Micos MoCo driver configuration parameters:
|
|
# Load one MicosConfig for each group of Micos drivers.
|
|
# (1) "Controller group" number
|
|
# (2) ASYN port name
|
|
#!MicosConfig(0, "a-Serial[0]")
|
|
#!drvMicosDebug = 4
|
|
|
|
# IMS MDrive driver setup parameters:
|
|
# (1) maximum number of controllers in system
|
|
# (2) motor task polling rate (min=1Hz,max=60Hz)
|
|
#!MDriveSetup(1, 10)
|
|
|
|
# IMS MDrive driver configuration parameters:
|
|
# (1) controller# being configured
|
|
#!MDriveConfig(0, "a-Serial[0]")
|
|
#!drvMDrivedebug = 4
|
|
|
|
# Newport XPSC8 driver setup parameters:
|
|
# (1) maximum number of controllers in system
|
|
# (2) motor task polling rate (min=1Hz,max=60Hz)
|
|
#!XPSC8Setup(2, 60)
|
|
|
|
# Newport XPSC8 driver configuration parameters:
|
|
# (1) controller# being configured
|
|
# (2) ASYN port name
|
|
# (3) ASYN port #
|
|
# (4) number of axes
|
|
#!XPSC8Config(0, "tcp1", 0, 6)
|
|
#!XPSC8Config(1, "tcp2", 0, 8)
|
|
|
|
# Newport XPSC8 group and positioner name configuration:
|
|
# (1) controller# being configured
|
|
# (2) axis# being configured.
|
|
# (3) groupnumber
|
|
# (4) groupsize
|
|
# (5) # of axes in group
|
|
# (6) group name
|
|
# (7) positioner name
|
|
#!XPSC8NameConfig(0,0,0,6,0,"GROUP1","GROUP1.PHI")
|
|
#!XPSC8NameConfig(0,1,0,6,1,"GROUP1","GROUP1.KAPPA")
|
|
#!XPSC8NameConfig(0,2,0,6,2,"GROUP1","GROUP1.OMEGA")
|
|
#!XPSC8NameConfig(0,3,0,6,3,"GROUP1","GROUP1.PSI")
|
|
#!XPSC8NameConfig(0,4,0,6,4,"GROUP1","GROUP1.2THETA")
|
|
#!XPSC8NameConfig(0,5,0,6,5,"GROUP1","GROUP1.NU")
|
|
|
|
#!XPSC8NameConfig(1,0,0,1,0,"GROUP1","GROUP1.Y1_BASE")
|
|
#!XPSC8NameConfig(1,1,1,1,0,"GROUP2","GROUP2.Y2_BASE")
|
|
#!XPSC8NameConfig(1,2,2,1,0,"GROUP3","GROUP3.Y3_BASE")
|
|
#!XPSC8NameConfig(1,3,3,1,0,"GROUP4","GROUP4.TRX_BASE")
|
|
#!XPSC8NameConfig(1,4,4,1,0,"GROUP5","GROUP5.THETA-Y_BASE")
|
|
#!XPSC8NameConfig(1,5,5,1,0,"GROUP6","GROUP6.X_SAMPLE")
|
|
#!XPSC8NameConfig(1,6,6,1,0,"GROUP7","GROUP7.Y_SAMPLE")
|
|
#!XPSC8NameConfig(1,7,7,1,0,"GROUP8","GROUP8.Z_SAMPLE")
|
|
|
|
# The XPSC8 driver does not set the ASYN end of string (EOS).
|
|
#!asynOctetSetInputEos("tcp1",0,"")
|
|
#!asynOctetSetOutputEos("tcp1",0,"")
|
|
#!asynOctetSetInputEos("tcp2",0,"")
|
|
#!asynOctetSetOutputEos("tcp2",0,"")
|
|
|
|
iocInit
|
|
|
|
# motorUtil (allstop & alldone)
|
|
motorUtilInit("IOC:")
|
|
|