diff --git a/db/core/ecmcMotorRecord.template b/db/core/ecmcMotorRecord.template index 960c26961..8381d6379 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)") @@ -36,17 +35,20 @@ record(motor,"$(PREFIX)$(MOTOR_NAME)") field(UREV, "$(UREV=1.0)") field(VMAX, "$(VMAX=0)") field(SPAM, "$(SPAM=15)") + + $(ECMC_BLOCK_ARCHIVER)info(aa_policy, "$(ECMC_ARCHIVER_POLICY)") + $(ECMC_BLOCK_ARCHIVER)info(archiver, "$(ECMC_ARCHIVER_CLUSTER)") } # 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") @@ -65,38 +67,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") @@ -105,7 +103,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") @@ -116,7 +114,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") @@ -125,7 +123,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)") @@ -133,7 +131,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)") @@ -141,14 +139,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)") @@ -156,7 +154,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)") @@ -164,7 +162,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)") @@ -172,7 +170,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)") @@ -180,14 +178,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)") @@ -195,7 +193,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)") @@ -203,14 +201,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)") @@ -218,7 +216,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)") @@ -226,14 +224,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") @@ -242,16 +240,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") @@ -259,24 +255,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") @@ -315,7 +309,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)") @@ -323,38 +317,37 @@ 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") { } ################################################################ # Sync and stop on interlock -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(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") +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(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") } record(seq, "$(PREFIX)$(MOTOR_NAME)-MR-SyncTrgSeq") { @@ -378,22 +371,22 @@ 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") } ################################################################ # 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") { diff --git a/db/core/ecmcMotorRecordPva.template b/db/core/ecmcMotorRecordPva.template index 2ad67d562..abe71a2a5 100644 --- a/db/core/ecmcMotorRecordPva.template +++ b/db/core/ecmcMotorRecordPva.template @@ -1,74 +1,79 @@ -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)") + + $(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"} + } + }) } # 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 +81,74 @@ 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 +159,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 +168,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 +300,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 +354,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") { } diff --git a/motion/ecmc_axis_mr.cmd b/motion/ecmc_axis_mr.cmd index 39bc192d9..946738830 100644 --- a/motion/ecmc_axis_mr.cmd +++ b/motion/ecmc_axis_mr.cmd @@ -19,10 +19,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_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=""}") - -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 2ec0d006e..e148089ba 100644 --- a/motion/ecmc_axis_unset.cmd +++ b/motion/ecmc_axis_unset.cmd @@ -9,7 +9,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 7e2ab7d8e..233e73062 100644 --- a/motion/ecmc_virt_axis_unset.cmd +++ b/motion/ecmc_virt_axis_unset.cmd @@ -9,7 +9,6 @@ #- epicsEnvUnset(ECMC_AXIS_NO) epicsEnvUnset(ECMC_AXISCONFIG) -epicsEnvUnset(ECMC_AXISFIELDINIT) epicsEnvUnset(ECMC_PREC) epicsEnvUnset(ECMC_EGU) epicsEnvUnset(ECMC_DESC) 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)