Skip to content

Commit

Permalink
Update EL5042 example
Browse files Browse the repository at this point in the history
  • Loading branch information
anderssandstrom committed Sep 25, 2024
1 parent a0181f8 commit e0d458e
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions examples/test/el5042/el5042.script
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
##############################################################################
## Example config for el5042

require ecmccfg sandst_a "ECMC_VER=sandst_a"
require ecmccfg "MASTER_ID=1"
require ecmccomp

##############################################################################
## Config hardware:

epicsEnvSet("ECMC_EC_SLAVE_NUM", "14")
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ECMC_EC_SLAVE_NUM), HW_DESC=EL5042"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=14, HW_DESC=EL5042"

#- Apply encoder config with some custom macros
${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit,CH_ID=1"
${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BISS-C,CH_ID=1,OFF_BITS=0"

#Apply hardware configuration
ecmcConfigOrDie "Cfg.EcApplyConfig(1)"

##############################################################################
############# Configure diagnostics:

ecmcConfigOrDie "Cfg.EcSetDiagnostics(1)"
ecmcConfigOrDie "Cfg.EcEnablePrintouts(0)"
ecmcConfigOrDie "Cfg.EcSetDomainFailedCyclesLimit(100)"
#- If the offset is needed then the sum of the bit's still need to match the bitcount of the encoder. Example: Offset 3 LSB bits, set ST_BITS=23 (26-3)
#- ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-Generic-BISS-C,CH_ID=1,MACROS=MT_BITS=0,ST_BITS=23,CLK_FRQ_KHZ=1000,OFF_BITS=3"

##############################################################################
## Go active:
$(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd)
${SCRIPTEXEC} ${ecmccfg_DIR}applyConfig.cmd
$(SCRIPTEXEC) $(ecmccfg_DIR)setAppMode.cmd

0 comments on commit e0d458e

Please sign in to comment.