diff --git a/examples/PSI/best_practice/motion/stepper_bissc/startup_local_hw.cmd b/examples/PSI/best_practice/motion/stepper_bissc/startup_local_hw.cmd
index 523568dbf..60aeeb6b2 100644
--- a/examples/PSI/best_practice/motion/stepper_bissc/startup_local_hw.cmd
+++ b/examples/PSI/best_practice/motion/stepper_bissc/startup_local_hw.cmd
@@ -3,12 +3,12 @@
require ecmccfg "ENG_MODE=1,MASTER_ID=1"
-# 0:7 - EL7041 1Ch Stepper
+# EL7041 1Ch Stepper
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=14,HW_DESC=EL7041-0052"
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper, MACROS='I_MAX_MA=1500, I_STDBY_MA=1000, U_NOM_MV=48000, R_COIL_MOHM=1230'"
epicsEnvSet(DRV_SID,${ECMC_EC_SLAVE_NUM})
-# 0:2 - EL5042 2Ch BiSS-C Encoder, RLS-LA11
+# EL5042 2Ch BiSS-C Encoder, RLS-LA11
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=9,HW_DESC=EL5042"
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BISS-C,CH_ID=1"
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BISS-C,CH_ID=2"
diff --git a/hardware/Beckhoff_7XXX/ecmcEX72XX_CSV.cmd b/hardware/Beckhoff_7XXX/ecmcEX72XX_CSV.cmd
index 503583759..f7071cb9e 100644
--- a/hardware/Beckhoff_7XXX/ecmcEX72XX_CSV.cmd
+++ b/hardware/Beckhoff_7XXX/ecmcEX72XX_CSV.cmd
@@ -12,35 +12,6 @@ ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${EC
#- Conclusion: Need to contact Beckhoff. Probably firmware bug.
ecmcConfigOrDie "Cfg.EcSetDelayECOkAtStartup(${ECMC_EC_STARTUP_DELAY=4000})"
-# ethercat -p22 pdos
-# SM0: PhysAddr 0x1000, DefaultSize 256, ControlRegister 0x26, Enable 1
-# SM1: PhysAddr 0x1100, DefaultSize 256, ControlRegister 0x22, Enable 1
-
-# SM2: PhysAddr 0x1200, DefaultSize 12, ControlRegister 0x24, Enable 1
-# RxPDO 0x1610 "DRV RxPDO-Map Controlword Ch.1"
-# PDO entry 0x7010:01, 16 bit, "Controlword"
-# RxPDO 0x1611 "DRV RxPDO-Map Target position Ch.1"
-# PDO entry 0x7010:05, 32 bit, "Target position"
-# RxPDO 0x1650 "DRV RxPDO-Map Controlword Ch.2"
-# PDO entry 0x7110:01, 16 bit, "Controlword"
-# RxPDO 0x1651 "DRV RxPDO-Map Target position Ch.2"
-# PDO entry 0x7110:05, 32 bit, "Target position"
-
-# SM3: PhysAddr 0x1600, DefaultSize 20, ControlRegister 0x20, Enable 1
-# TxPDO 0x1a00 "FB TxPDO-Map Position Ch.1"
-# PDO entry 0x6000:11, 32 bit, "Position"
-# TxPDO 0x1a10 "DRV TxPDO-Map Statusword Ch.1"
-# PDO entry 0x6010:01, 16 bit, "Statusword"
-# TxPDO 0x1a11 "DRV TxPDO-Map Following error actual value Ch.1"
-# PDO entry 0x6010:06, 32 bit, "Following error actual value"
-
-# TxPDO 0x1a40 "FB TxPDO-Map Position Ch.2"
-# PDO entry 0x6100:11, 32 bit, "Position"
-# TxPDO 0x1a50 "DRV TxPDO-Map Statusword Ch.2"
-# PDO entry 0x6110:01, 16 bit, "Statusword"
-# TxPDO 0x1a51 "DRV TxPDO-Map Following error actual value Ch.2"
-# PDO entry 0x6110:06, 32 bit, "Following error actual value"
-
#- Default panel
epicsEnvSet("ECMC_HW_PANEL" "Ex72x1")
diff --git a/hugo/content/manual/introduction.md b/hugo/content/manual/introduction.md
index 438394edb..c1a71eed8 100644
--- a/hugo/content/manual/introduction.md
+++ b/hugo/content/manual/introduction.md
@@ -19,14 +19,12 @@ Blindly restarting the IOC, with only partially working EtherCAT hardware, will
The startup script has several steps:
1. `require` [ecmccfg](#require-ecmccfg)
-1. [configure](#slave-configuration) the slaves on the EtherCAT bus
+2. [configure](#slave-configuration) the slaves on the EtherCAT bus
- additional configuration
- adding a physical motor axis
- adding a virtual motor axis
- adding synchronization
- loading a PLC from file
-1. [apply](#apply-the-configuration) the configuration
-1. [go active](#go-active)
#### require ecmccfg
```bash
@@ -70,7 +68,7 @@ This behaviour can be modified by arguments.
```bash
# slave 8 {EL7037}, configure slave using applyComponent.cmd from ecmccomp module with optional SLAVE_ID.
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7037, SLAVE_ID=8"
- ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper, MACROS='I_MAX_MA=1000, I_STDBY_MA=500, U_NOM_MV=48000, R_COIL_MOHM=1230'"
+ ${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper, MACROS='I_MAX_MA=1000, I_STDBY_MA=500, U_NOM_MV=48000, R_COIL_MOHM=1230'"
# slave 9 {EL7037}, addSlave, with immediate call off applySlaveConfig
# slave with global configuration
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7037"
@@ -81,11 +79,6 @@ This behaviour can be modified by arguments.
${SCRIPTEXEC} ${ecmccfg_DIR}applySlaveConfig.cmd, "LOCAL_CONFIG=${CFG_ROOT}AM8211_AGIR.cfg"
```
-#### apply the configuration
-The configured process image is applied to the master
- ```bash
- ${SCRIPTEXEC} ${ecmccfg_DIR}applyConfig.cmd
- ```
##### additional configuration
Optionally, manual modifications can be made to the default configuration.
@@ -150,8 +143,3 @@ ECMC PLCs can be loaded from classical PLC files, from pure yaml files or from a
{{% notice tip %}}
See [plc cfg](../plc_cfg/best_practice/) for more information.
{{% /notice %}}
-
-#### go active
- ```bash
- ${SCRIPTEXEC} ${ecmccfg_DIR}setAppMode.cmd
- ```
diff --git a/qt/ecmcAxisExpert_v2.ui b/qt/ecmcAxisExpert_v2.ui
index c7fa5e34f..106e0399c 100644
--- a/qt/ecmcAxisExpert_v2.ui
+++ b/qt/ecmcAxisExpert_v2.ui
@@ -3362,7 +3362,7 @@
- ENC_ID=05,SYS=$(SYS),Axis=$(Axis),IOC=$(IOC)
+ ENC_ID=04,SYS=$(SYS),Axis=$(Axis),IOC=$(IOC)
caFrame::Calc
@@ -4016,9 +4016,9 @@
10
- 80
+ 90
336
- 156
+ 151
@@ -4308,7 +4308,7 @@
- Mon limit home:
+ Mon home:
@@ -4397,7 +4397,7 @@
10
10
215
- 65
+ 76
@@ -4425,7 +4425,7 @@
90
- 20
+ 25
100
18
@@ -4447,7 +4447,7 @@
5
- 20
+ 25
80
18
@@ -4460,7 +4460,7 @@
5
- 40
+ 47
80
18
@@ -4473,7 +4473,7 @@
195
- 10
+ 25
18
18
@@ -4492,7 +4492,7 @@
91
- 41
+ 48
65
18
@@ -4505,7 +4505,7 @@
158
- 43
+ 50
32
18
diff --git a/release.md b/release.md
index 9ea5358f3..64c25cf3f 100644
--- a/release.md
+++ b/release.md
@@ -1,3 +1,7 @@
+# 9.6.6
+* Add wrapper to ecmccomp/applyComponent.cmd (automatically requires ecmccomp)
+* Cleanup in PSI best practices.
+
# 9.6.5
* Unset PLC_MACROS after loadPLCFile.cmd and loadPLCLib.cmd
* Minor updates to manual
diff --git a/scripts/applyComponent.cmd b/scripts/applyComponent.cmd
new file mode 100644
index 000000000..6ee5c3fab
--- /dev/null
+++ b/scripts/applyComponent.cmd
@@ -0,0 +1,27 @@
+#===============================================================================
+# applyComponent.cmd (ecmccfg, warpper to ecmccomp/applyComponent.cmd)
+#- Arguments: n/a
+#-d /**
+#-d \brief Warpper for ecmccomp/applyComponent.cmd.
+#-d \details Checks if ecmccomp is loaded, if not loads, then calls ecmccomp/applyComponent.cmd.
+#-d Using this wrapper will ensure that ecmccomp is loaded and therefore minimizes the risks of missing hw config.
+#-d NOTE: Only for use if the ecmccomp modeule is accessible (at PSI)
+#-d \author Anders Sandström
+#-d \file
+#-d \param COMP Component name
+#-d \param EC_COMP_TYPE (optional) Hardware descriptor, i.e. EL7037, defaults to ECMC_EC_COMP_TYPE or ECMC_EC_HWTYPE set in ecmccfg/addSlave.cmd
+#-d \param COMP_S_ID (optional) Slave bus position, defaults to ECMC_EC_SLAVE_NUM set in ecmccfg/addSlave.cmd
+#-d \param CH_ID (optional) Channel of slave default to 1
+#-d \param MACROS (optional) Special macros, depending on component/slave type:
+#-d */
+
+#- Check if ecmccomp is loaded otherwise require it
+ecmcEpicsEnvSetCalcTernary(EXE,"'${ecmccomp_DIR=NAN}'=='NAN'","", "#-")
+${EXE}require ecmccomp ${ECMCCOMP_VER=''}
+#- Check again, now it should be there
+${EXE}ecmcEpicsEnvSetCalcTernary(EXE,"'${ecmccomp_DIR=NAN}'=='NAN'","", "#-")
+${EXE}ecmcExit Error: ecmccomp module not loaded and not found
+epicsEnvUnset(EXE)
+
+ecmcFileExist(${ecmccomp_DIR}applyComponent.cmd,1,1)
+${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=${COMP}, EC_COMP_TYPE=${EC_COMP_TYPE=${ECMC_EC_COMP_TYPE=${ECMC_EC_HWTYPE=NAN}}}, COMP_S_ID=${COMP_S_ID=${ECMC_EC_SLAVE_NUM=0}}, CH_ID=${CH_ID=1}, MACROS='${MACROS=}'"
diff --git a/startup.cmd b/startup.cmd
index 3abe640a2..65cf29968 100644
--- a/startup.cmd
+++ b/startup.cmd
@@ -15,7 +15,7 @@
#- SYS
#-
#- [optional]
-#- ECMC_VER = 9.6.3
+#- ECMC_VER = 9.6.6
#- EthercatMC_VER = 3.0.2 (obsolete)
#- INIT = initAll
#- MASTER_ID = 0 <-- put negatuve number to disable master, aka non ec-mode
@@ -54,7 +54,7 @@ on error halt
#-
#-------------------------------------------------------------------------------
#- load required modules
-epicsEnvSet(ECMC_VER,${ECMC_VER=9.6.3})
+epicsEnvSet(ECMC_VER,${ECMC_VER=9.6.6})
require ecmc "${ECMC_VER}"
#- Require EthercatMC if used.