From eeaffaad966448a330365d452081e3a7160a3be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Mon, 16 Dec 2024 09:45:06 +0100 Subject: [PATCH] Update naming in scripts --- iocsh/test_4ax_box.script | 19 +++++++++---------- scripts/addAxisToSafetyGroup.cmd | 4 ++-- scripts/addSS1Group.cmd | 14 +++++++------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/iocsh/test_4ax_box.script b/iocsh/test_4ax_box.script index 142e64f..cfab6e5 100644 --- a/iocsh/test_4ax_box.script +++ b/iocsh/test_4ax_box.script @@ -54,23 +54,22 @@ ${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis.yaml" require ecmc_plugin_safety # Create SS1 group -#- EC_RAMP_DOWN : Ethercat entry for ramp down command, input to ecmc (command from safety PLC/system) -#- EC_AXES_REST : Ethercat entry for signaling that all axes in group are at rest, output from ecmc (feedback to safety PLC/system) -#- EC_AXES_MAX_VELO : Ethercat entry for reducing velocity, input to ecmc (command from safety PLC/system) -#- DELAY_MS : Time between rampdown command and STO -epicsEnvSet(EC_RAMP_DOWN,"ec${ECMC_EC_MASTER_ID}.s${BI_SLAVE}.binaryInput08.0") -epicsEnvSet(EC_AXES_REST,"ec${ECMC_EC_MASTER_ID}.s${BO_SLAVE}.binaryOutput07.0") -epicsEnvSet(EC_AXES_MAX_VELO,"ec${ECMC_EC_MASTER_ID}.s${BO_SLAVE}.ONE.0") +#- EC_RAMP_DOWN_CMD : EtherCAT entry for ramp down command, input to ecmc (command from safety PLC/system) +#- EC_REST_STAT : EtherCAT entry for signaling that all axes in group are at rest, output from ecmc (feedback to safety PLC/system) +#- EC_RED_VEL_CMD : EtherCAT entry for reducing velocity, input to ecmc (command from safety PLC/system) +#- DELAY_MS : Time between rampdown command and STO +epicsEnvSet(EC_RAMP_DOWN_CMD,"ec${ECMC_EC_MASTER_ID}.s${BI_SLAVE}.binaryInput08.0") +epicsEnvSet(EC_REST_STAT,"ec${ECMC_EC_MASTER_ID}.s${BO_SLAVE}.binaryOutput07.0") +epicsEnvSet(EC_RED_VEL_CMD,"ec${ECMC_EC_MASTER_ID}.s${BO_SLAVE}.ONE.0") epicsEnvSet(SAFETY_TIMEOUT,500) -${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addSS1Group.cmd "NAME=first,EC_RAMP_DOWN=${EC_RAMP_DOWN},EC_AXES_REST=${EC_AXES_REST},EC_AXES_MAX_VELO=${EC_AXES_MAX_VELO=empty},DELAY_MS=${SAFETY_TIMEOUT}" +${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addSS1Group.cmd "NAME=first,EC_RAMP_DOWN_CMD=${EC_RAMP_DOWN_CMD},EC_REST_STAT=${EC_REST_STAT},EC_RED_VEL_CMD=${EC_RED_VEL_CMD=empty},DELAY_MS=${SAFETY_TIMEOUT}" #- Add axis #- AX_ID : Axis ID #- VELO_REST_LIM : Velocity at rest limit [unit same as EGU of axis] -#- VELO_MAX_LIM : Velocity maximum limit, -1 to disable [unit same as EGU of axis] +#- VELO_MAX_LIM : Velocity maximum limit when EC_RED_VEL_CMD, set to -1 to disable [unit same as EGU of axis] ${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd "NAME=first,AX_ID=1,VELO_REST_LIM=1,VELO_MAX_LIM=100" - ############################################################################## ## Configure diagnostics: # diff --git a/scripts/addAxisToSafetyGroup.cmd b/scripts/addAxisToSafetyGroup.cmd index c845745..ae08c45 100644 --- a/scripts/addAxisToSafetyGroup.cmd +++ b/scripts/addAxisToSafetyGroup.cmd @@ -18,7 +18,7 @@ #- NAME : Name of safety group #- AX_ID : Axis ID #- VELO_REST_LIM : Velocity at rest limit [unit same as EGU of axis] -#- VELO_MAX_LIM : Velocity maximum limit, -1 to disable [unit same as EGU of axis] +#- VELO_MAX_LIM : Velocity maximum limit when EC_RED_VEL_CMD, set to -1 to disable [unit same as EGU of axis] #- ################################################################################# @@ -26,7 +26,7 @@ #- : Name of safety group to add axis to. #- : Axis index to add (ecmc axis index). #- : Axis at rest velo limit [unit of axis]. -#- : Axis max velo limit [unit of axis]. +#- : Velocity maximum limit when EC_RED_VEL_CMD, set to -1 to disable [unit same as EGU of axis] #- : NOT USED (for future implemenation). Time for axis to be below velo limit [ms]. ecmcAddAxisToSafetyGroup("${NAME}",${AX_ID},${VELO_REST_LIM=0},0,${VELO_MAX_LIM=0.0}) diff --git a/scripts/addSS1Group.cmd b/scripts/addSS1Group.cmd index b677a4e..5a8e853 100644 --- a/scripts/addSS1Group.cmd +++ b/scripts/addSS1Group.cmd @@ -15,11 +15,11 @@ #-############################################################################### #- #- Arguments: -#- NAME : Name of safety group -#- EC_RAMP_DOWN : Ethercat entry for ramp down command, input to ecmc (command from safety PLC/system) -#- EC_AXES_REST : Ethercat entry for signaling that all axes in group are at rest, output from ecmc (feedback to safety PLC/system) -#- EC_AXES_MAX_VELO : Ethercat entry for reducing velocity, input to ecmc (command from safety PLC/system) -#- DELAY_MS : Time between rampdown command and STO +#- NAME : Name of safety group +#- EC_RAMP_DOWN_CMD : EtherCAT entry for ramp down command, input to ecmc (command from safety PLC/system) +#- EC_REST_STAT : EtherCAT entry for signaling that all axes in group are at rest, output from ecmc (feedback to safety PLC/system) +#- EC_RED_VEL_CMD : EtherCAT entry for reducing velocity, input to ecmc (command from safety PLC/system) +#- DELAY_MS : Time between rampdown command and STO #- ################################################################################# @@ -27,10 +27,10 @@ #- : Name of group #- : Ethercat entry input for rampdown cmd #- : Ethercat entry output for group standstill status -#- : Ethercat entry input for activation of maximum velo limitation (set to "empty" to disable) +#- : Ethercat entry input for activation of maximum velo limitation (set to "empty" to disable) #- : Time delay of STO [ms] -ecmcAddSS1SafetyGroup("${NAME}","${EC_RAMP_DOWN}","${EC_AXES_REST}","${EC_AXES_MAX_VELO=empty}",${DELAY_MS=0}) +ecmcAddSS1SafetyGroup("${NAME}","${EC_RAMP_DOWN_CMD}","${EC_REST_STAT}","${EC_RED_VEL_CMD=empty}",${DELAY_MS=0}) #- Load SS1 group records dbLoadRecords("ss1.template","P=${ECMC_PREFIX},NAME=${NAME}")