From 125a05c9dc43350e4b5acb976c87110cd6843f08 Mon Sep 17 00:00:00 2001 From: Markus Kristensson Date: Mon, 7 Aug 2023 17:43:52 +0200 Subject: [PATCH 1/2] Correct description field in ecmcAxis.db Corrects the description field of two records in ecmcAxis.db. --- db/core/ecmcAxis.db | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/core/ecmcAxis.db b/db/core/ecmcAxis.db index c569f22b2..df7a70d88 100644 --- a/db/core/ecmcAxis.db +++ b/db/core/ecmcAxis.db @@ -547,7 +547,7 @@ record(bi,"${P}${AXIS_NAME}-Wrn"){ } record(mbbo, "${P}${AXIS_NAME}-movVelCmd") { - field(DESC, "absolute move command data") + field(DESC, "velocity move command data") field(VAL, "${VELPROC=0}") field(ZRVL, 0) field(ZRST, "normal") @@ -556,7 +556,7 @@ record(mbbo, "${P}${AXIS_NAME}-movVelCmd") { } record(mbbo, "${P}${AXIS_NAME}-movRelCmd") { - field(DESC, "absolute move command data") + field(DESC, "relative move command data") field(VAL, "${RELPROC=0}") field(ZRVL, 0) field(ZRST, "normal") From 8345b1c16dbb6291d66e27a4c1396e216754eb42 Mon Sep 17 00:00:00 2001 From: Markus Kristensson Date: Tue, 8 Aug 2023 13:01:26 +0200 Subject: [PATCH 2/2] Correct ECMC_PREV_PLG_P pointer reference Corrects the ECMC_PREV_PLG_P pointer reference of loadPlugin.cmd. Also sneaks in a number of corrections to commentaries related to ecmcXXXPrevXXX.db and the auto gui generation in the scripts/loadXXX.cmd and scripts/addXXX.cmd files. --- db/core/ecmcPlcPrevPlc.db | 4 ++-- db/core/ecmcPlgPrevPlg.db | 2 +- scripts/addDataStorage.cmd | 6 +++--- scripts/addSlave.cmd | 2 +- scripts/loadPLCFile.cmd | 6 +++--- scripts/loadPlugin.cmd | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/db/core/ecmcPlcPrevPlc.db b/db/core/ecmcPlcPrevPlc.db index b3b7f926d..7b54db27b 100644 --- a/db/core/ecmcPlcPrevPlc.db +++ b/db/core/ecmcPlcPrevPlc.db @@ -1,6 +1,6 @@ -# This record is already initialized by the previous call to addAxis.cmd -# Used to make a "pointer" between the axes objects to be used to autoconfigure GUI +# This record is already initialized by the previous call to loadPLCFile.cmd +# Used to make a "pointer" between the PLC objects to be used to autoconfigure GUI # This db is only used to set the VAL field record(ao,"$(PREV_ECMC_P)NxtObjId") { field(VAL, "$(NEXT_OBJ_ID=-1)") diff --git a/db/core/ecmcPlgPrevPlg.db b/db/core/ecmcPlgPrevPlg.db index 8df118031..15950e81e 100644 --- a/db/core/ecmcPlgPrevPlg.db +++ b/db/core/ecmcPlgPrevPlg.db @@ -1,5 +1,5 @@ -# This record is already initialized by the previous call to addAxis.cmd +# This record is already initialized by the previous call to loadPlugin.cmd # Used to make a "pointer" between the plugin objects to be used to autoconfigure GUI # This db is only used to set the VAL field record(ao,"$(PREV_ECMC_P)NxtObjId") { diff --git a/scripts/addDataStorage.cmd b/scripts/addDataStorage.cmd index b5a683968..f7945e1e0 100644 --- a/scripts/addDataStorage.cmd +++ b/scripts/addDataStorage.cmd @@ -46,19 +46,19 @@ dbLoadTemplate(${SUBST_FILE="ecmcDS.substitutions"}, "P=${ECMC_PREFIX}, PORT=${E epicsEnvUnset(ECMC_DS_ID_2_CHARS) #- Below for facilitate auto gui generation -# Do not set NxtObj "pointer" if this is the first axis (ECMC_PREV_DS_OBJ_ID==-1) +# Do not set NxtObj "pointer" if this is the first dataStorage (ECMC_PREV_DS_OBJ_ID==-1) ecmcEpicsEnvSetCalcTernary(ECMC_EXE_NEXT_DS,"${ECMC_PREV_DS_OBJ_ID=-1}>=0", "","#- ") ${ECMC_EXE_NEXT_DS}ecmcFileExist(ecmcDsPrevDs.db,1,1) ${ECMC_EXE_NEXT_DS}dbLoadRecords(ecmcDsPrevDs.db,"NEXT_OBJ_ID=${DS_ID=-1},PREV_ECMC_P=${ECMC_PREV_DS_P=""}") epicsEnvUnset(ECMC_EXE_NEXT_DS) -#- If this is the first added slave then store value in P:MCU-Cfg-AX-FrstObj +#- If this is the first added dataStorage then store value in P:MCU-Cfg-AX-FrstObjId ecmcEpicsEnvSetCalcTernary(ECMC_EXE_FIRST_DS,"${ECMC_PREV_DS_OBJ_ID=-1}<0", "","#- ") ${ECMC_EXE_FIRST_DS}ecmcFileExist(ecmcDsFirstDs.db,1,1) ${ECMC_EXE_FIRST_DS}dbLoadRecords(ecmcDsFirstDs.db,"P=${ECMC_PREFIX},FIRST_OBJ_ID=${DS_ID}") epicsEnvUnset(ECMC_EXE_FIRST_DS) -#- Store info to populate the ECMC_P-NxtObj "pointer" of next added axis +#- Store info to populate the ECMC_P-NxtObj "pointer" of next added dataStorage epicsEnvSet(ECMC_PREV_DS_P,"$(ECMC_PREFIX)MCU-Cfg-DS${DS_ID}-") epicsEnvSet(ECMC_PREV_DS_OBJ_ID,${DS_ID}) diff --git a/scripts/addSlave.cmd b/scripts/addSlave.cmd index 671a1ef40..12520b227 100644 --- a/scripts/addSlave.cmd +++ b/scripts/addSlave.cmd @@ -61,7 +61,7 @@ ecmcEpicsEnvSetCalcTernary(ECMC_EXE_NEXT_SLV,"${ECMC_EC_PREV_SLAVE_NUM=-1}>=0", ${ECMC_EXE_NEXT_SLV}dbLoadRecords(ecmcEcPrevSlave.db,"NEXT_SLAVE_ID=${ECMC_EC_SLAVE_NUM=-1},PREV_ECMC_P=${ECMC_PREV_ECMC_P=""}") epicsEnvUnset(ECMC_EXE_NEXT_SLV) -#- If this is the first added slave then store value in P:MCU-Cfg-EC-FrstObj +#- If this is the first added slave then store value in P:MCU-Cfg-EC-FrstObjId ecmcEpicsEnvSetCalcTernary(ECMC_EXE_FIRST_SLAVE,"${ECMC_EC_PREV_SLAVE_NUM=-1}<0", "","#- ") #- Next slave of the previous slave is this slave ${ECMC_EXE_FIRST_SLAVE}dbLoadRecords(ecmcEcFirstSlave.db,"P=${ECMC_PREFIX},FIRST_SLAVE_ID=${ECMC_EC_SLAVE_NUM}") diff --git a/scripts/loadPLCFile.cmd b/scripts/loadPLCFile.cmd index 98374d500..5c4e737a7 100644 --- a/scripts/loadPLCFile.cmd +++ b/scripts/loadPLCFile.cmd @@ -56,19 +56,19 @@ dbLoadTemplate(${SUBST_FILE="ecmcPlc.substitutions"}, "PORT=${ECMC_ASYN_PORT},A= epicsEnvUnset(ECMC_PLC_ID_2_CHARS) #- Below for facilitate auto gui generation -# Do not set NxtObj "pointer" if this is the first axis (ECMC_PREV_PLC_OBJ_ID==-1) +# Do not set NxtObj "pointer" if this is the first PLC (ECMC_PREV_PLC_OBJ_ID==-1) ecmcEpicsEnvSetCalcTernary(ECMC_EXE_NEXT_PLC,"${ECMC_PREV_PLC_OBJ_ID=-1}>=0", "","#- ") ${ECMC_EXE_NEXT_PLC}ecmcFileExist(ecmcPlcPrevPlc.db,1,1) ${ECMC_EXE_NEXT_PLC}dbLoadRecords(ecmcPlcPrevPlc.db,"NEXT_OBJ_ID=${ECMC_PLC_ID=-1},PREV_ECMC_P=${ECMC_PREV_PLC_P=""}") epicsEnvUnset(ECMC_EXE_NEXT_PLC) -#- If this is the first added slave then store value in P:MCU-Cfg-AX-FrstObj +#- If this is the first added PLC then store value in P:MCU-Cfg-PLC-FrstObjId ecmcEpicsEnvSetCalcTernary(ECMC_EXE_FIRST_PLC,"${ECMC_PREV_PLC_OBJ_ID=-1}<0", "","#- ") ${ECMC_EXE_FIRST_PLC}ecmcFileExist(ecmcPlcFirstPlc.db,1,1) ${ECMC_EXE_FIRST_PLC}dbLoadRecords(ecmcPlcFirstPlc.db,"P=${ECMC_PREFIX},FIRST_OBJ_ID=${ECMC_PLC_ID}") epicsEnvUnset(ECMC_EXE_FIRST_PLC) -#- Store info to populate the ECMC_P-NxtObj "pointer" of next added axis +#- Store info to populate the ECMC_P-NxtObj "pointer" of next added PLC epicsEnvSet(ECMC_PREV_PLC_P,"$(ECMC_PREFIX)MCU-Cfg-PLC${ECMC_PLC_ID}-") epicsEnvSet(ECMC_PREV_PLC_OBJ_ID,${ECMC_PLC_ID}) diff --git a/scripts/loadPlugin.cmd b/scripts/loadPlugin.cmd index 53aafd527..19c18b321 100644 --- a/scripts/loadPlugin.cmd +++ b/scripts/loadPlugin.cmd @@ -3,7 +3,7 @@ #- Arguments: FILE, PLUGIN_ID, [CONFIG], [REPORT] #-d /** -#-d \brief Script for loading a ecmc pluginfrom file. +#-d \brief Script for loading a ecmc plugin from file. #-d \author Anders Sandström #-d \file #-d \param FILE Filename of plugin shared lib (./ecmcPlugin_Advanced.so) @@ -26,18 +26,18 @@ epicsEnvUnset(ECMC_PLUGIN_REPORT); ecmcFileExist(ecmcPlg.template,1,1) dbLoadRecords(ecmcPlg.template, "P=${ECMC_PREFIX},Index=${PLUGIN_ID}") -# Do not set NxtObj "pointer" if this is the first axis (ECMC_PREV_PLG_OBJ_ID==-1) +# Do not set NxtObj "pointer" if this is the first plugin (ECMC_PREV_PLG_OBJ_ID==-1) ecmcEpicsEnvSetCalcTernary(ECMC_EXE_NEXT_PLG,"${ECMC_PREV_PLG_OBJ_ID=-1}>=0", "","#- ") ${ECMC_EXE_NEXT_PLG}ecmcFileExist(ecmcPlgPrevPlg.db,1,1) ${ECMC_EXE_NEXT_PLG}dbLoadRecords(ecmcPlgPrevPlg.db,"NEXT_OBJ_ID=${PLUGIN_ID=-1},PREV_ECMC_P=${ECMC_PREV_PLG_P=""}") epicsEnvUnset(ECMC_EXE_NEXT_PLG) -#- If this is the first added slave then store value in P:MCU-Cfg-AX-FrstObj +#- If this is the first added plugin then store value in P:MCU-Cfg-PLG-FrstObjId ecmcEpicsEnvSetCalcTernary(ECMC_EXE_FIRST_PLG,"${ECMC_PREV_PLG_OBJ_ID=-1}<0", "","#- ") ${ECMC_EXE_FIRST_PLG}ecmcFileExist(ecmcPlgFirstplg.db,1,1) ${ECMC_EXE_FIRST_PLG}dbLoadRecords(ecmcPlgFirstplg.db,"P=${ECMC_PREFIX},FIRST_OBJ_ID=${PLUGIN_ID}") epicsEnvUnset(ECMC_EXE_FIRST_PLG) -#- Store info to populate the ECMC_P-NxtObj "pointer" of next added axis -epicsEnvSet(ECMC_PREV_PLG_P,"$(ECMC_PREFIX)MCU-Cfg-DS${PLUGIN_ID}-") +#- Store info to populate the ECMC_P-NxtObj "pointer" of next added plugin +epicsEnvSet(ECMC_PREV_PLG_P,"$(ECMC_PREFIX)MCU-Cfg-PLG${PLUGIN_ID}-") epicsEnvSet(ECMC_PREV_PLG_OBJ_ID,${PLUGIN_ID})