diff --git a/README.md b/README.md index d6985cd..b492457 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ This plugin is designed for interfacing safety systems to ecmc motion axes. # Loading of plugin -TODO!! +Loading of the plugin is made by require: +``` +# Load safety plugin +require ecmc_plugin_safety +``` # 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. @@ -49,9 +53,13 @@ Note: The plugin checks the trajectory generated velocity setpoint and not the a # Example of startup script: ``` -Plugin needs to be loaded.. +# Load safety plugin +require ecmc_plugin_safety sandst_a -ecmcAddSS1SafetyGroup("first","ec${ECMC_EC_MASTER_ID}.s${DRV_SLAVE}.binaryInput01.0","ec${ECMC_EC_MASTER_ID}.s${DRV_SLAVE}.binaryOutput01.1",500) +# 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) + +# Add axes to group ecmcAddAxisToSafetyGroup("first",1,1,0) ecmcAddAxisToSafetyGroup("first",2,10,0) ecmcAddAxisToSafetyGroup("first",3,0,0) diff --git a/startup.cmd b/startup.cmd index 89b6af6..210de07 100644 --- a/startup.cmd +++ b/startup.cmd @@ -10,21 +10,17 @@ #-############################################################################### #- #- Arguments -#- [mandatory] -#- PLUGIN_ID : Plugin instansiation index, must be unique for each call #- ################################################################################# #- Print discalimer # -# IMPORTANT!!! +# !!!!!!!!!!!!! IMPORTANT !!!!!!!!! # This plugin has _NO_ safety rated functionalities. # The intended use of this plugin is only to handle interfacing with a safety PLC. # #- Load plugin: Safety - -# Might need differet paths for PSI and ESS.. must check epicsEnvSet(ECMC_PLUGIN_FILNAME,"$(ecmc_plugin_safety_DIR)/lib/${EPICS_HOST_ARCH=linux-x86_64}/libecmc_plugin_safety.so") epicsEnvSet(ECMC_PLUGIN_CONFIG,"DBG_PRINT=1;") -${SCRIPTEXEC} ${ecmccfg_DIR}loadPlugin.cmd, "PLUGIN_ID=${PLUGIN_ID=0},FILE=${ECMC_PLUGIN_FILNAME},CONFIG='${ECMC_PLUGIN_CONFIG=""}', REPORT=${REPORT=1}" +ecmcConfigOrDie "Cfg.LoadSafetyPlugin(${ECMC_PLUGIN_FILNAME},${ECMC_PLUGIN_CONFIG=""})"