From 4afa9424488feffb388b6646d7ad2fa1a4766f01 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Tue, 18 Apr 2017 12:58:20 -0500 Subject: [PATCH] New file --- .../iocWithAsyn/motor.substitutions.CONEX-PP | 9 ++++ iocBoot/iocWithAsyn/st.cmd.CONEX-PP | 45 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP create mode 100644 iocBoot/iocWithAsyn/st.cmd.CONEX-PP diff --git a/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP b/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP new file mode 100644 index 00000000..78df4c27 --- /dev/null +++ b/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP @@ -0,0 +1,9 @@ +file "$(TOP)/db/basic_asyn_motor.db" +{ +pattern +{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} +# Newport NSA12 stage, 6.35 microns/full step, 128 micro-steps/s +{IOC:, 1, "m$(N)", "asynMotor", CONEX1, 0, "X", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} +{IOC:, 2, "m$(N)", "asynMotor", CONEX2, 0, "Y", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} +{IOC:, 3, "m$(N)", "asynMotor", CONEX3, 0, "Z", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} +} diff --git a/iocBoot/iocWithAsyn/st.cmd.CONEX-PP b/iocBoot/iocWithAsyn/st.cmd.CONEX-PP new file mode 100644 index 00000000..4447b287 --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.CONEX-PP @@ -0,0 +1,45 @@ +#errlogInit(5000) +< envPaths +# Tell EPICS all about the record types, device-support modules, drivers, +# etc. +dbLoadDatabase("../../dbd/WithAsyn.dbd") +WithAsyn_registerRecordDeviceDriver(pdbbase) + +### Motors +dbLoadTemplate "motor.substitutions.CONEX-PP" + +# For Windows +drvAsynSerialPortConfigure("serial1", "COM8", 0, 0, 0) +# For Linux +#drvAsynSerialPortConfigure("serial1", "/dev/ttyUSB0", 0, 0, 0) +asynOctetSetInputEos("serial1",0,"\r\n") +asynOctetSetOutputEos("serial1",0,"\r\n") +asynSetOption("serial1",0,"baud","115200") +asynSetOption("serial1",0,"bits","8") +asynSetOption("serial1",0,"stop","1") +asynSetOption("serial1",0,"parity","none") +asynSetOption("serial1",0,"clocal","Y") +asynSetOption("serial1",0,"crtscts","N") + +asynSetTraceIOMask("serial1", 0, 2) +#asynSetTraceMask("serial1", 0, 9) + +# Load asyn record +dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=IOC:,R=serial1,PORT=serial1, ADDR=0,OMAX=256,IMAX=256") + +# AG_CONEXCreateController(asyn port, serial port, controllerID, +# active poll period (ms), idle poll period (ms)) +AG_CONEXCreateController("CONEX1", "serial1", 1, 50, 500) +asynSetTraceIOMask("CONEX1", 0, 2) +#asynSetTraceMask("CONEX1", 0, 255) +AG_CONEXCreateController("CONEX2", "serial1", 2, 50, 500) +asynSetTraceIOMask("CONEX2", 0, 2) +#asynSetTraceMask("CONEX2", 0, 255) +AG_CONEXCreateController("CONEX3", "serial1", 3, 50, 500) +asynSetTraceIOMask("CONEX3", 0, 2) +#asynSetTraceMask("CONEX3", 0, 255) + +iocInit + +dbpf IOC:m1.RTRY 0 +dbpf IOC:m1.NTM 0