36 lines
1.9 KiB
Plaintext
36 lines
1.9 KiB
Plaintext
#- #############################################################################
|
|
#- Example config for iPOS4808
|
|
|
|
require ecmccfg "ENG_MODE=1"
|
|
require ecmccomp sandst_a
|
|
|
|
#- #############################################################################
|
|
#- Configure hardware
|
|
|
|
epicsEnvSet("ECMC_EC_SLAVE_NUM", "5")
|
|
epicsEnvSet("ECMC_EC_SLAVE_NUM_DRIVE", "$(ECMC_EC_SLAVE_NUM)")
|
|
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ECMC_EC_SLAVE_NUM), HW_DESC=iPOS4808BX_2"
|
|
|
|
#- NOTE USE HW_DESC = iPOS4808BX_2 (iPOS4808BX is for legacy)
|
|
|
|
#- Apply component: Oriental motor PKE244A
|
|
#- For IPOS4808 some macros are mandatory:
|
|
#- * I_CTRL_GAIN : Current loop gain
|
|
#- * I_CTRL_INT : Current loop integrator gain
|
|
#- * I_MAX_MA : Mandatory if Motor-Generic-2Phase-Stepper is used
|
|
#- * I_STDBY_MA : Mandatory if Motor-Generic-2Phase-Stepper is used
|
|
#- The values can be taken from EasyMotionStudio or by trial and error (BTW, coil resistance and inductance are not used in the iPOS cfgs)
|
|
#- After running a tuning test in EasyMotionStudio, a reset is needed (from easymotion studio or over SDO (see motor cfg scripts).)
|
|
${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper, MACROS='I_MAX_MA=1000,I_STDBY_MA=200,CURR_KP=1.0,CURR_TI=0.26'"
|
|
|
|
#- #############################################################################
|
|
#- AXIS 1
|
|
#- The reduced current will be applied automatically by the iPOS4808 (no links needed in axis cfgs)
|
|
#- $(SCRIPTEXEC) ($(ecmccfg_DIR)configureAxis.cmd, CONFIG=./cfg/ipos4808_1.ax)
|
|
${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=./cfg/axis.yaml, DEV=${IOC}, AX_NAME=M1, AXIS_ID=1, DRV_SID=${ECMC_EC_SLAVE_NUM}"
|
|
|
|
#- ###########################################################################
|
|
#- go active
|
|
${SCRIPTEXEC} ${ecmccfg_DIR}applyConfig.cmd
|
|
${SCRIPTEXEC} ${ecmccfg_DIR}setAppMode.cmd
|