The safety plugin is the interface layer between ecmc and an external safety system.
Use it when:
This plugin is not the safety function itself. It is only the interface towards the external certified safety chain.
The safety plugin is a special case and uses Cfg.LoadSafetyPlugin(...) rather than the normal Cfg.LoadPlugin(...) wrapper.
In practice, local examples use the plugin package directly:
require ecmc_plugin_safety
Then the plugin package helper scripts are used to create safety objects.
The local startup material uses:
addSS1Group.cmdaddAxisToSafetyGroup.cmdExample:
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addSS1Group.cmd "NAME=first,EC_RAMP_DOWN_CMD=${EC_RAMP_DOWN_CMD},EC_AXES_AT_REST_STAT=${EC_AXES_AT_REST_STAT},EC_AXES_LIM_VELO_CMD=${EC_AXES_LIM_VELO_CMD=empty},DELAY_MS=${SAFETY_TIMEOUT}"
${SCRIPTEXEC} ${ecmc_plugin_safety_DIR}addAxisToSafetyGroup.cmd "NAME=first,AX_ID=1,VELO_REST_LIM=1,VELO_MAX_LIM=100"
Verified helper-script parameters from local examples include:
The plugin repo confirms the underlying command model:
ecmcAddSS1SafetyGroup(...)ecmcAddAxisToSafetyGroup(...)And the helper scripts load the plugin templates:
ecmcSS1Group.templateecmcSS1Axis.templateThe plugin package also contains:
ecmcSS1Main.templateUse the safety plugin when safety-related commands and feedback must cross the boundary between:
Do not describe it as a safety-certified function by itself.
The plugin README also clarifies two important behaviors: