From f68a2602d576768544429bbe7a57444305df93f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Wed, 28 Feb 2024 13:54:40 +0100 Subject: [PATCH] Rename addAxisToGroup.cmd to addAxisToSafetyGroup.cmd --- GNUmakefile | 2 +- README.md | 13 ++++++++++--- iocsh/test.script | 2 +- iocsh/test_4ax_box.script | 2 +- scripts/addAxisToSafetyGroup.cmd | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 1145c13..47aaf94 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -43,5 +43,5 @@ HEADERS += $(foreach d,${SRC_DIR}, $(wildcard $d/*.h)) DBDS += $(foreach d,${SRC_DIR}, $(wildcard $d/*.dbd)) SCRIPTS += $(BASE_DIR)/startup.cmd SCRIPTS += $(BASE_DIR)/scripts/addSS1Group.cmd -SCRIPTS += $(BASE_DIR)/scripts/addAxisToGroup.cmd +SCRIPTS += $(BASE_DIR)/scripts/addAxisToSafetyGroup.cmd TEMPLATES += $(wildcard $(DB_DIR)/*.template) diff --git a/README.md b/README.md index bed2599..fdbcad0 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,11 @@ Axes that needs the SS1 fucntionality can be added to this group with the ecmcAd This command is also wrapped in a snippet addSS1Group.cmd with the follwoing parameters: * NAME : Name of group * EC_RAMP_DOWN : Ethercat input of ramp down signal from safety PLC -* EC_AXES_STANDSTILL : Ethercat output for signaling safetysystem that all axes are at standstill. +* EC_AXES_STANDSTILL : Ethercat output for signaling safetysystem that all axes are at rest. * DELAY_MS : Safety system delay time of STO or removal of power Example: ``` - # Create SS1 group epicsEnvSet(EC_RAMP_DOWN,"ec${ECMC_EC_MASTER_ID}.s${BI_SLAVE}.binaryInput08.0") epicsEnvSet(EC_AXES_STANDSTILL,"ec${ECMC_EC_MASTER_ID}.s${BO_SLAVE}.binaryOutput07.0") @@ -70,7 +69,15 @@ Note: The "filter_time" parameter is not used right now. As soon as the axis is Note: The plugin checks the trajectory generated velocity setpoint and not the actual velocity. -This command is also wrapped in a snippet addAxisToSafetyGroup.cmd with the following parameters +This command is also wrapped in a snippet addAxisToSafetyGroup.cmd with the following parameters: +* NAME : Name of group to add axis to (group must be created first with addSS1Group.cmd) +* AX_ID : ecmc axis index of axis to add +* VELO_LIM : Velocity limit [EGU of axis], default 0. If setpoint and actual velocity is lower or equal than VELO_LIM the axis is considered to be at rest + +Example: +``` +${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd "NAME=first,AX_ID=1,VELO_LIM=1" +``` # Example of startup script: ``` diff --git a/iocsh/test.script b/iocsh/test.script index 4d5947a..b3c6d43 100644 --- a/iocsh/test.script +++ b/iocsh/test.script @@ -56,7 +56,7 @@ epicsEnvSet(EC_AXES_STANDSTILL,"ec${ECMC_EC_MASTER_ID}.s${DRV_SLAVE}.ZERO.1") ${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addSS1Group.cmd "NAME=first,EC_RAMP_DOWN=${EC_RAMP_DOWN},EC_AXES_STANDSTILL=${EC_AXES_STANDSTILL},DELAY_MS=500" #- Add axis -${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToGroup.cmd "NAME=first,AX_ID=1,VELO_LIM=1" +${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd "NAME=first,AX_ID=1,VELO_LIM=1" ############################################################################## ## Configure diagnostics: diff --git a/iocsh/test_4ax_box.script b/iocsh/test_4ax_box.script index a540b80..76fa10c 100644 --- a/iocsh/test_4ax_box.script +++ b/iocsh/test_4ax_box.script @@ -60,7 +60,7 @@ epicsEnvSet(SAFETY_TIMEOUT,500) ${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addSS1Group.cmd "NAME=first,EC_RAMP_DOWN=${EC_RAMP_DOWN},EC_AXES_STANDSTILL=${EC_AXES_STANDSTILL},DELAY_MS=${SAFETY_TIMEOUT}" #- Add axis -${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToGroup.cmd "NAME=first,AX_ID=1,VELO_LIM=1" +${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd "NAME=first,AX_ID=1,VELO_LIM=1" ############################################################################## ## Configure diagnostics: diff --git a/scripts/addAxisToSafetyGroup.cmd b/scripts/addAxisToSafetyGroup.cmd index 11b70f5..e6c6ef2 100644 --- a/scripts/addAxisToSafetyGroup.cmd +++ b/scripts/addAxisToSafetyGroup.cmd @@ -1,6 +1,6 @@ #============================================================================== -# addAxisToGroup.cmd +# addAxisToSafetyGroup.cmd #- #- !!!!!!!!!!!!! IMPORTANT !!!!!!!!! #- This plugin has _NO_ safety rated functionalities.