diff --git a/ECMC/ED7062_CSV/cfg/axis.yaml b/ECMC/ED7062_CSV/cfg/axis.yaml index 9834a17..13b7192 100644 --- a/ECMC/ED7062_CSV/cfg/axis.yaml +++ b/ECMC/ED7062_CSV/cfg/axis.yaml @@ -30,11 +30,7 @@ drive: setpoint: ec0.s$(DRV_SID).velocitySetpoint01 # ED7062 CSV velocity setpoint control: ec0.s$(DRV_SID).driveControl01 # Control word EtherCAT entry status: ec0.s$(DRV_SID).driveStatus01 # Status word EtherCAT entry - warning: 2 # Warning bit in status word (if no drive warning bit then leave empty) - error: # max 3 error bits in status word - - 3 # Error 0 (if no drive error bit then leave empty) - - 7 # Error 1 (if no drive error bit then leave empty) - - 14 # Error 2 (if no drive error bit then leave empty) + encoder: # Primary encoder configuration primary: true # Use this encoder as the primary feedback encoder @@ -57,18 +53,18 @@ encoder: # Primary encoder c enable: true # Enable encoder delay compensation controller: # Centralized ecmc position controller driving CSV velocity - Kp: 14 # Proportional gain - Ki: 1.6 # Integral gain - Kd: 0.5 # Derivative gain + Kp: 4 # Proportional gain + Ki: 0.4 # Integral gain + Kd: 0 # Derivative gain Kff: 1 trajectory: # Trajectory-generator configuration - type: 0 # Velocity profile: 0=trapezoidal; 1=S-curve (Ruckig) + type: 1 # Velocity profile: 0=trapezoidal; 1=S-curve (Ruckig) source: 0 # Position source: 0=axis trajectory generator; 1=PLC axis: # Normal-motion initialization values - velocity: 3 # Default axis velocity [mm/s] - acceleration: 2 # Default axis acceleration [mm/s^2] - deceleration: 2 # Default axis deceleration [mm/s^2] + velocity: 5 # Default axis velocity [mm/s] + acceleration: 3 # Default axis acceleration [mm/s^2] + deceleration: 3 # Default axis deceleration [mm/s^2] emergencyDeceleration: 10 # Emergency deceleration [mm/s^2] jerk: 10 # S-curve jerk [mm/s^3] jog: # Jog-motion initialization values @@ -91,7 +87,7 @@ softlimits: # ecmc software tra monitoring: # Axis following-error, velocity, and in-position monitoring lag: # Position-lag/following-error monitoring enable: true # Enable position-lag monitoring - tolerance: 0.5 # Maximum permitted position lag [mm] + tolerance: 0.05 # Maximum permitted position lag [mm] time: 10 # Allowed time outside lag tolerance [EtherCAT cycles] velocity: # Axis velocity monitoring enable: true # Enable velocity monitoring diff --git a/ECMC/ED7062_CSV/cfg/enc_open_loop.yaml b/ECMC/ED7062_CSV/cfg/enc_open_loop.yaml index 39b6a33..d2d17e5 100644 --- a/ECMC/ED7062_CSV/cfg/enc_open_loop.yaml +++ b/ECMC/ED7062_CSV/cfg/enc_open_loop.yaml @@ -2,8 +2,8 @@ encoder: # ED7062 open-loop desc: 'Open loop' # Encoder description primary: false # Do not use this encoder as primary position feedback unit: mm # Encoder engineering unit - numerator: 1 # Encoder scaling numerator: stage travel per motor revolution [mm/rev] - denominator: 1048576 # Encoder scaling denominator: ED7062 counts per revolution + numerator: 500 #1 # Encoder scaling numerator: stage travel per motor revolution [mm/rev] + denominator: 2147483648 #1048576 # Encoder scaling denominator: ED7062 counts per revolution type: 0 # Encoder type: 0=incremental; 1=absolute bits: 32 # Total raw encoder counter width [bits] absBits: 0 # Absolute-data width [bits]; zero for an incremental encoder diff --git a/ECMC/ED7062_CSV/startup.cmd b/ECMC/ED7062_CSV/startup.cmd index 8933748..2b42fa9 100644 --- a/ECMC/ED7062_CSV/startup.cmd +++ b/ECMC/ED7062_CSV/startup.cmd @@ -45,9 +45,7 @@ epicsEnvSet(BO_SID,${ECMC_EC_SLAVE_NUM}) # ED7062 two-channel stepper drive in CSV mode (EtherCAT slave position 10) ${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=10,HW_DESC=ED7062" ${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,CH_ID=1,MACROS='I_MAX_MA=800,I_STDBY_MA=500,U_NOM_MV=48000,L_COIL_UH=3080,R_COIL_MOHM=7500,STEPS=400'" -${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Drive-Generic-Ctrl-Params,CH_ID=1,MACROS='L_COIL_UH=3080,R_COIL_MOHM=2471,I_TI=12,I_KP=58,V_TI=150,V_KP=176,P_KP=10'" -#${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,CH_ID=2,MACROS='I_MAX_MA=800,I_STDBY_MA=500,U_NOM_MV=48000,L_COIL_UH=3080,R_COIL_MOHM=7500,STEPS=400'" -#${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Drive-Generic-Ctrl-Params,CH_ID=2,MACROS='L_COIL_UH=3080,R_COIL_MOHM=2471,I_TI=12,I_KP=58,V_TI=150,V_KP=176,P_KP=10'" +${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Drive-Generic-Ctrl-Params,CH_ID=1,MACROS='L_COIL_UH=45530,R_COIL_MOHM=15894,I_TI=29,I_KP=654,V_TI=150,V_KP=176,P_KP=10'" #- Must tell ecmc that channel is not used ${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Generic-Ch-Not-Used, CH_ID=2" epicsEnvSet(DRV_SID,${ECMC_EC_SLAVE_NUM})