Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct ECMC_PREV_PLG_P pointer reference, comments and DESC fields #185

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions db/core/ecmcAxis.db
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions db/core/ecmcPlcPrevPlc.db
Original file line number Diff line number Diff line change
@@ -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)")
Expand Down
2 changes: 1 addition & 1 deletion db/core/ecmcPlgPrevPlg.db
Original file line number Diff line number Diff line change
@@ -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") {
Expand Down
6 changes: 3 additions & 3 deletions scripts/addDataStorage.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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})

2 changes: 1 addition & 1 deletion scripts/addSlave.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
6 changes: 3 additions & 3 deletions scripts/loadPLCFile.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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})

10 changes: 5 additions & 5 deletions scripts/loadPlugin.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
Loading