Merge branch 'ioc'

This commit is contained in:
2024-05-20 14:24:11 -05:00
2 changed files with 21 additions and 20 deletions

View File

@@ -2,8 +2,5 @@ file "$(MOTOR)/db/basic_asyn_motor.db"
{ {
pattern pattern
{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} {P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
{IOC:, 1, "m$(N)", "asynMotor", MCB4B1, 0, "Bottom", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, -.001, 3, 16, 0, ""} {DSM:, 0, "m$(N)", "asynMotor", MCB4B0, 0, "Bottom", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, -.001, 3, 16, 0, ""}
{IOC:, 2, "m$(N)", "asynMotor", MCB4B1, 1, "Top", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, -.001, 3, 16, 0, ""}
{IOC:, 3, "m$(N)", "asynMotor", MCB4B1, 2, "Inboard", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, -.001, 3, 16, 0, ""}
{IOC:, 4, "m$(N)", "asynMotor", MCB4B1, 3, "Outboard", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, -.001, 3, 16, 0, ""}
} }

View File

@@ -6,29 +6,33 @@ dbLoadDatabase("../../dbd/acs.dbd")
acs_registerRecordDeviceDriver(pdbbase) acs_registerRecordDeviceDriver(pdbbase)
# Port 2 on a Moxa # Port 2 on a Moxa
drvAsynIPPortConfigure("serial1", "192.168.1.16:4002",0,0,0) #!drvAsynIPPortConfigure("serial0", "192.168.1.16:4002",0,0,0)
# Local serial port # Local serial port
#!drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0) #!drvAsynSerialPortConfigure("serial0", "/dev/ttyS0", 0, 0, 0)
asynOctetSetInputEos("serial1",0,"\r") drvAsynSerialPortConfigure("serial0", "/tmp/motorport", 0, 0, 0)
asynOctetSetOutputEos("serial1",0,"\r") asynSetOption("serial0", 0, "baud", "115200")
asynSetTraceIOMask("serial1", 0, 2) asynSetOption("serial0", 0, "bits", "8")
#asynSetTraceMask("serial1", 0, 255) asynSetOption("serial0", 0, "parity", "none")
asynSetOption("serial0", 0, "stop", "1")
MCB4BCreateController("MCB4B1", "serial1", 4, 100, 5000) # not sure if these two are needed or what they should be set to:
#!asynSetOption("serial0", 0, "clocal", "Y")
#!asynSetOption("serial0", 0, "crtscts", "Y")
asynOctetSetInputEos("serial0", 0, "\r")
asynOctetSetOutputEos("serial0", 0, "\r")
asynSetTraceIOMask("serial0", 0, 2)
#asynSetTraceMask("serial0", 0, 255)
MCB4BCreateController("MCB4B0", "serial0", 1, 100, 5000)
### Motors ### Motors
dbLoadTemplate "motor.substitutions.mcb4b" dbLoadTemplate "motor.substitutions.mcb4b"
dbLoadRecords("$(ASYN)/db/asynRecord.db","P=IOC:,R=serial1,PORT=serial1,ADDR=0,OMAX=80,IMAX=80") dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=DSM:,R=serial0,PORT=serial0,ADDR=0,OMAX=80,IMAX=80")
iocInit iocInit
# This IOC does not use save/restore, so set values of some PVs # This IOC does not use save/restore, so set values of some PVs
dbpf("IOC:m1.RTRY", "0") dbpf("DSM:m0.RTRY", "0")
dbpf("IOC:m1.TWV", "0.1") dbpf("DSM:m0.TWV", "0.1")
dbpf("IOC:m2.RTRY", "0")
dbpf("IOC:m2.TWV", "0.1")
dbpf("IOC:m3.RTRY", "0")
dbpf("IOC:m3.TWV", "0.1")
dbpf("IOC:m4.RTRY", "0")
dbpf("IOC:m4.TWV", "0.1")