mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
#errlogInit(5000)
|
|
< envPaths
|
|
|
|
# Tell EPICS all about the record types, device-support modules, drivers, etc.
|
|
dbLoadDatabase("../../dbd/dsm.dbd")
|
|
dsm_registerRecordDeviceDriver(pdbbase)
|
|
|
|
# Network device
|
|
#!drvAsynIPPortConfigure("serial0", "192.168.1.16:4002",0,0,0)
|
|
# Local serial port
|
|
drvAsynSerialPortConfigure("serial0", "/dev/ttyUSB0", 0, 0, 0)
|
|
asynSetOption("serial0", 0, "baud", "115200")
|
|
asynSetOption("serial0", 0, "bits", "8")
|
|
asynSetOption("serial0", 0, "parity", "none")
|
|
asynSetOption("serial0", 0, "stop", "1")
|
|
|
|
asynOctetSetInputEos("serial0", 0, "\r")
|
|
asynOctetSetOutputEos("serial0", 0, "\r")
|
|
asynSetTraceIOMask("serial0", 0, 2)
|
|
|
|
# Turn on the power supply and set the deadband
|
|
asynOctetConnect("initConnection", "serial0", 0)
|
|
asynOctetWrite("initConnection", "EPS")
|
|
asynOctetWrite("initConnection", "SDB 10")
|
|
asynOctetDisconnect('initConnection')
|
|
|
|
MD90CreateController("MD900", "serial0", 1, 100, 5000)
|
|
|
|
### Motors
|
|
dbLoadTemplate "motor.substitutions.md90"
|
|
dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=DSM:,R=serial0,PORT=serial0,ADDR=0,OMAX=80,IMAX=80")
|
|
|
|
iocInit
|
|
|
|
# This IOC does not use save/restore, so set values of some PVs
|
|
dbpf("DSM:m0.RTRY", "0")
|
|
dbpf("DSM:m0.TWV", "0.1")
|
|
dbpf("DSM:m0.VMAX", "0.625")
|