Skip to content
Snippets Groups Projects
Commit 79beb1b8 authored by rivers's avatar rivers
Browse files

New file for Linux

parent bf274843
No related branches found
No related tags found
No related merge requests found
file "$(ASYN)/db/asynRecord.db"
{
pattern
{P R PORT ADDR OMAX IMAX}
{xxx: asyn_1 serial1 0 256 256}
{xxx: asyn_2 serial2 0 256 256}
{xxx: asyn_3 serial3 0 256 256}
{xxx: asyn_4 serial4 0 256 256}
}
# BEGIN canberra_1.cmd --------------------------------------------------------
# Commands to load a single Canberra detector with ICB electronics
#mcaRecordDebug=1
#aimDebug=1
#icbDebug=1
# AIMConfig(portName, ethernet_address, portNumber, maxChans,
# maxSignals, maxSequences, ethernetDevice)
# portName, # asyn port name to be created
# ethernet_address, # Low order 16 bits of Ethernet hardware address
# portNumber, # ADC port on AIM (1 or 2)
# maxChans, # Maximum channels for this input
# maxSignals, # Maximum signals for this input (>1 for MCS or multiplexor)
# maxSequences, # Maximum sequences for time resolved applications
# ethernetDevice) # Ethernet device name on IOC
# # Typically ei0 for Motorola 68K, dc0 for ppc, eth0 for Linux
AIMConfig("AIM1/1", 0x59e, 1, 2048, 1, 1, "eth0")
AIMConfig("AIM1/2", 0x59e, 2, 2048, 8, 1, "eth0")
AIMConfig("DSA2000", 0x8058, 1, 2048, 1, 1, "eth0")
dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=xxx:,M=aim_adc1,DTYP=asynMCA,INP=@asyn(AIM1/1 0),NCHAN=2048")
dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=xxx:,M=aim_adc2,DTYP=asynMCA,INP=@asyn(AIM1/2 0),NCHAN=2048")
dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=xxx:,M=aim_adc3,DTYP=asynMCA,INP=@asyn(AIM1/2 2),NCHAN=2048")
dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=xxx:,M=aim_adc4,DTYP=asynMCA,INP=@asyn(AIM1/2 4),NCHAN=2048")
dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=xxx:,M=aim_adc5,DTYP=asynMCA,INP=@asyn(AIM1/2 6),NCHAN=2048")
dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=xxx:,M=aim_adc6,DTYP=asynMCA,INP=@asyn(DSA2000 0),NCHAN=2048")
# icbConfig(portName, ethernetAddress, icbAddress, moduleType)
# portName to give to this asyn port
# ethernetAddress - Ethernet address of module, low order 16 bits
# icbAddress - rotary switch setting inside ICB module
# moduleType
# 0 = ADC
# 1 = Amplifier
# 2 = HVPS
# 3 = TCA
# 4 = DSP
icbConfig("icbAdc1", 0x59e, 5, 0)
dbLoadRecords("$(MCA)/mcaApp/Db/icb_adc.db", "P=xxx:,ADC=adc1,PORT=icbAdc1")
icbConfig("icbAmp1", 0x59e, 3, 1)
dbLoadRecords("$(MCA)/mcaApp/Db/icb_amp.db", "P=xxx:,AMP=amp1,PORT=icbAmp1")
icbConfig("icbHvps1", 0x59e, 2, 2)
dbLoadRecords("$(MCA)/mcaApp/Db/icb_hvps.db", "P=xxx:,HVPS=hvps1,PORT=icbHvps1,LIMIT=1000")
icbConfig("icbTca1", 0x59e, 8, 3)
dbLoadRecords("$(MCA)/mcaApp/Db/icb_tca.db", "P=xxx:,TCA=tca1,MCA=aim_adc2,PORT=icbTca1")
#icbConfig("icbDsp1", 0x8058, 0, 4)
#dbLoadRecords("$(MCA)/mcaApp/Db/icbDsp.db", "P=xxx:,DSP=dsp1,PORT=icbDsp1")
# END canberra_1.cmd ----------------------------------------------------------
file "$(MOTOR)/db/motor.db"
{
pattern
{P, N, M, DTYP, C, S, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
{xxx:, 1, m$(N), "MM4000", 0, 0, "motor $(N)", degrees, Pos, 10, 0., 1., 0, 1, .2, 1e-3, 3, 100, -100, ""}
{xxx:, 2, m$(N), "MM4000", 0, 1, "motor $(N)", degrees, Pos, 60, 0., 1.5, 0, 1, .2, 1e-3, 3, 100, -100, ""}
{xxx:, 3, m$(N), "MM4000", 0, 2, "motor $(N)", degrees, Pos, 60, 0., 1., 0, 1, .2, 1e-3, 3, 100, -100, ""}
{xxx:, 4, m$(N), "ACS MCB-4B", 0, 0, "motor $(N)", steps, Pos, 1000., 1, .2, 0, 1, .2, 1, 1, 1e6, -1e6, ""}
{xxx:, 5, m$(N), "ACS MCB-4B", 0, 1, "motor $(N)", degrees, Pos, 1000., 1, .2, 0, 1, .2, 1, 1, 100, -100, ""}
{xxx:, 6, m$(N), "ACS MCB-4B", 0, 2, "motor $(N)", degrees, Pos, 1000., 1, .2, 0, 1, .2, 1, 1, 100, -100, ""}
{xxx:, 7, m$(N), "ACS MCB-4B", 0, 3, "motor $(N)", degrees, Pos, 1000., 1, .2, 0, 1, .2, 1, 1, 100, -100, ""}
}
# This file demonstrates slow feedback. The initial INP and OUT assume the first channel
# of an IP330 ADC connected to the first channel of a DAC128V DAC.
file "$(STD)/stdApp/Db/pid_control.db"
{
pattern
{P, PID, INP, OUT, LOPR, HOPR, DRVL, DRVH, PREC, KP, KI, KD, SCAN}
{xxx:, pid_slow, xxx:IP330_1, xxx:DAC3_1, 0, 100, 0, 5, 3, 0.2, 3., 0., ".1 second"}
}
# Pseudo-motors
# Note: This databases will be in the next release of motor, not in xxxApp
# This is a simple example using the sumDiff2D database. This takes 2 real motors and makes 2 soft motors,
# SUM which moves both motors together, and DIFF which moves them in opposite directions.
# It can be used for slits, for K/B mirror benders, etc.
file "$(TOP)/xxxApp/Db/pseudoMotor.db"
{
pattern
{P, M, DINP, OUT, RDBL, STOO, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, RRES, PREC, DHLM, DLLM}
{xxx:, pm1, "xxx:KBV:Done NPP NMS", "xxx:pm1DVAL.VAL PP MS", "xxx:KBV:Readback.G NPP NMS", "xxx:KBV:Stop PP MS", "Vert. curvature", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 3, 10000, -10000}
{xxx:, pm2, "xxx:KBV:Done NPP NMS", "xxx:pm2DVAL.VAL PP MS", "xxx:KBV:Readback.H NPP NMS", "xxx:KBV:Stop PP MS", "Vert. Ellipticity", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 3, 10000, -10000}
{xxx:, pm3, "xxx:KBH:Done NPP NMS", "xxx:pm3DVAL.VAL PP MS", "xxx:KBH:Readback.G NPP NMS", "xxx:KBH:Stop PP MS", "Hor. curvature", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 3, 10000, -10000}
{xxx:, pm4, "xxx:KBH:Done NPP NMS", "xxx:pm4DVAL.VAL PP MS", "xxx:KBH:Readback.H NPP NMS", "xxx:KBH:Stop PP MS", "Hor. ellipticity", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 3, 10000, -10000}
}
file "$(TOP)/xxxApp/Db/sumDiff2D.db"
{
pattern
{P, T, SUM, DIFF, M1DRV, M1RBV, M2DRV, M2RBV, M1STOP, M1DONE, M2STOP, M2DONE, PREC}
{xxx:, KBV:, pm1, pm2, m1.VAL, m1.RBV, m2.VAL, m2.RBV, m1.STOP, m1.DMOV, m2.STOP, m2.DMOV, 1}
{xxx:, KBH:, pm3, pm4, m3.VAL, m3.RBV, m4.VAL, m4.RBV, m3.STOP, m3.DMOV, m4.STOP, m4.DMOV, 1}
}
# BEGIN serial.cmd ------------------------------------------------------------
# Set up 2 local serial ports
# serial 1 connected to Keithley2K DMM at 19200 baud
#drvAsynSerialPortConfigure("portName","ttyName",priority,noAutoConnect,
# noProcessEos)
drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0)
asynSetOption(serial1,0,baud,19200)
#asynOctetSetInputEos(const char *portName, int addr,
# const char *eosin,const char *drvInfo)
asynOctetSetInputEos("serial1",0,"\r\n")
# asynOctetSetOutputEos(const char *portName, int addr,
# const char *eosin,const char *drvInfo)
asynOctetSetOutputEos("serial1",0,"\r")
# Make port available from the iocsh command line
#asynOctetConnect(const char *entry, const char *port, int addr,
# int timeout, int buffer_len, const char *drvInfo)
asynOctetConnect("serial1", "serial1")
# serial 2 connected to Newport MM4000 at 38400 baud
drvAsynSerialPortConfigure("serial2", "/dev/ttyS1", 0, 0, 0)
asynSetOption(serial2,0,baud,38400)
asynOctetConnect("serial2", "serial2")
asynOctetSetInputEos("serial2",0,"\r")
asynOctetSetOutputEos("serial2",0,"\r")
# Set up ports 1 and 2 on Moxa box
# serial 3 is connected to the ACS MCB-4B at 9600 baud
#drvAsynIPPortConfigure("portName","hostInfo",priority,noAutoConnect,
# noProcessEos)
drvAsynIPPortConfigure("serial3", "164.54.160.50:4001", 0, 0, 0)
asynOctetConnect("serial3", "serial3")
asynOctetSetInputEos("serial3",0,"\r")
asynOctetSetOutputEos("serial3",0,"\r")
# serial 4 not connected for now
drvAsynIPPortConfigure("serial4", "164.54.160.50:4002", 0, 0, 0)
asynOctetConnect("serial4", "serial4")
asynOctetSetInputEos("serial4",0,"\r")
asynOctetSetOutputEos("serial4",0,"\r")
# Newport MM4000 driver setup parameters:
# (1) maximum # of controllers,
# (2) motor task polling rate (min=1Hz, max=60Hz)
MM4000Setup(1, 10)
# Newport MM4000 driver configuration parameters:
# (1) controller
# (2) asyn port name (e.g. serial1 or gpib1)
# (3) GPIB address (0 for serial)
MM4000Config(0, "serial2", 0)
# 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
# (2) asyn port name (e.g. serial1 or gpib1)
#PM500Config(0, "serial3")
# McClennan PM304 driver setup parameters:
# (1) maximum number of controllers in system
# (2) motor task polling rate (min=1Hz, max=60Hz)
#PM304Setup(1, 10)
# McClennan PM304 driver configuration parameters:
# (1) controller being configured
# (2) MPF serial server name (string)
# (3) Number of axes on this controller
#PM304Config(0, "serial4", 1)
# ACS MCB-4B driver setup parameters:
# (1) maximum number of controllers in system
# (2) motor task polling rate (min=1Hz, max=60Hz)
MCB4BSetup(1, 10)
# ACS MCB-4B driver configuration parameters:
# (1) controller being configured
# (2) asyn port name (string)
MCB4BConfig(0, "serial3")
##### Pico Motors (Ernest Williams MHATT-CAT)
##### Motors (see picMot.substitutions in same directory as this file) ####
#dbLoadTemplate("picMot.substitutions")
# Load asynRecord records on all ports
dbLoadTemplate("asynRecord.substitutions")
# send impromptu message to serial device, parse reply
# (was serial_OI_block)
dbLoadRecords("$(IP)/ipApp/Db/deviceCmdReply.db","P=xxx:,N=1,PORT=serial1,ADDR=0,OMAX=100,IMAX=100")
dbLoadRecords("$(IP)/ipApp/Db/deviceCmdReply.db","P=xxx:,N=2,PORT=serial2,ADDR=0,OMAX=100,IMAX=100")
dbLoadRecords("$(IP)/ipApp/Db/deviceCmdReply.db","P=xxx:,N=3,PORT=serial3,ADDR=0,OMAX=100,IMAX=100")
# Stanford Research Systems SR570 Current Preamplifier
#dbLoadRecords("$(IP)/ipApp/Db/SR570.db", "P=xxx:,A=A1,PORT=serial1")
# Lakeshore DRC-93CA Temperature Controller
#dbLoadRecords("$(IP)/ipApp/Db/LakeShoreDRC-93CA.db", "P=xxx:,Q=TC1,PORT=serial4")
# Huber DMC9200 DC Motor Controller
#dbLoadRecords("$(IP)/ipApp/Db/HuberDMC9200.db", "P=xxx:,Q=DMC1:,PORT=serial5")
# Oriel 18011 Encoder Mike
#dbLoadRecords("$(IP)/ipApp/Db/eMike.db", "P=xxx:,M=em1,PORT=serial3")
# Keithley 2000 DMM
dbLoadRecords("$(IP)/ipApp/Db/Keithley2kDMM_mf.db","P=xxx:,Dmm=D1,PORT=serial1")
# Oxford Cyberstar X1000 Scintillation detector and pulse processing unit
#dbLoadRecords("$(IP)/ipApp/Db/Oxford_X1k.db","P=xxx:,S=s1,PORT=serial4")
# Oxford ILM202 Cryogen Level Meter (Serial)
#dbLoadRecords("$(IP)/ipApp/Db/Oxford_ILM202.db","P=xxx:,S=s1,PORT=serial5")
# Elcomat autocollimator
#dbLoadRecords("$(IP)/ipApp/Db/Elcomat.db", "P=xxx:,PORT=serial8")
# Eurotherm temp controller
#dbLoadRecords("$(IP)/ipApp/Db/Eurotherm.db","P=xxx:,PORT=serial7")
# MKS vacuum gauges
#dbLoadRecords("$(IP)/ipApp/Db/MKS.db","P=xxx:,PORT=serial2,CC1=cc1,CC2=cc3,PR1=pr1,PR2=pr3")
# PI Digitel 500/1500 pump
#dbLoadRecords("$(IP)/ipApp/Db/Digitel.db","xxx:,PUMP=ip1,PORT=serial3")
# PI MPC ion pump
#dbLoadRecords("$(IP)/ipApp/Db/MPC.db","P=xxx:,PUMP=ip2,PORT=serial4,PA=0,PN=1")
# PI MPC TSP (titanium sublimation pump)
#dbLoadRecords("$(IP)/ipApp/Db/TSP.db","P=xxx:,TSP=tsp1,PORT=serial4,PA=0")
# Heidenhain ND261 encoder (for PSL monochromator)
#dbLoadRecords("$(IP)/ipApp/Db/heidND261.db", "P=xxx:,PORT=serial1")
# Love Controllers
#devLoveDebug=1
#loveServerDebug=1
#dbLoadRecords("$(IP)/ipApp/Db/love.db", "P=xxx:,Q=Love_0,C=0,PORT=PORT2,ADDR=1")
# END serial.cmd --------------------------------------------------------------
file "$(STD)/stdApp/Db/softMotor.db"
{
pattern
{P, SM}
{xxx:, SM1}
{xxx:, SM2}
{xxx:, SM3}
{xxx:, SM4}
{xxx:, SM5}
{xxx:, SM6}
{xxx:, SM7}
{xxx:, SM8}
{xxx:, SM9}
{xxx:, SM10}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment