From 6d4867d5b8ceebc1246952bb8056b0bf57a36711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Fri, 16 Feb 2024 16:13:28 +0100 Subject: [PATCH 1/2] WIP --- scripts/startup.cmd | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/startup.cmd b/scripts/startup.cmd index 89b6af6..210de07 100644 --- a/scripts/startup.cmd +++ b/scripts/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=""})" From 7404f7206cba944893b38eb400bf1c7d77360e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Fri, 16 Feb 2024 16:22:50 +0100 Subject: [PATCH 2/2] Update readme --- README.md | 14 +++++++++++--- iocsh/{el7042-0052.script => test.script} | 0 2 files changed, 11 insertions(+), 3 deletions(-) rename iocsh/{el7042-0052.script => test.script} (100%) 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/iocsh/el7042-0052.script b/iocsh/test.script similarity index 100% rename from iocsh/el7042-0052.script rename to iocsh/test.script