ecmc_plugin_safety
IMPORTANT: This plugin or ecmc does NOT offer any safety functionality. This plugin only offers a standard interface to an external safety system / safety PLC / safety relay!!!!
This plugin is designed for interfacing safety systems to ecmc motion axes.
Loading of plugin
Loading of the plugin is made by require:
# Load safety plugin
require ecmc_plugin_safety <optional_version>
SS1
The plugin supports stopping axes accoring to a concept described as SS1. In SS1 the STO (or removal of power) from the axes are delayed for a certain time allowing a controlled rampdown. This makes it possible to stop moving axes in a controlled way and disable of drives before the power is interrupted (or STO triggered). This will result in a safer system and less harware failures and error messages. Basically the safey system is interfaced with binary signals (ethercat I/O). If, for instance, an emergency stop button is pressed the safety system immediately commands this plugin to rampdown velocity of 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 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:
- ecmcAddSS1SafetyGroup()
- ecmcAddAxisToSafetyGroup()
ecmcAddSS1SafetyGroup()
The ecmcAddSS1SafetyGroup() adds a SS1 safety group. The command takes the following parameters:
ecmcAddSS1SafetyGroup(<name>, <ec_rampdown_cmd>, <ec_standstill_status>,<time_delay_ms>)
<name> : Name of group.
<ec_rampdown_cmd> : Ethercat entry input for rampdown cmd.
<ec_standstill_status> : Ethercat entry output for group standstill status.
<time_delay_ms> : Time delay of STO [ms].
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).
The ecmcAddAxisToSafetyGroup() command takes the following parameters:
ecmcAddAxisToSafetyGroup(<group_name>, <axis_index>, <velo_limit>, <filter_time>)
<name> : Name of safety group to add axis to.
<Axis id> : Axis index to add (ecmc axis index).
<velo limit> : Axis standstill velo limit [unit of axis].
<filter_time> : NOT USED (for future implemenation). Time for axis to be below velo limit [ms].
Note: The "filter_time" parameter is not used right now. As soon as the axis is below teh velo_limit it will be considered to stand still and will then be disabled.
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
#
require ecmc_plugin_safety sandst_a
# 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
${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"
....