From 35fd455666fd10873600f69ed7e00cba68903e4f Mon Sep 17 00:00:00 2001 From: Carlos Doro Neto Date: Tue, 27 Aug 2024 16:59:08 +0200 Subject: [PATCH 1/5] Improve formatting Use 4 space for indentation Align values for 3 and 4 letter fields { on same line as record Space after commas Remove trailing spaces --- db/core/ecmcMotorRecord.template | 136 +++++++------- db/core/ecmcMotorRecordPva.template | 267 +++++++++++++--------------- 2 files changed, 191 insertions(+), 212 deletions(-) diff --git a/db/core/ecmcMotorRecord.template b/db/core/ecmcMotorRecord.template index b6aab3843..f2d20b37e 100644 --- a/db/core/ecmcMotorRecord.template +++ b/db/core/ecmcMotorRecord.template @@ -1,5 +1,4 @@ -record(motor,"$(PREFIX)$(MOTOR_NAME)") -{ +record(motor, "$(PREFIX)$(MOTOR_NAME)") { field(DESC, "$(DESC)") field(DTYP, "asynMotor") field(DIR, "$(DIR=0)") @@ -24,7 +23,7 @@ record(motor,"$(PREFIX)$(MOTOR_NAME)") field(RTRY, "$(RTRY=1)") field(RMOD, "$(RMOD=3)") field(DLY, "$(DLY=0)") - field(OFF, "$(OFF=0)") + field(OFF, "$(OFF=0)") field(FOFF, "$(FOFF=0)") field(NTM, "$(NTM=1)") field(TWV, "$(TWV=1)") @@ -38,14 +37,14 @@ record(motor,"$(PREFIX)$(MOTOR_NAME)") } # The message text -record(stringin,"$(PREFIX)$(MOTOR_NAME)-MsgTxt") { +record(stringin, "$(PREFIX)$(MOTOR_NAME)-MsgTxt") { field(DTYP, "asynOctetRead") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_MESSAGE_TEXT") field(SCAN, "I/O Intr") } # Debug message in IOC log -record(stringout,"$(PREFIX)$(MOTOR_NAME)-DbgStrToLOG") { +record(stringout, "$(PREFIX)$(MOTOR_NAME)-DbgStrToLOG") { field(DESC, "Log String in IOC log") field(VAL, "") field(DTYP, "asynOctetWrite") @@ -64,38 +63,34 @@ record(longout, "$(PREFIX)$(MOTOR_NAME)-DIR_") { field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_REC_DIRECTION") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-Vel-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-Vel-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))Vel-RB") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-Acc-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-Acc-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))Acc-RB") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-EncAct") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-EncAct") { field(DTYP, "asynFloat64") field(PREC, "0") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))EncAct") field(SCAN, "I/O Intr") } -record(longin, "$(PREFIX)$(MOTOR_NAME)-MR-ErrId") -{ +record(longin, "$(PREFIX)$(MOTOR_NAME)-MR-ErrId") { field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))ErrId") field(SCAN, "I/O Intr") } -record(longout,"$(PREFIX)$(MOTOR_NAME)-ErrRst") { +record(longout, "$(PREFIX)$(MOTOR_NAME)-ErrRst") { field(DESC, "Error Reset") field(VAL, 0) field(DTYP, "asynInt32") @@ -104,7 +99,7 @@ record(longout,"$(PREFIX)$(MOTOR_NAME)-ErrRst") { } # Motor offset for this axis -record(ao,"$(PREFIX)$(MOTOR_NAME)-OFF_") { +record(ao, "$(PREFIX)$(MOTOR_NAME)-OFF_") { field(DESC, "$(MOTOR_NAME) offset") field(DOL, "$(PREFIX)$(MOTOR_NAME).OFF CP MS") field(OMSL, "closed_loop") @@ -115,7 +110,7 @@ record(ao,"$(PREFIX)$(MOTOR_NAME)-OFF_") { # Motor resolution for this axis -record(ao,"$(PREFIX)$(MOTOR_NAME)-MRES_") { +record(ao, "$(PREFIX)$(MOTOR_NAME)-MRES_") { field(DESC, "$(MOTOR_NAME) resolution") field(DOL, "$(PREFIX)$(MOTOR_NAME).MRES CP MS") field(OMSL, "closed_loop") @@ -124,7 +119,7 @@ record(ao,"$(PREFIX)$(MOTOR_NAME)-MRES_") { field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_REC_RESOLUTION") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgSREV-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgSREV-RB") { field(DESC, "Micro Steps / Revolution") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -132,7 +127,7 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgSREV-RB") { field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgUREV-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgUREV-RB") { field(DESC, "EGU / Revolution") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -140,14 +135,14 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgUREV-RB") { field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPMIN-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPMIN-RB") { field(DESC, "Absolute Minimum") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPMIN-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPMAX-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPMAX-RB") { field(DESC, "Absolute Maximum") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -155,7 +150,7 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPMAX-RB") { field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgSPDB-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgSPDB-RB") { field(DESC, "Set point dead band window") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -163,7 +158,7 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgSPDB-RB") { field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgRDBD-RB") { field(DESC, "In target position window") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -171,7 +166,7 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-RB") { field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-Tim-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgRDBD-Tim-RB") { field(DESC, "In target position time") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -179,14 +174,14 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-Tim-RB") { field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgRDBD-En-RB") { field(DESC, "In target position enabled") field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgRDBD-En-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-RB") { field(DESC, "In target position window") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -194,7 +189,7 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-RB") { field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-Tim-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-Tim-RB") { field(DESC, "In target position time") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -202,14 +197,14 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-Tim-RB") { field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-En-RB") { field(DESC, "In target position enabled") field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPOSLAG-En-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgDHLM-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgDHLM-RB") { field(DESC, "EC High Soft Limit RB") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -217,7 +212,7 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgDHLM-RB") { field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgDLLM-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgDLLM-RB") { field(DESC, "EC Low Soft Limit RB") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -225,14 +220,14 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgDLLM-RB") { field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgDHLM-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgDHLM-En-RB") { field(DESC, "EC High Soft Limit enabled RB") field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDHLM-En") field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgDLLM-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgDLLM-En-RB") { field(DESC, "EC Low Soft Limit enabled RB") field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDLLM-En") @@ -241,16 +236,14 @@ record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgDLLM-En-RB") { # Config records, the values will be pushed into the motor record fields -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVELO-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVELO-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgVELO") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVMAX-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVMAX-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgVMAX") @@ -258,24 +251,22 @@ record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVMAX-RB") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgJVEL-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgJVEL-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgJVEL") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgACCS-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgACCS-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgACCS") field(SCAN, "I/O Intr") } -record(mbbi,"$(PREFIX)$(MOTOR_NAME)-HomProc-RB") { - field(DESC,"Homing procedure") +record(mbbi, "$(PREFIX)$(MOTOR_NAME)-HomProc-RB") { + field(DESC, "Homing procedure") field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))HomProc-RB") field(SCAN, "I/O Intr") @@ -314,7 +305,7 @@ record(mbbi,"$(PREFIX)$(MOTOR_NAME)-HomProc-RB") { field(FFST, "ManSetPos") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-HomPos-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-HomPos-RB") { field(DESC, "Home Position") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") @@ -322,36 +313,35 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-HomPos-RB") { field(SCAN, "I/O Intr") } -record (asyn, "$(PREFIX)$(MOTOR_NAME)-$(MOTOR_PORT)-asyn") -{ +record (asyn, "$(PREFIX)$(MOTOR_NAME)-$(MOTOR_PORT)-asyn") { } -record(calcout,"$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgH2L"){ +record(calcout, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgH2L"){ #field(PINI, "1") - field(DESC, "Trigg MR Sync") - field(SCAN, "Passive") - field(INPA, "$(PREFIX)$(MOTOR_NAME)-SumIlockBwd CP") - field(INPB, "$(PREFIX)$(MOTOR_NAME)-SumIlockFwd CP") - field(INPC, "1") - field(CALC, "A && B") - field(OCAL, "C") - field(DOPT, "Use OCAL") - field(OOPT, "Transition To Zero") - field(OUT, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq PP") -} - -record(calcout,"$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgL2H"){ + field(DESC, "Trigg MR Sync") + field(SCAN, "Passive") + field(INPA, "$(PREFIX)$(MOTOR_NAME)-SumIlockBwd CP") + field(INPB, "$(PREFIX)$(MOTOR_NAME)-SumIlockFwd CP") + field(INPC, "1") + field(CALC, "A && B") + field(OCAL, "C") + field(DOPT, "Use OCAL") + field(OOPT, "Transition To Zero") + field(OUT, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq PP") +} + +record(calcout, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgL2H"){ #field(PINI, "1") - field(DESC, "Trigg MR Sync") - field(SCAN, "Passive") - field(INPA, "$(PREFIX)$(MOTOR_NAME)-SumIlockBwd CP") - field(INPB, "$(PREFIX)$(MOTOR_NAME)-SumIlockFwd CP") - field(INPC, "1") - field(CALC, "A && B") - field(OCAL, "C") - field(DOPT, "Use OCAL") - field(OOPT, "Transition To Non-zero") - field(OUT, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq PP") + field(DESC, "Trigg MR Sync") + field(SCAN, "Passive") + field(INPA, "$(PREFIX)$(MOTOR_NAME)-SumIlockBwd CP") + field(INPB, "$(PREFIX)$(MOTOR_NAME)-SumIlockFwd CP") + field(INPC, "1") + field(CALC, "A && B") + field(OCAL, "C") + field(DOPT, "Use OCAL") + field(OOPT, "Transition To Non-zero") + field(OUT, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq PP") } record(seq, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq") { @@ -375,9 +365,9 @@ record(seq, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq") { } record(seq, "${PREFIX}${MOTOR_NAME}-StpCmd_") { - field(DESC, "Stop Axis") - field(DOL1, "${PREFIX}${MOTOR_NAME}-StpCmd CP") - field(DO2, "1") - field(LNK1, "") - field(LNK2, "${PREFIX}${MOTOR_NAME}.STOP PP") + field(DESC, "Stop Axis") + field(DOL1, "${PREFIX}${MOTOR_NAME}-StpCmd CP") + field(DO2, "1") + field(LNK1, "") + field(LNK2, "${PREFIX}${MOTOR_NAME}.STOP PP") } diff --git a/db/core/ecmcMotorRecordPva.template b/db/core/ecmcMotorRecordPva.template index 2ad67d562..9a742cb15 100644 --- a/db/core/ecmcMotorRecordPva.template +++ b/db/core/ecmcMotorRecordPva.template @@ -1,74 +1,74 @@ -record(motor,"$(PREFIX)$(MOTOR_NAME)"){ - field(DESC,"$(DESC)") - field(DTYP,"asynMotor") - field(DIR,"$(DIR=0)") - field(VELO,"$(VELO=0)") - field(JVEL,"$(JVEL=0)") - field(VBAS,"$(VBAS=0)") - field(ACCL,"$(ACCL=0)") - field(JAR, "$(JAR=0)") - field(BDST,"$(BDST=0)") - field(DLY, "$(DLY=0)") - field(BVEL,"$(BVEL=0)") - field(BACC,"$(BACC=0)") - field(OUT,"@asyn($(MOTOR_PORT),$(AXIS_NO))") - field(MRES,"$(MRES=1)") - field(ERES,"$(ERES=0)") - field(PREC,"$(PREC=3)") - field(EGU,"$(EGU=mm)") - field(DHLM,"$(DHLM=0)") - field(DLLM,"$(DLLM=0)") - field(RDBD,"$(RDBD=0)") - field(RTRY,"$(RTRY=1)") - field(RMOD,"$(RMOD=3)") - field(DLY,"$(DLY=0)") - field(FOFF,"$(FOFF=0)") - field(NTM,"0") - field(TWV,"$(TWV=1)") - field(RDBL,"$(RDBL=)") - field(UEIP,"$(UEIP=0)") - field(URIP,"$(URIP=0)") - field(RRES,"$(RRES=0)") - field(SREV,"$(SREV=1)") - field(UREV,"$(UREV=1.0)") - info(Q:group, { - "${PREFIX}axis${AXIS_NO}": { - "setpoint": {+channel:"VAL"}, - "readback": {+channel:"RBV"} - } - }) +record(motor, "$(PREFIX)$(MOTOR_NAME)") { + field(DESC, "$(DESC)") + field(DTYP, "asynMotor") + field(DIR, "$(DIR=0)") + field(VELO, "$(VELO=0)") + field(JVEL, "$(JVEL=0)") + field(VBAS, "$(VBAS=0)") + field(ACCL, "$(ACCL=0)") + field(JAR, "$(JAR=0)") + field(BDST, "$(BDST=0)") + field(DLY, "$(DLY=0)") + field(BVEL, "$(BVEL=0)") + field(BACC, "$(BACC=0)") + field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))") + field(MRES, "$(MRES=1)") + field(ERES, "$(ERES=0)") + field(PREC, "$(PREC=3)") + field(EGU, "$(EGU=mm)") + field(DHLM, "$(DHLM=0)") + field(DLLM, "$(DLLM=0)") + field(RDBD, "$(RDBD=0)") + field(RTRY, "$(RTRY=1)") + field(RMOD, "$(RMOD=3)") + field(DLY, "$(DLY=0)") + field(FOFF, "$(FOFF=0)") + field(NTM, "0") + field(TWV, "$(TWV=1)") + field(RDBL, "$(RDBL=)") + field(UEIP, "$(UEIP=0)") + field(URIP, "$(URIP=0)") + field(RRES, "$(RRES=0)") + field(SREV, "$(SREV=1)") + field(UREV, "$(UREV=1.0)") + info(Q:group, { + "${PREFIX}axis${AXIS_NO}": { + "setpoint": {+channel:"VAL"}, + "readback": {+channel:"RBV"} + } + }) } # The message text record(stringin, "$(PREFIX)$(MOTOR_NAME)-MsgTxt") { field(DTYP, "asynOctetRead") - field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_MESSAGE_TEXT") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_MESSAGE_TEXT") field(SCAN, "I/O Intr") - info(Q:group, { - "${PREFIX}axis${AXIS_NO}": { - "MsgTxt": {+channel:"VAL"} - } - }) + info(Q:group, { + "${PREFIX}axis${AXIS_NO}": { + "MsgTxt": {+channel:"VAL"} + } + }) } # Debug message in IOC log record(stringout, "$(PREFIX)$(MOTOR_NAME)-DbgStrToLOG") { field(DESC, "Log String in IOC log") - field(VAL, "") + field(VAL, "") field(DTYP, "asynOctetWrite") - field(OUT,"@asyn($(MOTOR_PORT),$(AXIS_NO))StrToLOG") - info(Q:group, { - "${PREFIX}axis${AXIS_NO}": { - "DbgStrToLOG": {+channel:"VAL"} - } - }) + field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))StrToLOG") + info(Q:group, { + "${PREFIX}axis${AXIS_NO}": { + "DbgStrToLOG": {+channel:"VAL"} + } + }) } # These records make the motor resolution, offset and direction available to the driver # which is needed for profile moves and other applications # Motor direction for this axis -record(longout,"$(PREFIX)$(MOTOR_NAME)-DIR_") { +record(longout, "$(PREFIX)$(MOTOR_NAME)-DIR_") { field(DESC, "$(MOTOR_NAME) direction") field(DOL, "$(PREFIX)$(MOTOR_NAME).DIR CP MS") field(OMSL, "closed_loop") @@ -76,77 +76,71 @@ record(longout,"$(PREFIX)$(MOTOR_NAME)-DIR_") { field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_REC_DIRECTION") } -record(longin, "$(PREFIX)$(MOTOR_NAME)-Err") -{ +record(longin, "$(PREFIX)$(MOTOR_NAME)-Err") { field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))MCUErr") field(SCAN, "I/O Intr") - info(Q:group, { - "${PREFIX}axis${AXIS_NO}": { - "Error": {+channel:"VAL"} - } - }) + info(Q:group, { + "${PREFIX}axis${AXIS_NO}": { + "Error": {+channel:"VAL"} + } + }) } -record(ai, "$(PREFIX)$(MOTOR_NAME)-VelAct") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-VelAct") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))VelAct") field(SCAN, "I/O Intr") - info(Q:group, { - "${PREFIX}axis${AXIS_NO}": { - "velocityActual": {+channel:"VAL"} - } - }) + info(Q:group, { + "${PREFIX}axis${AXIS_NO}": { + "velocityActual": {+channel:"VAL"} + } + }) } -record(ai, "$(PREFIX)$(MOTOR_NAME)-Vel-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-Vel-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))Vel-RB") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-Acc-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-Acc-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))Acc-RB") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-EncAct") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-EncAct") { field(DTYP, "asynFloat64") field(PREC, "0") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))EncAct") field(SCAN, "I/O Intr") - info(Q:group, { - "${PREFIX}axis${AXIS_NO}": { - "encoderActual": {+channel:"VAL"} - } - }) + info(Q:group, { + "${PREFIX}axis${AXIS_NO}": { + "encoderActual": {+channel:"VAL"} + } + }) } -record(longin, "$(PREFIX)$(MOTOR_NAME)-ErrId") -{ +record(longin, "$(PREFIX)$(MOTOR_NAME)-ErrId") { field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))ErrId") field(SCAN, "I/O Intr") } -record(longout,"$(PREFIX)$(MOTOR_NAME)-ErrRst") { +record(longout, "$(PREFIX)$(MOTOR_NAME)-ErrRst") { field(DESC, "Error Reset") field(VAL, 0) field(DTYP, "asynInt32") field(PINI, "YES") - field(OUT,"@asyn($(MOTOR_PORT),$(AXIS_NO))ErrRst") + field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))ErrRst") } # Motor offset for this axis -record(ao,"$(PREFIX)$(MOTOR_NAME)-OFF_") { +record(ao, "$(PREFIX)$(MOTOR_NAME)-OFF_") { field(DESC, "$(MOTOR_NAME) offset") field(DOL, "$(PREFIX)$(MOTOR_NAME).OFF CP MS") field(OMSL, "closed_loop") @@ -157,7 +151,7 @@ record(ao,"$(PREFIX)$(MOTOR_NAME)-OFF_") { # Motor resolution for this axis -record(ao,"$(PREFIX)$(MOTOR_NAME)-MRES_") { +record(ao, "$(PREFIX)$(MOTOR_NAME)-MRES_") { field(DESC, "$(MOTOR_NAME) resolution") field(DOL, "$(PREFIX)$(MOTOR_NAME).MRES CP MS") field(OMSL, "closed_loop") @@ -166,133 +160,131 @@ record(ao,"$(PREFIX)$(MOTOR_NAME)-MRES_") { field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_REC_RESOLUTION") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgSREV-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgSREV-RB") { field(DESC, "Micro Steps / Revolution") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgSREV-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgSREV-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgUREV-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgUREV-RB") { field(DESC, "EGU / Revolution") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgUREV-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgUREV-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPMIN-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPMIN-RB") { field(DESC, "Absolute Minimum") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPMIN-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPMIN-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPMAX-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPMAX-RB") { field(DESC, "Absolute Maximum") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPMAX-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPMAX-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgSPDB-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgSPDB-RB") { field(DESC, "Set point dead band window") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgSPDB-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgSPDB-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgRDBD-RB") { field(DESC, "In target position window") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgRDBD-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgRDBD-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-Tim-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgRDBD-Tim-RB") { field(DESC, "In target position time") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgRDBD-Tim-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgRDBD-Tim-RB") field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgRDBD-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgRDBD-En-RB") { field(DESC, "In target position enabled") field(DTYP, "asynInt32") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgRDBD-En-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgRDBD-En-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-RB") { field(DESC, "In target position window") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPOSLAG-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPOSLAG-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-Tim-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-Tim-RB") { field(DESC, "In target position time") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPOSLAG-Tim-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPOSLAG-Tim-RB") field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgPOSLAG-En-RB") { field(DESC, "In target position enabled") field(DTYP, "asynInt32") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPOSLAG-En-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgPOSLAG-En-RB") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgDHLM-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgDHLM-RB") { field(DESC, "EC High Soft Limit RB") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDHLM") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDHLM") field(SCAN, "I/O Intr") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-CfgDLLM-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgDLLM-RB") { field(DESC, "EC Low Soft Limit RB") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDLLM") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDLLM") field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgDHLM-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgDHLM-En-RB") { field(DESC, "EC High Soft Limit enabled RB") field(DTYP, "asynInt32") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDHLM-En") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDHLM-En") field(SCAN, "I/O Intr") } -record(longin,"$(PREFIX)$(MOTOR_NAME)-CfgDLLM-En-RB") { +record(longin, "$(PREFIX)$(MOTOR_NAME)-CfgDLLM-En-RB") { field(DESC, "EC Low Soft Limit enabled RB") field(DTYP, "asynInt32") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDLLM-En") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgDLLM-En") field(SCAN, "I/O Intr") } # Config records, the values will be pushed into the motor record fields -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVELO-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVELO-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgVELO") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVMAX-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVMAX-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgVMAX") @@ -300,37 +292,35 @@ record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVMAX-RB") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgJVEL-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgJVEL-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgJVEL") field(SCAN, "I/O Intr") } -record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgACCS-RB") -{ +record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgACCS-RB") { field(DTYP, "asynFloat64") field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgACCS") field(SCAN, "I/O Intr") } -record(mbbi,"$(PREFIX)$(MOTOR_NAME)-HomProc-RB") { - field(DESC,"Homing procedure") +record(mbbi, "$(PREFIX)$(MOTOR_NAME)-HomProc-RB") { + field(DESC, "Homing procedure") field(DTYP, "asynInt32") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))HomProc-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))HomProc-RB") field(SCAN, "I/O Intr") - field(ZRVL, "0") - field(ONVL, "1") - field(TWVL, "2") - field(THVL, "3") - field(FRVL, "4") - field(FVVL, "5") - field(SXVL, "6") - field(SVVL, "7") - field(EIVL, "8") - field(NIVL, "9") + field(ZRVL, "0") + field(ONVL, "1") + field(TWVL, "2") + field(THVL, "3") + field(FRVL, "4") + field(FVVL, "5") + field(SXVL, "6") + field(SVVL, "7") + field(EIVL, "8") + field(NIVL, "9") field(TEVL, "10") field(ELVL, "11") field(TVVL, "12") @@ -356,14 +346,13 @@ record(mbbi,"$(PREFIX)$(MOTOR_NAME)-HomProc-RB") { field(FFST, "ManSetPos") } -record(ai,"$(PREFIX)$(MOTOR_NAME)-HomPos-RB") { +record(ai, "$(PREFIX)$(MOTOR_NAME)-HomPos-RB") { field(DESC, "Home Position") field(DTYP, "asynFloat64") field(PREC, "$(PREC)") - field(INP,"@asyn($(MOTOR_PORT),$(AXIS_NO))HomPos-RB") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))HomPos-RB") field(SCAN, "I/O Intr") } -record (asyn, "$(PREFIX)$(MOTOR_NAME)-$(MOTOR_PORT)-asyn") -{ +record (asyn, "$(PREFIX)$(MOTOR_NAME)-$(MOTOR_PORT)-asyn") { } From ccca0f781def629c1b50b7aec32c14b73e7c0bd5 Mon Sep 17 00:00:00 2001 From: Carlos Doro Neto Date: Tue, 27 Aug 2024 17:24:00 +0200 Subject: [PATCH 2/5] Add archiver info tags to motor record PV --- db/core/ecmcMotorRecord.template | 2 ++ db/core/ecmcMotorRecordPva.template | 2 ++ motion/ecmc_axis_mr.cmd | 12 ++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/db/core/ecmcMotorRecord.template b/db/core/ecmcMotorRecord.template index f2d20b37e..d9f7846cd 100644 --- a/db/core/ecmcMotorRecord.template +++ b/db/core/ecmcMotorRecord.template @@ -34,6 +34,8 @@ record(motor, "$(PREFIX)$(MOTOR_NAME)") { field(SREV, "$(SREV=1)") field(UREV, "$(UREV=1.0)") field(VMAX, "$(VMAX=0)") + $(ECMC_BLOCK_ARCHIVER=#)info(aa_policy, "default") + $(ECMC_BLOCK_ARCHIVER=#)info(archiver, "$(ECMC_ARCHIVER=)") } # The message text diff --git a/db/core/ecmcMotorRecordPva.template b/db/core/ecmcMotorRecordPva.template index 9a742cb15..3345c1e5e 100644 --- a/db/core/ecmcMotorRecordPva.template +++ b/db/core/ecmcMotorRecordPva.template @@ -37,6 +37,8 @@ record(motor, "$(PREFIX)$(MOTOR_NAME)") { "readback": {+channel:"RBV"} } }) + $(ECMC_BLOCK_ARCHIVER=#)info(aa_policy, "default") + $(ECMC_BLOCK_ARCHIVER=#)info(archiver, "$(ECMC_ARCHIVER=)") } # The message text diff --git a/motion/ecmc_axis_mr.cmd b/motion/ecmc_axis_mr.cmd index 1d1622249..2f312aec4 100644 --- a/motion/ecmc_axis_mr.cmd +++ b/motion/ecmc_axis_mr.cmd @@ -16,10 +16,17 @@ ${ECMC_MR_MODULE="ecmcMotorRecord"}CreateAxis(${ECMC_MOTOR_PORT}, "${ECMC_AXIS_N ecmcEpicsEnvSetCalc("ECMC_TEMP_SREV","if(abs(${ECMC_ENC_SCALE_DENOM=1})>0){RESULT:=abs(${ECMC_ENC_SCALE_DENOM=0});} else {RESULT:=1.0};","%d") ecmcEpicsEnvSetCalc("ECMC_TEMP_UREV","if(abs(${ECMC_ENC_SCALE_NUM=0})>0){RESULT:=abs(${ECMC_ENC_SCALE_NUM=0});} else {RESULT:=1.0};","%lf") +#- Check if we should include info tags for automatic PV archival +#- ECMC_ARCHIVER must be defined by integrator in st.cmd +#- Currently only works at ESS +ecmcEpicsEnvSetCalcTernary("ECMC_BLOCK_ARCHIVER", "${NAMING} == 'ESSnaming' and ${ECMC_ARCHIVER} != '')", "", "#") + +ecmcEpicsEnvSetCalc +ecmcEpicsEnvSetCalcTernary #- Use correct field depending on use of ACCL or ACCS ecmcFileExist(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template,1,1) -${ECMC_BLOCK_ACCL} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCL=${ECMC_ACCL=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}") -${ECMC_BLOCK_ACCS} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCS=${ECMC_ACCS_EGU_PER_S2=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}") +${ECMC_BLOCK_ACCL} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCL=${ECMC_ACCL=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER}, ECMC_ARCHIVER=${ECMC_ARCHIVER}") +${ECMC_BLOCK_ACCS} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCS=${ECMC_ACCS_EGU_PER_S2=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER}, ECMC_ARCHIVER=${ECMC_ARCHIVER}") epicsEnvSet("ECMC_AXISFIELDINIT", "") @@ -29,3 +36,4 @@ dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord"}home.template, "PREFIX=${ECMC_P #- Cleanup epicsEnvUnset(ECMC_TEMP_SREV) epicsEnvUnset(ECMC_TEMP_UREV) +epicsEnvUnset(ECMC_BLOCK_ARCHIVER) From 83ded706dabe1325f867ee013a7cbbf9f0ada2b7 Mon Sep 17 00:00:00 2001 From: Carlos Doro Neto Date: Mon, 2 Sep 2024 19:12:44 +0200 Subject: [PATCH 3/5] Improve archiver info tags implementation - Fix minor bugs (missing quotes, unnecessary commands, etc) - Create ECMC_ARCHIVER_POLICY macro - Create configureArchiver.cmd --- db/core/ecmcMotorRecord.template | 5 ++-- db/core/ecmcMotorRecordPva.template | 10 +++++-- motion/ecmc_axis_mr.cmd | 12 ++------ scripts/configureArchiver.cmd | 44 +++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 14 deletions(-) create mode 100644 scripts/configureArchiver.cmd diff --git a/db/core/ecmcMotorRecord.template b/db/core/ecmcMotorRecord.template index d9f7846cd..f7ef24697 100644 --- a/db/core/ecmcMotorRecord.template +++ b/db/core/ecmcMotorRecord.template @@ -34,8 +34,9 @@ record(motor, "$(PREFIX)$(MOTOR_NAME)") { field(SREV, "$(SREV=1)") field(UREV, "$(UREV=1.0)") field(VMAX, "$(VMAX=0)") - $(ECMC_BLOCK_ARCHIVER=#)info(aa_policy, "default") - $(ECMC_BLOCK_ARCHIVER=#)info(archiver, "$(ECMC_ARCHIVER=)") + + $(ECMC_BLOCK_ARCHIVER)info(aa_policy, "$(ECMC_ARCHIVER_POLICY)") + $(ECMC_BLOCK_ARCHIVER)info(archiver, "$(ECMC_ARCHIVER_CLUSTER)") } # The message text diff --git a/db/core/ecmcMotorRecordPva.template b/db/core/ecmcMotorRecordPva.template index 3345c1e5e..abe71a2a5 100644 --- a/db/core/ecmcMotorRecordPva.template +++ b/db/core/ecmcMotorRecordPva.template @@ -31,14 +31,15 @@ record(motor, "$(PREFIX)$(MOTOR_NAME)") { field(RRES, "$(RRES=0)") field(SREV, "$(SREV=1)") field(UREV, "$(UREV=1.0)") + + $(ECMC_BLOCK_ARCHIVER)info(aa_policy, "$(ECMC_ARCHIVER_POLICY)") + $(ECMC_BLOCK_ARCHIVER)info(archiver, "$(ECMC_ARCHIVER_CLUSTER)") info(Q:group, { "${PREFIX}axis${AXIS_NO}": { "setpoint": {+channel:"VAL"}, "readback": {+channel:"RBV"} } }) - $(ECMC_BLOCK_ARCHIVER=#)info(aa_policy, "default") - $(ECMC_BLOCK_ARCHIVER=#)info(archiver, "$(ECMC_ARCHIVER=)") } # The message text @@ -46,6 +47,7 @@ record(stringin, "$(PREFIX)$(MOTOR_NAME)-MsgTxt") { field(DTYP, "asynOctetRead") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))MOTOR_MESSAGE_TEXT") field(SCAN, "I/O Intr") + info(Q:group, { "${PREFIX}axis${AXIS_NO}": { "MsgTxt": {+channel:"VAL"} @@ -59,6 +61,7 @@ record(stringout, "$(PREFIX)$(MOTOR_NAME)-DbgStrToLOG") { field(VAL, "") field(DTYP, "asynOctetWrite") field(OUT, "@asyn($(MOTOR_PORT),$(AXIS_NO))StrToLOG") + info(Q:group, { "${PREFIX}axis${AXIS_NO}": { "DbgStrToLOG": {+channel:"VAL"} @@ -82,6 +85,7 @@ record(longin, "$(PREFIX)$(MOTOR_NAME)-Err") { field(DTYP, "asynInt32") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))MCUErr") field(SCAN, "I/O Intr") + info(Q:group, { "${PREFIX}axis${AXIS_NO}": { "Error": {+channel:"VAL"} @@ -94,6 +98,7 @@ record(ai, "$(PREFIX)$(MOTOR_NAME)-VelAct") { field(PREC, "$(PREC)") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))VelAct") field(SCAN, "I/O Intr") + info(Q:group, { "${PREFIX}axis${AXIS_NO}": { "velocityActual": {+channel:"VAL"} @@ -120,6 +125,7 @@ record(ai, "$(PREFIX)$(MOTOR_NAME)-EncAct") { field(PREC, "0") field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))EncAct") field(SCAN, "I/O Intr") + info(Q:group, { "${PREFIX}axis${AXIS_NO}": { "encoderActual": {+channel:"VAL"} diff --git a/motion/ecmc_axis_mr.cmd b/motion/ecmc_axis_mr.cmd index 2f312aec4..359e4bf93 100644 --- a/motion/ecmc_axis_mr.cmd +++ b/motion/ecmc_axis_mr.cmd @@ -16,17 +16,10 @@ ${ECMC_MR_MODULE="ecmcMotorRecord"}CreateAxis(${ECMC_MOTOR_PORT}, "${ECMC_AXIS_N ecmcEpicsEnvSetCalc("ECMC_TEMP_SREV","if(abs(${ECMC_ENC_SCALE_DENOM=1})>0){RESULT:=abs(${ECMC_ENC_SCALE_DENOM=0});} else {RESULT:=1.0};","%d") ecmcEpicsEnvSetCalc("ECMC_TEMP_UREV","if(abs(${ECMC_ENC_SCALE_NUM=0})>0){RESULT:=abs(${ECMC_ENC_SCALE_NUM=0});} else {RESULT:=1.0};","%lf") -#- Check if we should include info tags for automatic PV archival -#- ECMC_ARCHIVER must be defined by integrator in st.cmd -#- Currently only works at ESS -ecmcEpicsEnvSetCalcTernary("ECMC_BLOCK_ARCHIVER", "${NAMING} == 'ESSnaming' and ${ECMC_ARCHIVER} != '')", "", "#") - -ecmcEpicsEnvSetCalc -ecmcEpicsEnvSetCalcTernary #- Use correct field depending on use of ACCL or ACCS ecmcFileExist(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template,1,1) -${ECMC_BLOCK_ACCL} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCL=${ECMC_ACCL=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER}, ECMC_ARCHIVER=${ECMC_ARCHIVER}") -${ECMC_BLOCK_ACCS} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCS=${ECMC_ACCS_EGU_PER_S2=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER}, ECMC_ARCHIVER=${ECMC_ARCHIVER}") +${ECMC_BLOCK_ACCL} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCL=${ECMC_ACCL=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER=#}, ECMC_ARCHIVER_POLICY=${ECMC_ARCHIVER_POLICY=}, ECMC_ARCHIVER_CLUSTER=${ECMC_ARCHIVER_CLUSTER=}") +${ECMC_BLOCK_ACCS} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCS=${ECMC_ACCS_EGU_PER_S2=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER=#}, ECMC_ARCHIVER_POLICY=${ECMC_ARCHIVER_POLICY=}, ECMC_ARCHIVER_CLUSTER=${ECMC_ARCHIVER_CLUSTER=}") epicsEnvSet("ECMC_AXISFIELDINIT", "") @@ -36,4 +29,3 @@ dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord"}home.template, "PREFIX=${ECMC_P #- Cleanup epicsEnvUnset(ECMC_TEMP_SREV) epicsEnvUnset(ECMC_TEMP_UREV) -epicsEnvUnset(ECMC_BLOCK_ARCHIVER) diff --git a/scripts/configureArchiver.cmd b/scripts/configureArchiver.cmd new file mode 100644 index 000000000..dcc2dcb19 --- /dev/null +++ b/scripts/configureArchiver.cmd @@ -0,0 +1,44 @@ +#=============================================================================== +# configureArchiver.cmd +#- Arguments: [POLICY], [CLUSTER] + +#-d /** +#-d \brief Sets variables consumed by info tags related to integration with the EPICS Archiver Appliance. +#-d \details Currently only availble at ESS. +#-d \file +#-d \param POLICY (optional) default value depends on ECMC_P_SCRIPT +#-d \param CLUSTER (optional) default value depends on ECMC_P_SCRIPT +#-d \note Examples: +#-d \code +#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd +#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd, "POLICY=1Hz" +#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd, "CLUSTER=lab" +#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd, "POLICY=1Hz, CLUSTER=lab" +#-d \endcode +#-d \pre Must be called after startup.cmd +#-d \post Must be called before addAxis.cmd +#-d */ + +#- The default value for ECMC_BLOCK_ARCHIVER is # (check ecmc_axis_mr.cmd). +#- This prevents the info tags from being loaded. +#- The next line removes this restriction. +epicsEnvSet("ECMC_BLOCK_ARCHIVER" , "") + +#- Set ESS-specific default values if NAMING==ESSnaming +#- These values are overridden if either POLICY or CLUSTER are non empty. +ecmcEpicsEnvSetCalcTernary("BLOCK_ESS_DEFAULTS", "'${ECMC_P_SCRIPT}' == 'ESSnaming')", "", "#-") +$(BLOCK_ESS_DEFAULTS) epicsEnvSet("ECMC_ARCHIVER_POLICY" , "default") +$(BLOCK_ESS_DEFAULTS) epicsEnvSet("ECMC_ARCHIVER_CLUSTER", "tn") + +#- Only set ECMC_ARCHIVER_POLICY and ECMC_ARCHIVER_CLUSTER if +#- POLICY and CLUSTER arguments are, respectively, non-empty. +#- This allows us to honor the default values in ecmc_axis_mr.cmd +ecmcEpicsEnvSetCalcTernary("BLOCK_POLICY" , "'$(POLICY=)' != ''", "", "#-") +ecmcEpicsEnvSetCalcTernary("BLOCK_CLUSTER", "'$(CLUSTER=)' != ''", "", "#-") +$(BLOCK_POLICY) epicsEnvSet("ECMC_ARCHIVER_POLICY" , "$(POLICY)" ) +$(BLOCK_CLUSTER) epicsEnvSet("ECMC_ARCHIVER_CLUSTER", "$(CLUSTER)") + +#- Cleanup +epicsEnvUnset(BLOCK_ESS_DEFAULTS) +epicsEnvUnset(BLOCK_POLICY) +epicsEnvUnset(BLOCK_CLUSTER) From 1a713dd63d139e40bdd852253f304b9a51874bfc Mon Sep 17 00:00:00 2001 From: Carlos Doro Neto Date: Mon, 2 Sep 2024 19:19:46 +0200 Subject: [PATCH 4/5] Remove ECMC_AXISFIELDINIT It is not used --- motion/ecmc_axis_mr.cmd | 6 ++---- motion/ecmc_axis_unset.cmd | 1 - motion/ecmc_virt_axis_unset.cmd | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/motion/ecmc_axis_mr.cmd b/motion/ecmc_axis_mr.cmd index 359e4bf93..0f9da7d1f 100644 --- a/motion/ecmc_axis_mr.cmd +++ b/motion/ecmc_axis_mr.cmd @@ -18,10 +18,8 @@ ecmcEpicsEnvSetCalc("ECMC_TEMP_UREV","if(abs(${ECMC_ENC_SCALE_NUM=0})>0){RESULT: #- Use correct field depending on use of ACCL or ACCS ecmcFileExist(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template,1,1) -${ECMC_BLOCK_ACCL} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCL=${ECMC_ACCL=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER=#}, ECMC_ARCHIVER_POLICY=${ECMC_ARCHIVER_POLICY=}, ECMC_ARCHIVER_CLUSTER=${ECMC_ARCHIVER_CLUSTER=}") -${ECMC_BLOCK_ACCS} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCS=${ECMC_ACCS_EGU_PER_S2=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ${ECMC_AXISFIELDINIT=""}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER=#}, ECMC_ARCHIVER_POLICY=${ECMC_ARCHIVER_POLICY=}, ECMC_ARCHIVER_CLUSTER=${ECMC_ARCHIVER_CLUSTER=}") - -epicsEnvSet("ECMC_AXISFIELDINIT", "") +${ECMC_BLOCK_ACCL} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCL=${ECMC_ACCL=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER=#}, ECMC_ARCHIVER_POLICY=${ECMC_ARCHIVER_POLICY=}, ECMC_ARCHIVER_CLUSTER=${ECMC_ARCHIVER_CLUSTER=}") +${ECMC_BLOCK_ACCS} dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord${ECMC_PVA}"}.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO}, DESC=${ECMC_DESC}, EGU=${ECMC_EGU}, PREC=${ECMC_PREC}, VELO=${ECMC_VELO}, JVEL=${ECMC_JOG_VEL}, JAR=${ECMC_JAR}, ACCS=${ECMC_ACCS_EGU_PER_S2=0}, RDBD=${ECMC_MON_AT_TARGET_TOL}, DLLM=${ECMC_SOFT_LOW_LIM}, DHLM=${ECMC_SOFT_HIGH_LIM}, HOMEPROC=${ECMC_HOME_PROC},SREV=${ECMC_TEMP_SREV},UREV=${ECMC_TEMP_UREV}, ECMC_BLOCK_ARCHIVER=${ECMC_BLOCK_ARCHIVER=#}, ECMC_ARCHIVER_POLICY=${ECMC_ARCHIVER_POLICY=}, ECMC_ARCHIVER_CLUSTER=${ECMC_ARCHIVER_CLUSTER=}") ecmcFileExist(${ECMC_MR_MODULE="ecmcMotorRecord"}home.template,1,1) dbLoadRecords(${ECMC_MR_MODULE="ecmcMotorRecord"}home.template, "PREFIX=${ECMC_PREFIX}, MOTOR_NAME=${ECMC_MOTOR_NAME}, MOTOR_PORT=${ECMC_MOTOR_PORT}, AXIS_NO=${ECMC_AXIS_NO},HOMEPROC=${ECMC_HOME_PROC}, HOMEPOS=${ECMC_HOME_POS}, HVELTO=${ECMC_HOME_VEL_TO}, HVELFRM=${ECMC_HOME_VEL_FRM}, HOMEACC=${ECMC_HOME_ACC}") diff --git a/motion/ecmc_axis_unset.cmd b/motion/ecmc_axis_unset.cmd index 6e464fb89..fa30dbc9c 100644 --- a/motion/ecmc_axis_unset.cmd +++ b/motion/ecmc_axis_unset.cmd @@ -8,7 +8,6 @@ #- epicsEnvUnset(ECMC_AXIS_NO) epicsEnvUnset(ECMC_AXISCONFIG) -epicsEnvUnset(ECMC_AXISFIELDINIT) epicsEnvUnset(ECMC_PREC) epicsEnvUnset(ECMC_EGU) epicsEnvUnset(ECMC_DESC) diff --git a/motion/ecmc_virt_axis_unset.cmd b/motion/ecmc_virt_axis_unset.cmd index 8d0b39c33..5d2bd6c7b 100644 --- a/motion/ecmc_virt_axis_unset.cmd +++ b/motion/ecmc_virt_axis_unset.cmd @@ -8,7 +8,6 @@ #- epicsEnvUnset(ECMC_AXIS_NO) epicsEnvUnset(ECMC_AXISCONFIG) -epicsEnvUnset(ECMC_AXISFIELDINIT) epicsEnvUnset(ECMC_PREC) epicsEnvUnset(ECMC_EGU) epicsEnvUnset(ECMC_DESC) From ee3ed2c037b96e7e4f1f85fb7d3d9017b86a2d8d Mon Sep 17 00:00:00 2001 From: Carlos Doro Neto Date: Wed, 9 Oct 2024 14:14:47 +0200 Subject: [PATCH 5/5] Fix formatting after rebase --- db/core/ecmcMotorRecord.template | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/db/core/ecmcMotorRecord.template b/db/core/ecmcMotorRecord.template index 3c766512f..8381d6379 100644 --- a/db/core/ecmcMotorRecord.template +++ b/db/core/ecmcMotorRecord.template @@ -322,8 +322,8 @@ record (asyn, "$(PREFIX)$(MOTOR_NAME)-$(MOTOR_PORT)-asyn") { ################################################################ # Sync and stop on interlock -record(calcout, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgH2L"){ - #field(PINI, "1") +record(calcout, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgH2L") { + #field(PINI, "1") field(DESC, "Trigg MR Sync") field(SCAN, "Passive") field(INPA, "$(PREFIX)$(MOTOR_NAME)-SumIlockBwd CP") @@ -336,8 +336,8 @@ record(calcout, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgH2L"){ field(OUT, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq PP") } -record(calcout, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgL2H"){ - #field(PINI, "1") +record(calcout, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgL2H") { + #field(PINI, "1") field(DESC, "Trigg MR Sync") field(SCAN, "Passive") field(INPA, "$(PREFIX)$(MOTOR_NAME)-SumIlockBwd CP") @@ -380,13 +380,13 @@ record(seq, "${PREFIX}${MOTOR_NAME}-StpCmd_") { ################################################################ # Sync only -record(longin,"${PREFIX}${MOTOR_NAME}-SyncMrCmd"){ - field(DESC, "${MOTOR_NAME}: Sync MR") - field(DTYP, "asynInt32") - field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))TRIGG_SYNC") - field(SCAN, "I/O Intr") - field(FLNK, "${PREFIX}${MOTOR_NAME}-MR-SyncOnly.PROC") - field(TSE, "$(TSE=-2)") +record(longin, "${PREFIX}${MOTOR_NAME}-SyncMrCmd") { + field(DESC, "${MOTOR_NAME}: Sync MR") + field(DTYP, "asynInt32") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))TRIGG_SYNC") + field(SCAN, "I/O Intr") + field(FLNK, "${PREFIX}${MOTOR_NAME}-MR-SyncOnly.PROC") + field(TSE, "$(TSE=-2)") } record(seq, "$(PREFIX)$(MOTOR_NAME)-MR-SyncOnly") {