-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a3eb16
commit d2aefb3
Showing
13 changed files
with
216 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
file "ecmcEL5131-chX.template" | ||
{ | ||
pattern {CH_ID} | ||
{01 } | ||
{02 } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
file "ecmcEL5131-chX.template" | ||
{ | ||
pattern {CH_ID} | ||
{01 } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |