5 Commits
0.2.0 ... 0.3.0

6 changed files with 34 additions and 15 deletions

View File

@@ -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)

View File

@@ -22,8 +22,8 @@ Basically the safey system is interfaced with two binary signals (ethercat I/O):
If, for instance, an safety event is triggerd by the safety system, it will immediately command this plugin to rampdown velocity of all axes (that a configured to stop). When all axes, that are configured to rampdown, have stopped then this plugin will disable the axes and set an ethercat output informing the safety system that the axes are standstill. After a certain timout the safety system will make sure power is removed from the motion axes by triggering an STO or removing power. The removal of power or triggering of STO will made regardless if the axes are at rest or not. A reset of the safety system, allowing power to the drives, will only be possible once the safety system gets a confirmation that all axes are at rest.
The configuration is made by two commands:
1. ecmcAddSS1SafetyGroup()
2. ecmcAddAxisToSafetyGroup()
1. ecmcAddSS1SafetyGroup() wrapped into addSS1Group.cmd
2. ecmcAddAxisToSafetyGroup() wrapped in snippet addAxisToSafetyGroup.cmd
## ecmcAddSS1SafetyGroup()
@@ -38,9 +38,21 @@ 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
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 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")
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}"
```
## 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).
@@ -57,8 +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:
* addAxisToGroup.cmd
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:
```
@@ -73,9 +92,9 @@ 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 "first"
${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"
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd.cmd "NAME=first,AX_ID=1,VELO_LIM=1"
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd.cmd "NAME=first,AX_ID=2,VELO_LIM=1"
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd.cmd "NAME=first,AX_ID=3,VELO_LIM=1"
....
```

View File

@@ -123,7 +123,7 @@ trajectory:
velocity: 500 # Default velo for axis
acceleration: 200 # Default acc for axis
deceleration: 200 # Default dec for axis
emergencyDeceleration: 1000 # Deceleration when axis in error state
emergencyDeceleration: 1200 # Deceleration when axis in error state
jerk: 10 # Default jerk for axis
jog:
velocity: 5 # Default velo fro JOG (motor record)

View File

@@ -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:

View File

@@ -51,7 +51,7 @@ ${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis.yaml"
##############################################################################
## Load safety plugin
#
require ecmc_plugin_safety sandst_a
require ecmc_plugin_safety
# Create SS1 group
epicsEnvSet(EC_RAMP_DOWN,"ec${ECMC_EC_MASTER_ID}.s${BI_SLAVE}.binaryInput08.0")
@@ -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:

View File

@@ -1,6 +1,6 @@
#==============================================================================
# addAxisToGroup.cmd
# addAxisToSafetyGroup.cmd
#-
#- !!!!!!!!!!!!! IMPORTANT !!!!!!!!!
#- This plugin has _NO_ safety rated functionalities.