Merge branch 'master' of git.psi.ch:epics_ioc_modules/ecmc_plugin_safety

This commit is contained in:
2024-02-19 16:52:27 +01:00

View File

@@ -35,6 +35,9 @@ ecmcAddSS1SafetyGroup(<name>, <ec_rampdown_cmd>, <ec_standstill_status>,<time_de
Each group is interfacing the safety system through the same I/O (ethercat).
Axes that needs the SS1 fucntionality can be added to this group with the ecmcAddAxisToSafetyGroup() command.
This command is also wrapped in a snippet:
* addSS1Group.cmd
## ecmcAddAxisToSafetyGroup()
With the "ecmcAddAxisToSafetyGroup()" command an ecmc axis can be added to a safety group.
All axes linked to a certain group will act on command from the safety system (initiation of velocity rampdown).
@@ -51,17 +54,24 @@ 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:
* addAxisToGroup.cmd
# Example of startup script:
```
# Load safety plugin
##############################################################################
## Load safety plugin
#
require ecmc_plugin_safety sandst_a
# Create Group
ecmcAddSS1SafetyGroup("first","ec${ECMC_EC_MASTER_ID}.s${DRV_SLAVE}.ZERO.0","ec${ECMC_EC_MASTER_ID}.s${DRV_SLAVE}.ZERO.1",500)
# Create SS1 group
epicsEnvSet(RAMP_DOWN_CMD,"ec${ECMC_EC_MASTER_ID}.s${DRV_SLAVE}.ZERO.0")
epicsEnvSet(STANDSTILL_STAT,"ec${ECMC_EC_MASTER_ID}.s${DRV_SLAVE}.ZERO.1")
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addSS1Group.cmd "NAME=first,EC_RAMP_DOWN_CMD=${RAMP_DOWN_CMD},EC_STANDSTILL_STAT=${STANDSTILL_STAT},DELAY_MS=500"
# Add axes to group
ecmcAddAxisToSafetyGroup("first",1,1,0)
ecmcAddAxisToSafetyGroup("first",2,10,0)
ecmcAddAxisToSafetyGroup("first",3,0,0)
#- Add axes
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToGroup.cmd "NAME=first,AX_ID=1,VELO_LIM=1"
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToGroup.cmd "NAME=first,AX_ID=2,VELO_LIM=1"
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToGroup.cmd "NAME=first,AX_ID=3,VELO_LIM=1"
....
```