From d2aefb3c5b07367fb40fca024988e72bec596914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Fri, 8 Mar 2024 16:39:40 +0100 Subject: [PATCH] Add el5112 --- .../ecmcELM3602-0002.substitutions | 13 +++++++ db/Beckhoff_3XXX/ecmcELM3602.substitutions | 8 +++++ db/Beckhoff_5XXX/ecmcEL5112_AB.substitutions | 6 ++++ db/Beckhoff_5XXX/ecmcEL5112_ABC.substitutions | 5 +++ .../ecmcEL5112_ABC_DC32.substitutions | 15 ++++++++ .../ecmcEL5112_ABC_DC64.substitutions | 15 ++++++++ db/Beckhoff_5XXX/ecmcEL5131-chX.template | 2 +- db/generic/ecmc_timestamp_32-chX.template | 28 +++++++++++++++ .../Beckhoff_3XXX/EL/ecmcELM3602-XXXX.cmd | 3 ++ hardware/Beckhoff_5XXX/EL/ecmcEL5112_AB.cmd | 31 +++++++++++++++++ hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC.cmd | 23 +++++++++++++ .../Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC32.cmd | 34 +++++++++++++++++++ .../Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC64.cmd | 34 +++++++++++++++++++ 13 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 db/Beckhoff_5XXX/ecmcEL5112_AB.substitutions create mode 100644 db/Beckhoff_5XXX/ecmcEL5112_ABC.substitutions create mode 100644 db/Beckhoff_5XXX/ecmcEL5112_ABC_DC32.substitutions create mode 100644 db/Beckhoff_5XXX/ecmcEL5112_ABC_DC64.substitutions create mode 100644 db/generic/ecmc_timestamp_32-chX.template create mode 100644 hardware/Beckhoff_5XXX/EL/ecmcEL5112_AB.cmd create mode 100644 hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC.cmd create mode 100644 hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC32.cmd create mode 100644 hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC64.cmd diff --git a/db/Beckhoff_3XXX/ecmcELM3602-0002.substitutions b/db/Beckhoff_3XXX/ecmcELM3602-0002.substitutions index c761e7e9c..bcfbd0f4e 100644 --- a/db/Beckhoff_3XXX/ecmcELM3602-0002.substitutions +++ b/db/Beckhoff_3XXX/ecmcELM3602-0002.substitutions @@ -18,3 +18,16 @@ file "ecmc_controlWord-chX.template" {01, "AI", "-Ctrl", "control", "AI Control Word"} {02, "AI", "-Ctrl", "control", "AI Control Word"} } + +# timestamp +file "ecmc_timestamp_32-chX.template"{ + pattern {CH_ID, KEY, suffix, sourceName } + {"", "AI01", "-Time_l32", "timestamp01_l32" } + {"", "AI01", "-Time_u32", "timestamp01_u32" } +} + +# timestamp +file "ecmc_timestamp_64-chX.template"{ + pattern {CH_ID, KEY, suffix, sourceName } + {"", "AI01", "-Time", "timestamp01" } +} diff --git a/db/Beckhoff_3XXX/ecmcELM3602.substitutions b/db/Beckhoff_3XXX/ecmcELM3602.substitutions index c761e7e9c..77463c3a7 100644 --- a/db/Beckhoff_3XXX/ecmcELM3602.substitutions +++ b/db/Beckhoff_3XXX/ecmcELM3602.substitutions @@ -18,3 +18,11 @@ file "ecmc_controlWord-chX.template" {01, "AI", "-Ctrl", "control", "AI Control Word"} {02, "AI", "-Ctrl", "control", "AI Control Word"} } + +# timestamp +file "ecmc_timestamp_32-chX.template"{ + pattern {CH_ID, KEY, suffix, sourceName } + {"", "AI01", "-Time", "timestamp01" } + {"", "AI01", "-Time_l32", "timestamp01_l32" } + {"", "AI01", "-Time_u32", "timestamp01_u32" } +} diff --git a/db/Beckhoff_5XXX/ecmcEL5112_AB.substitutions b/db/Beckhoff_5XXX/ecmcEL5112_AB.substitutions new file mode 100644 index 000000000..bf7849581 --- /dev/null +++ b/db/Beckhoff_5XXX/ecmcEL5112_AB.substitutions @@ -0,0 +1,6 @@ +file "ecmcEL5131-chX.template" +{ + pattern {CH_ID} + {01 } + {02 } +} diff --git a/db/Beckhoff_5XXX/ecmcEL5112_ABC.substitutions b/db/Beckhoff_5XXX/ecmcEL5112_ABC.substitutions new file mode 100644 index 000000000..a0fa72df3 --- /dev/null +++ b/db/Beckhoff_5XXX/ecmcEL5112_ABC.substitutions @@ -0,0 +1,5 @@ +file "ecmcEL5131-chX.template" +{ + pattern {CH_ID} + {01 } +} diff --git a/db/Beckhoff_5XXX/ecmcEL5112_ABC_DC32.substitutions b/db/Beckhoff_5XXX/ecmcEL5112_ABC_DC32.substitutions new file mode 100644 index 000000000..c92150291 --- /dev/null +++ b/db/Beckhoff_5XXX/ecmcEL5112_ABC_DC32.substitutions @@ -0,0 +1,15 @@ +file "ecmcEL5131-chX.template" +{ + pattern {CH_ID} + {01 } + +} + +# timestamp +file "ecmc_timestamp_64-chX.template"{ + pattern {CH_ID, KEY, suffix, sourceName } + {"", "Enc01", "-Time", "timestamp01" } + {"", "Enc01", "-TimeIdx", "timestampIndex01" } + {"", "Enc01", "-TimeLtch01", "timestampLatch01" } + {"", "Enc01", "-TimeLtch02", "timestampLatch02" } +} diff --git a/db/Beckhoff_5XXX/ecmcEL5112_ABC_DC64.substitutions b/db/Beckhoff_5XXX/ecmcEL5112_ABC_DC64.substitutions new file mode 100644 index 000000000..c92150291 --- /dev/null +++ b/db/Beckhoff_5XXX/ecmcEL5112_ABC_DC64.substitutions @@ -0,0 +1,15 @@ +file "ecmcEL5131-chX.template" +{ + pattern {CH_ID} + {01 } + +} + +# timestamp +file "ecmc_timestamp_64-chX.template"{ + pattern {CH_ID, KEY, suffix, sourceName } + {"", "Enc01", "-Time", "timestamp01" } + {"", "Enc01", "-TimeIdx", "timestampIndex01" } + {"", "Enc01", "-TimeLtch01", "timestampLatch01" } + {"", "Enc01", "-TimeLtch02", "timestampLatch02" } +} diff --git a/db/Beckhoff_5XXX/ecmcEL5131-chX.template b/db/Beckhoff_5XXX/ecmcEL5131-chX.template index 6f6e8d0c2..86c9a0b36 100644 --- a/db/Beckhoff_5XXX/ecmcEL5131-chX.template +++ b/db/Beckhoff_5XXX/ecmcEL5131-chX.template @@ -160,7 +160,7 @@ record(ai,"${ECMC_P}Enc${CH_ID}-Cmd-RB"){ } record(ao,"${ECMC_P}Enc${CH_ID}-PosCmd"){ - field(DESC, "$(HWTYPE): Enc Counter Value Setpoint") + field(DESC, "$(HWTYPE): Enc Cnt Val Sp") field(PINI, "$(PINI=1)") field(DTYP, "asynInt32") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))T_SMP_MS=$(T_SMP_MS=1000)/TYPE=asynInt32/ec$(MASTER_ID).s$(SLAVE_POS).encoderValue${CH_ID}=") diff --git a/db/generic/ecmc_timestamp_32-chX.template b/db/generic/ecmc_timestamp_32-chX.template new file mode 100644 index 000000000..da21f32b2 --- /dev/null +++ b/db/generic/ecmc_timestamp_32-chX.template @@ -0,0 +1,28 @@ +#- timestamp template +#- MACROS +#- mandatory +#- ECMC_P +#- CH_ID +#- sourceName + +record(ai,"${ECMC_P}${KEY=timestamp}${CH_ID}${suffix=}"){ + field(DESC, "${HWTYPE}: CH${CH_ID}: timestamp [ns]") + field(PINI, 1) + field(DTYP, "asynFloat64") + field(INP, "@asyn(${PORT},${ADDR=0},${TIMEOUT=1})CMD=UINT32TOFLOAT64/T_SMP_MS=${T_SMP_MS=1000}/TYPE=asynFloat64/ec${MASTER_ID}.s${SLAVE_POS}.${sourceName}${CH_ID}?") + field(SCAN, "I/O Intr") + field(TSE, "${TSE=-2}") + field(PREC, "0" ) + field(EGU, "ns" ) + field(FLNK, "${ECMC_P}${KEY=timestamp}${CH_ID}${suffix=}TS.PROC") +} + +record(aSub, "${ECMC_P}${KEY=timestamp}${CH_ID}${suffix=}TS") { + field(DESC, "ECAT timestamp") + field(INAM, "ECATtimestampInit") + field(SNAM, "ECATtimestamp") + field(INPA, "${ECMC_P}${KEY=timestamp}${CH_ID}${suffix=}") + field(FTA, "DOUBLE") + field(NOA, 1) + field(TSE, -2) +} diff --git a/hardware/Beckhoff_3XXX/EL/ecmcELM3602-XXXX.cmd b/hardware/Beckhoff_3XXX/EL/ecmcELM3602-XXXX.cmd index afc7a92c9..3959fa4ea 100644 --- a/hardware/Beckhoff_3XXX/EL/ecmcELM3602-XXXX.cmd +++ b/hardware/Beckhoff_3XXX/EL/ecmcELM3602-XXXX.cmd @@ -100,6 +100,9 @@ ecmcConfigOrDie "Cfg.EcAddMemMapDT(ec$(ECMC_EC_MASTER_ID).s${ECMC_EC_SLAVE_NUM}. ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a10,0x6005,0x1,U32,timestamp${ECMC_CH}_l32)" ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a10,0x6005,0x2,U32,timestamp${ECMC_CH}_u32)" +#- Add an 64 bit dataitem on top of the 64 bits +ecmcConfigOrDie "Cfg.EcAddDataDT(ec${MASTER_ID=${ECMC_EC_MASTER_ID=0}}.s${ECMC_EC_SLAVE_NUM}.timestamp01_l32,0,0,2,U64,timestamp01)" + #- CH 2 epicsEnvSet("ECMC_CH" "02") diff --git a/hardware/Beckhoff_5XXX/EL/ecmcEL5112_AB.cmd b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_AB.cmd new file mode 100644 index 000000000..dc426f439 --- /dev/null +++ b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_AB.cmd @@ -0,0 +1,31 @@ +#-d /** +#-d \brief hardware script for EL5112: 2 channels no dc support +#-d \details EL5112 Incremental encoder interface, one channel ABC or two channel AB +#-d \author Anders Sandstroem +#-d \file +#-d */ + +epicsEnvSet("ECMC_EC_HWTYPE" "EL5112_AB") +epicsEnvSet("ECMC_EC_VENDOR_ID" "0x2") +epicsEnvSet("ECMC_EC_PRODUCT_ID" "0x13f83052") + +#- verify slave, including reset +ecmcFileExist(${ecmccfg_DIR}slaveVerify.cmd,1) +${SCRIPTEXEC} ${ecmccfg_DIR}slaveVerify.cmd "RESET=true" + +#- CH 1 +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1602,0x7000,0x01,U16,encoderControl01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1602,0x7000,0x11,U32,encoderValue01)" + +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a02,0x6000,0x01,U32,encoderStatus01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a02,0x6000,0x11,U32,positionActual01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a02,0x6000,0x12,U32,encoderLatchPostion01)" + +#- CH 2 +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x160A,0x7000,0x01,U16,encoderControl02)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x160A,0x7000,0x11,U32,encoderValue02)" + +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a11,0x6010,0x01,U32,encoderStatus02)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a11,0x6010,0x11,U32,positionActual02)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a11,0x6010,0x12,U32,encoderLatchPostion02)" + diff --git a/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC.cmd b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC.cmd new file mode 100644 index 000000000..d73ee7b8c --- /dev/null +++ b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC.cmd @@ -0,0 +1,23 @@ +#-d /** +#-d \brief hardware script for EL5112: One channel ABC +#-d \details EL5112 Incremental encoder interface, one channel ABC or two channel AB +#-d \author Anders Sandstroem +#-d \file +#-d */ + +epicsEnvSet("ECMC_EC_HWTYPE" "EL5112_ABC") +epicsEnvSet("ECMC_EC_VENDOR_ID" "0x2") +epicsEnvSet("ECMC_EC_PRODUCT_ID" "0x13f83052") + +#- verify slave, including reset +ecmcFileExist(${ecmccfg_DIR}slaveVerify.cmd,1) +${SCRIPTEXEC} ${ecmccfg_DIR}slaveVerify.cmd "RESET=true" + +#- CH 1 +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1600,0x7000,0x01,U16,encoderControl01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1600,0x7000,0x11,U32,encoderValue01)" + +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x01,U32,encoderStatus01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x11,U32,positionActual01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x12,U32,encoderLatchPostion01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x12,U32,encoderLatchPostion02)" diff --git a/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC32.cmd b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC32.cmd new file mode 100644 index 000000000..2b040abc8 --- /dev/null +++ b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC32.cmd @@ -0,0 +1,34 @@ +#-d /** +#-d \brief hardware script for EL5112: Cfg for 1 ch ABC (index pulse possible) +#-d \details EL5112 Incremental encoder interface, one channel ABC or two channel AB +#-d \author Anders Sandstroem +#-d \file +#-d */ + +epicsEnvSet("ECMC_EC_HWTYPE" "EL5112_ABC_DC32") +epicsEnvSet("ECMC_EC_VENDOR_ID" "0x2") +epicsEnvSet("ECMC_EC_PRODUCT_ID" "0x13f83052") + +#- verify slave, including reset +ecmcFileExist(${ecmccfg_DIR}slaveVerify.cmd,1) +${SCRIPTEXEC} ${ecmccfg_DIR}slaveVerify.cmd "RESET=true" + +#- CH 1 +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1600,0x7000,0x01,U16,encoderControl01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1600,0x7000,0x11,U32,encoderValue01)" + +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x01,U32,encoderStatus01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x11,U32,positionActual01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x12,U32,encoderLatchPostion01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x12,U32,encoderLatchPostion02)" + +#- DC clocks (only one channel it seems) +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0e,0x6000,0x16,U32,timestamp01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0e,0x6000,0x1F,U32,timestampIndex01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0e,0x6000,0x20,U32,timestampLatch01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0e,0x6000,0x21,U32,timestampLatch02)" + +#- Configure DC clock +ecmcEpicsEnvSetCalc("ECMC_TEMP_PERIOD_NANO_SECS",1000/${ECMC_EC_SAMPLE_RATE=1000}*1E6) +ecmcConfigOrDie "Cfg.EcSlaveConfigDC(${ECMC_EC_SLAVE_NUM},0x700,${ECMC_TEMP_PERIOD_NANO_SECS},0,0,0)" +epicsEnvUnset(ECMC_TEMP_PERIOD_NANO_SECS) diff --git a/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC64.cmd b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC64.cmd new file mode 100644 index 000000000..890697cdf --- /dev/null +++ b/hardware/Beckhoff_5XXX/EL/ecmcEL5112_ABC_DC64.cmd @@ -0,0 +1,34 @@ +#-d /** +#-d \brief hardware script for EL5112: Cfg for 1 ch ABC (index pulse possible) +#-d \details EL5112 Incremental encoder interface, one channel ABC or two channel AB +#-d \author Anders Sandstroem +#-d \file +#-d */ + +epicsEnvSet("ECMC_EC_HWTYPE" "EL5112_ABC_DC32") +epicsEnvSet("ECMC_EC_VENDOR_ID" "0x2") +epicsEnvSet("ECMC_EC_PRODUCT_ID" "0x13f83052") + +#- verify slave, including reset +ecmcFileExist(${ecmccfg_DIR}slaveVerify.cmd,1) +${SCRIPTEXEC} ${ecmccfg_DIR}slaveVerify.cmd "RESET=true" + +#- CH 1 +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1600,0x7000,0x01,U16,encoderControl01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},1,2,0x1600,0x7000,0x11,U32,encoderValue01)" + +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x01,U32,encoderStatus01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x11,U32,positionActual01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x12,U32,encoderLatchPostion01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a00,0x6000,0x12,U32,encoderLatchPostion02)" + +#- DC clocks (only one channel it seems) +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0d,0x6000,0x16,U64,timestamp01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0d,0x6000,0x1F,U64,timestampIndex01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0d,0x6000,0x20,U64,timestampLatch01)" +ecmcConfigOrDie "Cfg.EcAddEntryDT(${ECMC_EC_SLAVE_NUM},${ECMC_EC_VENDOR_ID},${ECMC_EC_PRODUCT_ID},2,3,0x1a0d,0x6000,0x21,U64,timestampLatch02)" + +#- Configure DC clock +ecmcEpicsEnvSetCalc("ECMC_TEMP_PERIOD_NANO_SECS",1000/${ECMC_EC_SAMPLE_RATE=1000}*1E6) +ecmcConfigOrDie "Cfg.EcSlaveConfigDC(${ECMC_EC_SLAVE_NUM},0x700,${ECMC_TEMP_PERIOD_NANO_SECS},0,0,0)" +epicsEnvUnset(ECMC_TEMP_PERIOD_NANO_SECS)