From 4d1a1086e99be3cbc6ac19e1a1fabaed0b4b30c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Wed, 3 Apr 2024 15:51:23 +0200 Subject: [PATCH] Cleanup --- cfg/axis.yaml | 202 ----------------- cfg/axis_el7041.yaml | 204 ----------------- cfg/axis_el7041_no_plc_analog_il.yaml | 189 ---------------- cfg/axis_latch.yaml | 205 ------------------ cfg/axis_latch_no_plc.yaml | 189 ---------------- ...el7041_no_plc.yaml => axis_open_loop.yaml} | 2 +- el7031.script | 52 ----- el7031_latch.script | 48 ---- el7031_latch_no_plc.script | 44 ---- el7037.script | 41 ---- el7041-0052.script | 49 ----- el7041-0052_no_plc.script | 55 ----- ...il.script => openloop_stepper_bissc.script | 20 +- plc/plc_cfg.yaml | 9 - plc/test.plc | 9 - 15 files changed, 7 insertions(+), 1311 deletions(-) delete mode 100644 cfg/axis.yaml delete mode 100644 cfg/axis_el7041.yaml delete mode 100644 cfg/axis_el7041_no_plc_analog_il.yaml delete mode 100644 cfg/axis_latch.yaml delete mode 100644 cfg/axis_latch_no_plc.yaml rename cfg/{axis_el7041_no_plc.yaml => axis_open_loop.yaml} (99%) delete mode 100644 el7031.script delete mode 100644 el7031_latch.script delete mode 100644 el7031_latch_no_plc.script delete mode 100644 el7037.script delete mode 100644 el7041-0052.script delete mode 100644 el7041-0052_no_plc.script rename el7041-0052_test_analog_il.script => openloop_stepper_bissc.script (68%) delete mode 100644 plc/plc_cfg.yaml delete mode 100644 plc/test.plc diff --git a/cfg/axis.yaml b/cfg/axis.yaml deleted file mode 100644 index 5078e8b..0000000 --- a/cfg/axis.yaml +++ /dev/null @@ -1,202 +0,0 @@ -axis: - id: 1 # Axis id - type: joint # this is for future selection of axis type - # mode: CSV # supported mode, CSV and CSP, defaults CSV - # parameters: 'axisPar' # Additional params to motor record driver - #healthOutput: ec0... # Ethercat entry for health output - # autoMode: # Switch drive modes automaticaly for normal motion and homing (smaract for instance) - # modeSet: ec0.. # Ethercat entry drive mode write (set CSV,CSP,homing) - # modeAct: ec0.. # Ethercat entry drive mode reading (set CSV,CSP,homing) - # modeCmdMotion: 9 # Drive mode value for normal motion (written to axis.drvMode.modeSet when normal motion) - # modeCmdHome: 10 # Drive mode value for when homing (written to axis.drvMode.modeSet when homing) - # features: - # blockCom: false # Block communication to axis - # allowedFunctions: - # homing: true # Allow homing - # constantVelocity: true # Allow constant velocity - # positioning: true # Allow positioning - -epics: - name: Axis1 # Axis anme - precision: 3 # Decimal count - description: very important motor axis # Axis description - unit: mm # Unit - # motorRecord: - # enable: true - # description: This is MR - # fieldInit: 'RRES=1.0,RTRY=2,RMOD=1,UEIP=0,RDBD=0.1,URIP=1,RDBL=$(IOC):$(ECMC_MOTOR_NAME)-PosActSim' # Extra config for Motor record - -drive: - numerator: 3600 # Fastest speed in engineering units - denominator: 32768 # I/O range for ECMC_EC_ALIAS_DRV_VELO_SET - # type: 0 # Stepper: 0. DS402: 1 (DS402 = servos and advanced stepper drives) - control: ec0.s$(DRV_SLAVE).driveControl01 # Control word ethercat entry - enable: 0 # Enable bit index in control word (not used if DS402) - enabled: 1 # Enabled bit index in status word (not used if DS402) - status: ec0.s$(DRV_SLAVE).driveStatus01 # Status word ethercat entry - setpoint: ec0.s$(DRV_SLAVE).velocitySetpoint01 # Velocity setpoint if CSV. Position setpoint if CSP -# reduceTorque: 2 # Reduce torque bit in drive control word -# reduceTorqueEnable: True # Enable reduce torque functionality -# brake: -# enable: true # Enable brake -# output: ec0... # Ethercat link to brake output -# openDelay: 0 # Brake timing parameter in cycles (default 1kHz) -# closeAhead: 0 # Brake timing parameter in cycles (default 1kHz) -# reset: 1 # Reset (if no drive reset bit then leave empty) -# warning: 2 # Warning (if no drive warning bit then leave empty) -# error: # max 3 -# - 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: - numerator: 360 # Scaling numerator example 360 deg/rev - denominator: 12800 # Scaling denominator example 4096 ticks per 360 degree - # type: 0 # Type: 0=Incremental, 1=Absolute - bits: 16 # Total bit count of encoder raw data - # absBits: 0 # Absolute bit count (for absolute encoders) always least significant part of 'bits' - # absOffset: 0 # Encoder offset in eng units (for absolute encoders) - # mask: '0xFFF00' # Mask applied to raw encoder value - position: ec0.s$(DRV_SLAVE).positionActual01 # Ethercat entry for actual position input (encoder) - control: ec0.s$(DRV_SLAVE).encoderControl01 # mandatory only if 'reset' is used - status: ec0.s$(DRV_SLAVE).encoderStatus01 # mandatory only if 'warning' or 'error' are used - # ready: 10 # Bit in encoder status word for encoder ready - # source: 0 # 0 = Encoder value from etehrcat hardware, 1 = Encoder value from PLC - # reset: 1 # Reset (optional) - # warning: 2 # Warning (optional) - # error: # max 3 (optional) - # - 5 # Error 0 - # - 9 # Error 1 - # - 11 # Error 2 - # filter: - # velocity: - # size: 100 # Filter size for velocity - # enable: true # enable velocity filter - # position: - # size: 100 # Filter size for encoder value - # enable: true # enable encoder value filter - # latch: - # position: '' # Link to latched value. Used for some homing seqs - # control: 0 # Bit in encoder control word to arm latch. Used for some homing seqs - # status: 0 # Bit in encoder status word for latch triggered status. Used for some homing seqs - # primary: 1 # Use this encoder as primary (for control) - # homing: - # type: 3 # Homing sequence type - # position: -30 # Position to reference encoder to - # velocity: - # to: 10 # Velocity to cam/sensor (used for some homing seqs) - # from: 5 # Velocity from cam/sensor (used for some homing seqs) - # acceleration: 20 # Acceleration during homing - # deceleration: 100 # Deceleration during homing - # refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id - # refAtHome: 1 # If homing is executed then set position of this encoder - # tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder - # postMoveEnable: yes # Enable move after successfull homing - # postMovePosition: 10 # Position to move to after successfull homing - # trigg: ec0.. # Ethercat entry for triggering drive internal homing seq (seq id 26) - # ready: ec0.. # Ethercat entry for readinf drive internal homing seq ready (seq id 26) - -controller: - Kp: 1 # Kp proportinal gain - Ki: 0.02 # Ki integral gain - Kd: 0 # Kd derivative gain - # Kff: 1 # Feed forward gain - # deadband: - # tol: 0.01 # Stop control if within this distance from target for the below time - # time: 100 - # limits: - # minOutput: -100 # Minimum controller output - # maxOutput: 100 # Maximum controller output - # minIntegral: -100 # Minimum integral output - # maxIntegral: 100 # Maximum integral output - # inner: - # Kp: 0.1 # Kp for when close to target - # Ki: 0.1 # Ki for when close to target - # Kd: 0.1 # Kd for when close to target - # tol: 0.1 # Distance from target for when inner PID params will be used, defaults to atTarget tol - -trajectory: - # type: 1 # Default 0 = trapetz, 1 = S-curve (ruckig) - axis: - velocity: 100 # Default velo for axis - acceleration: 100 # Default acc for axis - deceleration: 100 # Default dec for axis - # emergencyDeceleration: 0.05 # Deceleration when axis in error state - jerk: 10 # Default jerk for axis - jog: - velocity: 5 # Default velo fro JOG (motor record) -# modulo: -# range: 360 # Modulo range 0..360 -# type: 0 # Modulo type - -input: - limit: - forward: ec0.s$(DRV_SLAVE).ONE.0 # Ethercat entry for low limit switch input - # forwardPolarity: 0 # Polarity of forward limit switch - backward: ec0.s$(DRV_SLAVE).ONE.0 # Ethercat entry for high limit switch input - # backwardPolarity: 0 # Polarity of forward limit switch - home: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for home switch - # homePolarity: 0 # Polarity of home switch - interlock: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for interlock switch input - # interlockPolarity: 0 # Polarity of interlock switch - -# homing: -# type: 3 # Homing sequence type -# position: -30 # Position to reference encoder to -# velocity: -# to: 10 # Velocity to cam/sensor (used for some homing seqs) -# from: 5 # Velocity from cam/sensor (used for some homing seqs) -# acc: 20 # Acceleration during homing -# dec: 100 # Deceleration during homing -# refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id -# refAtHome: 1 # If homing is executed then set position of this encoder -# tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder -# postMoveEnable: yes # Enable move after successfull homing -# postMovePosition: 10 # Position to move to after successfull homing -# timeout: 100 # Sequence timeout - -softlimits: - enable: false # Enable soft limits - forward: 100 # Soft limit position fwd - forwardEnable: false # Soft limit position fwd enable - backward: -100 # Soft limit position bwd - backwardEnable: false # Soft limit position bwd enable - -monitoring: - lag: - enable: true # Enable position lag monitoring (following error) - tolerance: 2 # Allowed tolerance - time: 10 # Allowed time outside tolerance - velocity: - enable: false # Enable velocity monitoring - max: 100 # Allowed max velocity - time: - trajectory: 100 # Time allowed outside max velo before system init halt - drive: 200 # Time allowed outside max velo before system disables drive - target: - enable: true # Enable at target monitoring (needs to be enabled if using motor record) - tolerance: 0.5 # Allowed tolerance - time: 10 # Filter time inside tolerance to be at target - # velocityDifference: - # enable: true # Enable velocity diff monitoring (velo set vs velo act) - # max: 100 # Allowed max difference - # time: - # trajectory: 100 # Time allowed outside max diff velo before system init halt - # drive: 200 # Time allowed outside max diff velo before system disables drive - -plc: - enable: true # Enable axis plc - externalCommands: true # Allow axis to inputs from PLC - file: ${PLC_PATH}test.plc - code: # Sync code - - "if(static.counter % ${LIMIT} == 0){println('AX PLC: Appended');static.counter:=0;};" # calculate set pos for physical axis - - "if(not(static.plc_code_loaded)) {static.counter:=static.counter+1;};" - - ec0.s$(DRV_SLAVE).ONE > 1; # Enable axis if one of master axes is enabled - - ec0.s$(DRV_SLAVE).ZERO > 1; # calculate set pos for physical axis -# velocity_filter: # Filter used to smother velocity feedforward -# encoder: # Filter plc enc velo -# enable: false # Filter enable -# size: 100 # Filter size -# trajectory: # Filter plc traj velo -# enable: false # Filter enable -# size: 100 # Filter size diff --git a/cfg/axis_el7041.yaml b/cfg/axis_el7041.yaml deleted file mode 100644 index b78b869..0000000 --- a/cfg/axis_el7041.yaml +++ /dev/null @@ -1,204 +0,0 @@ -macros: LIMIT=10000,TYPE=0,DRV_SLAVE=${DRV_SLAVE} # Macros for all below (evaluated before jinja linter) - -axis: - id: 1 # Axis id - type: joint # this is for future selection of axis type - # mode: CSV # supported mode, CSV and CSP, defaults CSV - # parameters: 'axisPar' # Additional params to motor record driver - #healthOutput: ec0... # Ethercat entry for health output - # autoMode: # Switch drive modes automaticaly for normal motion and homing (smaract for instance) - # modeSet: ec0.. # Ethercat entry drive mode write (set CSV,CSP,homing) - # modeAct: ec0.. # Ethercat entry drive mode reading (set CSV,CSP,homing) - # modeCmdMotion: 9 # Drive mode value for normal motion (written to axis.drvMode.modeSet when normal motion) - # modeCmdHome: 10 # Drive mode value for when homing (written to axis.drvMode.modeSet when homing) - # features: - # blockCom: false # Block communication to axis - # allowedFunctions: - # homing: true # Allow homing - # constantVelocity: true # Allow constant velocity - # positioning: true # Allow positioning - -epics: - name: Axis1 # Axis anme - precision: 3 # Decimal count - description: very important motor axis # Axis description - unit: mm # Unit - # motorRecord: - # enable: true - # description: This is MR - # fieldInit: 'RRES=1.0,RTRY=2,RMOD=1,UEIP=0,RDBD=0.1,URIP=1,RDBL=$(IOC):$(ECMC_MOTOR_NAME)-PosActSim' # Extra config for Motor record - -drive: - numerator: 3600 # Fastest speed in engineering units - denominator: 32768 # I/O range for ECMC_EC_ALIAS_DRV_VELO_SET - # type: 0 # Stepper: 0. DS402: 1 (DS402 = servos and advanced stepper drives) - control: ec0.s$(DRV_SLAVE).driveControl01 # Control word ethercat entry - enable: 0 # Enable bit index in control word (not used if DS402) - enabled: 1 # Enabled bit index in status word (not used if DS402) - status: ec0.s$(DRV_SLAVE).driveStatus01 # Status word ethercat entry - setpoint: ec0.s$(DRV_SLAVE).velocitySetpoint01 # Velocity setpoint if CSV. Position setpoint if CSP -# reduceTorque: 2 # Reduce torque bit in drive control word -# reduceTorqueEnable: True # Enable reduce torque functionality -# brake: -# enable: true # Enable brake -# output: ec0... # Ethercat link to brake output -# openDelay: 0 # Brake timing parameter in cycles (default 1kHz) -# closeAhead: 0 # Brake timing parameter in cycles (default 1kHz) -# reset: 1 # Reset (if no drive reset bit then leave empty) -# warning: 2 # Warning (if no drive warning bit then leave empty) -# error: # max 3 -# - 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: - numerator: 360 # Scaling numerator example 360 deg/rev - denominator: 12800 # Scaling denominator example 4096 ticks per 360 degree - # type: 0 # Type: 0=Incremental, 1=Absolute - bits: 16 # Total bit count of encoder raw data - # absBits: 0 # Absolute bit count (for absolute encoders) always least significant part of 'bits' - # absOffset: 0 # Encoder offset in eng units (for absolute encoders) - # mask: '0xFFF00' # Mask applied to raw encoder value - position: ec0.s$(DRV_SLAVE).positionActual01 # Ethercat entry for actual position input (encoder) - control: ec0.s$(DRV_SLAVE).encoderControl01 # mandatory only if 'reset' is used - status: ec0.s$(DRV_SLAVE).encoderStatus01 # mandatory only if 'warning' or 'error' are used - # ready: 10 # Bit in encoder status word for encoder ready - # source: 0 # 0 = Encoder value from etehrcat hardware, 1 = Encoder value from PLC - # reset: 1 # Reset (optional) - # warning: 2 # Warning (optional) - # error: # max 3 (optional) - # - 5 # Error 0 - # - 9 # Error 1 - # - 11 # Error 2 - # filter: - # velocity: - # size: 100 # Filter size for velocity - # enable: true # enable velocity filter - # position: - # size: 100 # Filter size for encoder value - # enable: true # enable encoder value filter - # latch: - # position: '' # Link to latched value. Used for some homing seqs - # control: 0 # Bit in encoder control word to arm latch. Used for some homing seqs - # status: 0 # Bit in encoder status word for latch triggered status. Used for some homing seqs - # primary: 1 # Use this encoder as primary (for control) - # homing: - # type: 3 # Homing sequence type - # position: -30 # Position to reference encoder to - # velocity: - # to: 10 # Velocity to cam/sensor (used for some homing seqs) - # from: 5 # Velocity from cam/sensor (used for some homing seqs) - # acceleration: 20 # Acceleration during homing - # deceleration: 100 # Deceleration during homing - # refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id - # refAtHome: 1 # If homing is executed then set position of this encoder - # tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder - # postMoveEnable: yes # Enable move after successfull homing - # postMovePosition: 10 # Position to move to after successfull homing - # trigg: ec0.. # Ethercat entry for triggering drive internal homing seq (seq id 26) - # ready: ec0.. # Ethercat entry for readinf drive internal homing seq ready (seq id 26) - -controller: - Kp: 10 # Kp proportinal gain - Ki: 0.2 # Ki integral gain - Kd: 0 # Kd derivative gain - # Kff: 1 # Feed forward gain - # deadband: - # tol: 0.01 # Stop control if within this distance from target for the below time - # time: 100 - # limits: - # minOutput: -100 # Minimum controller output - # maxOutput: 100 # Maximum controller output - # minIntegral: -100 # Minimum integral output - # maxIntegral: 100 # Maximum integral output - # inner: - # Kp: 0.1 # Kp for when close to target - # Ki: 0.1 # Ki for when close to target - # Kd: 0.1 # Kd for when close to target - # tol: 0.1 # Distance from target for when inner PID params will be used, defaults to atTarget tol - -trajectory: - # type: 1 # Default 0 = trapetz, 1 = S-curve (ruckig) - axis: - velocity: 500 # Default velo for axis - acceleration: 2000 # Default acc for axis - deceleration: 2000 # Default dec for axis - # emergencyDeceleration: 0.05 # Deceleration when axis in error state - jerk: 10 # Default jerk for axis - jog: - velocity: 5 # Default velo fro JOG (motor record) -# modulo: -# range: 360 # Modulo range 0..360 -# type: 0 # Modulo type - -input: - limit: - forward: ec0.s$(DRV_SLAVE).driveStatus01.12 # Ethercat entry for low limit switch input - # forwardPolarity: 0 # Polarity of forward limit switch - backward: ec0.s$(DRV_SLAVE).driveStatus01.11 # Ethercat entry for high limit switch input - # backwardPolarity: 0 # Polarity of forward limit switch - home: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for home switch - # homePolarity: 0 # Polarity of home switch - interlock: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for interlock switch input - # interlockPolarity: 0 # Polarity of interlock switch - -# homing: -# type: 3 # Homing sequence type -# position: -30 # Position to reference encoder to -# velocity: -# to: 10 # Velocity to cam/sensor (used for some homing seqs) -# from: 5 # Velocity from cam/sensor (used for some homing seqs) -# acc: 20 # Acceleration during homing -# dec: 100 # Deceleration during homing -# refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id -# refAtHome: 1 # If homing is executed then set position of this encoder -# tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder -# postMoveEnable: yes # Enable move after successfull homing -# postMovePosition: 10 # Position to move to after successfull homing -# timeout: 100 # Sequence timeout - -softlimits: - enable: false # Enable soft limits - forward: 100 # Soft limit position fwd - forwardEnable: false # Soft limit position fwd enable - backward: -100 # Soft limit position bwd - backwardEnable: false # Soft limit position bwd enable - -monitoring: - lag: - enable: true # Enable position lag monitoring (following error) - tolerance: 2 # Allowed tolerance - time: 10 # Allowed time outside tolerance target: - velocity: - enable: false # Enable velocity monitoring - max: 100 # Allowed max velocity - time: - trajectory: 100 # Time allowed outside max velo before system init halt - drive: 200 # Time allowed outside max velo before system disables drive - target: - enable: true # Enable at target monitoring (needs to be enabled if using motor record) - tolerance: 0.5 # Allowed tolerance - time: 10 # Filter time inside tolerance to be at target - # velocityDifference: - # enable: true # Enable velocity diff monitoring (velo set vs velo act) - # max: 100 # Allowed max difference - # time: - # trajectory: 100 # Time allowed outside max diff velo before system init halt - # drive: 200 # Time allowed outside max diff velo before system disables drive - -plc: - enable: true # Enable axis plc - externalCommands: true # Allow axis to inputs from PLC - file: ${PLC_PATH}test.plc - code: # Sync code - - "if(static.counter % ${LIMIT} == 0){println('AX PLC: Appended');static.counter:=0;};" # calculate set pos for physical axis - - "if(not(static.plc_code_loaded)) {static.counter:=static.counter+1;};" - - ec0.s$(DRV_SLAVE).ONE > 1; # Enable axis if one of master axes is enabled - - ec0.s$(DRV_SLAVE).ZERO > 1; # calculate set pos for physical axis -# velocity_filter: # Filter used to smother velocity feedforward -# encoder: # Filter plc enc velo -# enable: false # Filter enable -# size: 100 # Filter size -# trajectory: # Filter plc traj velo -# enable: false # Filter enable -# size: 100 # Filter size diff --git a/cfg/axis_el7041_no_plc_analog_il.yaml b/cfg/axis_el7041_no_plc_analog_il.yaml deleted file mode 100644 index 0bbec03..0000000 --- a/cfg/axis_el7041_no_plc_analog_il.yaml +++ /dev/null @@ -1,189 +0,0 @@ -axis: - id: 1 # Axis id - type: joint # this is for future selection of axis type - # mode: CSV # supported mode, CSV and CSP, defaults CSV - # parameters: 'axisPar' # Additional params to motor record driver - #healthOutput: ec0... # Ethercat entry for health output - # autoMode: # Switch drive modes automaticaly for normal motion and homing (smaract for instance) - # modeSet: ec0.. # Ethercat entry drive mode write (set CSV,CSP,homing) - # modeAct: ec0.. # Ethercat entry drive mode reading (set CSV,CSP,homing) - # modeCmdMotion: 9 # Drive mode value for normal motion (written to axis.drvMode.modeSet when normal motion) - # modeCmdHome: 10 # Drive mode value for when homing (written to axis.drvMode.modeSet when homing) - # features: - # blockCom: false # Block communication to axis - # allowedFunctions: - # homing: true # Allow homing - # constantVelocity: true # Allow constant velocity - # positioning: true # Allow positioning - -epics: - name: Axis1 # Axis anme - precision: 3 # Decimal count - description: very important motor axis # Axis description - unit: mm # Unit - # motorRecord: - # enable: true - # description: This is MR - # fieldInit: 'RRES=1.0,RTRY=2,RMOD=1,UEIP=0,RDBD=0.1,URIP=1,RDBL=$(IOC):$(ECMC_MOTOR_NAME)-PosActSim' # Extra config for Motor record - -drive: - numerator: 10 # Fastest speed in engineering units - denominator: 32768 # I/O range for ECMC_EC_ALIAS_DRV_VELO_SET - # type: 0 # Stepper: 0. DS402: 1 (DS402 = servos and advanced stepper drives) - control: ec0.s$(DRV_SLAVE).driveControl01 # Control word ethercat entry - enable: 0 # Enable bit index in control word (not used if DS402) - enabled: 1 # Enabled bit index in status word (not used if DS402) - status: ec0.s$(DRV_SLAVE).driveStatus01 # Status word ethercat entry - setpoint: ec0.s$(DRV_SLAVE).velocitySetpoint01 # Velocity setpoint if CSV. Position setpoint if CSP -# reduceTorque: 2 # Reduce torque bit in drive control word -# reduceTorqueEnable: True # Enable reduce torque functionality -# brake: -# enable: true # Enable brake -# output: ec0... # Ethercat link to brake output -# openDelay: 0 # Brake timing parameter in cycles (default 1kHz) -# closeAhead: 0 # Brake timing parameter in cycles (default 1kHz) -# reset: 1 # Reset (if no drive reset bit then leave empty) -# warning: 2 # Warning (if no drive warning bit then leave empty) -# error: # max 3 -# - 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: - numerator: 1 # Scaling numerator example 360 deg/rev - denominator: 12800 # Scaling denominator example 4096 ticks per 360 degree - type: 0 # Type: 0=Incremental, 1=Absolute - bits: 16 # Total bit count of encoder raw data - #absBits: 0 # Absolute bit count (for absolute encoders) always least significant part of 'bits' - # absOffset: 0 # Encoder offset in eng units (for absolute encoders) - # mask: '0xFFF00' # Mask applied to raw encoder value - position: ec0.s$(DRV_SLAVE).positionActual01 # Ethercat entry for actual position input (encoder) - control: ec0.s$(DRV_SLAVE).encoderControl01 # mandatory only if 'reset' is used - status: ec0.s$(DRV_SLAVE).encoderStatus01 # mandatory only if 'warning' or 'error' are used - # ready: 10 # Bit in encoder status word for encoder ready - # source: 0 # 0 = Encoder value from etehrcat hardware, 1 = Encoder value from PLC - # reset: 1 # Reset (optional) - # warning: 2 # Warning (optional) - # error: # max 3 (optional) - # - 5 # Error 0 - # - 9 # Error 1 - # - 11 # Error 2 - # filter: - # velocity: - # size: 100 # Filter size for velocity - # enable: true # enable velocity filter - # position: - # size: 100 # Filter size for encoder value - # enable: true # enable encoder value filter - # latch: - # position: '' # Link to latched value. Used for some homing seqs - # control: 0 # Bit in encoder control word to arm latch. Used for some homing seqs - # status: 0 # Bit in encoder status word for latch triggered status. Used for some homing seqs - # primary: 1 # Use this encoder as primary (for control) - # homing: - # type: 3 # Homing sequence type - # position: -30 # Position to reference encoder to - # velocity: - # to: 10 # Velocity to cam/sensor (used for some homing seqs) - # from: 5 # Velocity from cam/sensor (used for some homing seqs) - # acceleration: 20 # Acceleration during homing - # deceleration: 100 # Deceleration during homing - # refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id - # refAtHome: 1 # If homing is executed then set position of this encoder - # tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder - # postMoveEnable: yes # Enable move after successfull homing - # postMovePosition: 10 # Position to move to after successfull homing - # trigg: ec0.. # Ethercat entry for triggering drive internal homing seq (seq id 26) - # ready: ec0.. # Ethercat entry for readinf drive internal homing seq ready (seq id 26) - -controller: - Kp: 10 # Kp proportinal gain - Ki: 0.2 # Ki integral gain - Kd: 0 # Kd derivative gain - # Kff: 1 # Feed forward gain - # deadband: - # tol: 0.01 # Stop control if within this distance from target for the below time - # time: 100 - # limits: - # minOutput: -100 # Minimum controller output - # maxOutput: 100 # Maximum controller output - # minIntegral: -100 # Minimum integral output - # maxIntegral: 100 # Maximum integral output - # inner: - # Kp: 0.1 # Kp for when close to target - # Ki: 0.1 # Ki for when close to target - # Kd: 0.1 # Kd for when close to target - # tol: 0.1 # Distance from target for when inner PID params will be used, defaults to atTarget tol - -trajectory: - # type: 1 # Default 0 = trapetz, 1 = S-curve (ruckig) - axis: - velocity: 2 # Default velo for axis - acceleration: 2 # Default acc for axis - deceleration: 2 # Default dec for axis - # emergencyDeceleration: 0.05 # Deceleration when axis in error state - jerk: 10 # Default jerk for axis - jog: - velocity: 2 # Default velo fro JOG (motor record) -# modulo: -# range: 360 # Modulo range 0..360 -# type: 0 # Modulo type - -input: - limit: - forward: ec0.s$(DRV_SLAVE).driveStatus01.12 # Ethercat entry for low limit switch input - # forwardPolarity: 0 # Polarity of forward limit switch - backward: ec0.s$(DRV_SLAVE).driveStatus01.11 # Ethercat entry for high limit switch input - # backwardPolarity: 0 # Polarity of forward limit switch - home: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for home switch - # homePolarity: 0 # Polarity of home switch - interlock: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for interlock switch input - # interlockPolarity: 0 # Polarity of interlock switch - #analog: - # interlock: 'ec0.s$(DRV_SLAVE).ZERO' # Ethercat entry for analog interlock - # #interlockPolarity: 1 # 0: High value is bad, 1 = Low value is bad - # rawLimit: 2000 # Analog raw limit - # # enable: true -# homing: -# type: 3 # Homing sequence type -# position: -30 # Position to reference encoder to -# velocity: -# to: 10 # Velocity to cam/sensor (used for some homing seqs) -# from: 5 # Velocity from cam/sensor (used for some homing seqs) -# acc: 20 # Acceleration during homing -# dec: 100 # Deceleration during homing -# refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id -# refAtHome: 1 # If homing is executed then set position of this encoder -# tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder -# postMoveEnable: yes # Enable move after successfull homing -# postMovePosition: 10 # Position to move to after successfull homing -# timeout: 100 # Sequence timeout - -softlimits: - enable: false # Enable soft limits - forward: 100 # Soft limit position fwd - forwardEnable: false # Soft limit position fwd enable - backward: -100 # Soft limit position bwd - backwardEnable: false # Soft limit position bwd enable - -monitoring: - lag: - enable: true # Enable position lag monitoring (following error) - tolerance: 0.1 # Allowed tolerance - time: 10 # Allowed time outside tolerance target: - velocity: - enable: false # Enable velocity monitoring - max: 100 # Allowed max velocity - time: - trajectory: 100 # Time allowed outside max velo before system init halt - drive: 200 # Time allowed outside max velo before system disables drive - target: - enable: true # Enable at target monitoring (needs to be enabled if using motor record) - tolerance: 0.01 # Allowed tolerance - time: 10 # Filter time inside tolerance to be at target - # velocityDifference: - # enable: true # Enable velocity diff monitoring (velo set vs velo act) - # max: 100 # Allowed max difference - # time: - # trajectory: 100 # Time allowed outside max diff velo before system init halt - # drive: 200 # Time allowed outside max diff velo before system disables drive diff --git a/cfg/axis_latch.yaml b/cfg/axis_latch.yaml deleted file mode 100644 index 33b6b0d..0000000 --- a/cfg/axis_latch.yaml +++ /dev/null @@ -1,205 +0,0 @@ -macros: LIMIT=10000,TYPE=0,DRV_SLAVE=${DRV_SLAVE} # Macros for all below (evaluated before jinja linter) - -axis: - id: 1 # Axis id - type: joint # this is for future selection of axis type - # mode: CSV # supported mode, CSV and CSP, defaults CSV - parameters: 'powerAutoOnOff=1;powerOnDelay=0.1;powerOffDelay=0.1;' # Additional params to motor record driver - #healthOutput: ec0... # Ethercat entry for health output - # autoMode: # Switch drive modes automaticaly for normal motion and homing (smaract for instance) - # modeSet: ec0.. # Ethercat entry drive mode write (set CSV,CSP,homing) - # modeAct: ec0.. # Ethercat entry drive mode reading (set CSV,CSP,homing) - # modeCmdMotion: 9 # Drive mode value for normal motion (written to axis.drvMode.modeSet when normal motion) - # modeCmdHome: 10 # Drive mode value for when homing (written to axis.drvMode.modeSet when homing) - # features: - # blockCom: false # Block communication to axis - # allowedFunctions: - # homing: true # Allow homing - # constantVelocity: true # Allow constant velocity - # positioning: true # Allow positioning - -epics: - name: Axis1 # Axis anme - precision: 3 # Decimal count - description: very important motor axis # Axis description - unit: mm # Unit - motorRecord: - enable: true - description: This is MR - fieldInit: 'RTRY=0,FOFF=Frozen' # Extra config for Motor record - -drive: - numerator: 3600 # Fastest speed in engineering units - denominator: 32768 # I/O range for ECMC_EC_ALIAS_DRV_VELO_SET - # type: 0 # Stepper: 0. DS402: 1 (DS402 = servos and advanced stepper drives) - control: ec0.s$(DRV_SLAVE).driveControl01 # Control word ethercat entry - enable: 0 # Enable bit index in control word (not used if DS402) - enabled: 1 # Enabled bit index in status word (not used if DS402) - status: ec0.s$(DRV_SLAVE).driveStatus01 # Status word ethercat entry - setpoint: ec0.s$(DRV_SLAVE).velocitySetpoint01 # Velocity setpoint if CSV. Position setpoint if CSP -# reduceTorque: 2 # Reduce torque bit in drive control word -# reduceTorqueEnable: True # Enable reduce torque functionality -# brake: -# enable: true # Enable brake -# output: ec0... # Ethercat link to brake output -# openDelay: 0 # Brake timing parameter in cycles (default 1kHz) -# closeAhead: 0 # Brake timing parameter in cycles (default 1kHz) -# reset: 1 # Reset (if no drive reset bit then leave empty) -# warning: 2 # Warning (if no drive warning bit then leave empty) -# error: # max 3 -# - 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: - numerator: 360 # Scaling numerator example 360 deg/rev - denominator: 12800 # Scaling denominator example 4096 ticks per 360 degree - # type: 0 # Type: 0=Incremental, 1=Absolute - bits: 16 # Total bit count of encoder raw data - # absBits: 0 # Absolute bit count (for absolute encoders) always least significant part of 'bits' - # absOffset: 0 # Encoder offset in eng units (for absolute encoders) - # mask: '0xFFF00' # Mask applied to raw encoder value - position: ec0.s$(DRV_SLAVE).positionActual01 # Ethercat entry for actual position input (encoder) - control: ec0.s$(DRV_SLAVE).encoderControl01 # mandatory only if 'reset' is used - status: ec0.s$(DRV_SLAVE).encoderStatus01 # mandatory only if 'warning' or 'error' are used - # ready: 10 # Bit in encoder status word for encoder ready - # source: 0 # 0 = Encoder value from etehrcat hardware, 1 = Encoder value from PLC - # reset: 1 # Reset (optional) - # warning: 2 # Warning (optional) - # error: # max 3 (optional) - # - 5 # Error 0 - # - 9 # Error 1 - # - 11 # Error 2 - # filter: - # velocity: - # size: 100 # Filter size for velocity - # enable: true # enable velocity filter - # position: - # size: 100 # Filter size for encoder value - # enable: true # enable encoder value filter - latch: - position: 'ec0.s$(DRV_SLAVE).encoderLatchPostion01' # Link to latched value. Used for some homing seqs - control: 0 # Bit in encoder control word to arm latch. Used for some homing seqs - status: 0 # Bit in encoder status word for latch triggered status. Used for some homing seqs - primary: 1 # Use this encoder as primary (for control) - homing: - type: 11 # Homing sequence type - position: -30 # Position to reference encoder to - velocity: - to: 10 # Velocity to cam/sensor (used for some homing seqs) - from: 5 # Velocity from cam/sensor (used for some homing seqs) - acceleration: 20 # Acceleration during homing - deceleration: 100 # Deceleration during homing - # refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id - refAtHome: 1 # If homing is executed then set position of this encoder - # tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder - # postMoveEnable: yes # Enable move after successfull homing - # postMovePosition: 10 # Position to move to after successfull homing - # trigg: ec0.. # Ethercat entry for triggering drive internal homing seq (seq id 26) - # ready: ec0.. # Ethercat entry for reading drive internal homing seq ready (seq id 26) - latchCount: 1 - -controller: - Kp: 1 # Kp proportinal gain - Ki: 0.02 # Ki integral gain - Kd: 0 # Kd derivative gain - # Kff: 1 # Feed forward gain - # deadband: - # tol: 0.01 # Stop control if within this distance from target for the below time - # time: 100 - # limits: - # minOutput: -100 # Minimum controller output - # maxOutput: 100 # Maximum controller output - # minIntegral: -100 # Minimum integral output - # maxIntegral: 100 # Maximum integral output - # inner: - # Kp: 0.1 # Kp for when close to target - # Ki: 0.1 # Ki for when close to target - # Kd: 0.1 # Kd for when close to target - # tol: 0.1 # Distance from target for when inner PID params will be used, defaults to atTarget tol - -trajectory: - # type: 1 # Default 0 = trapetz, 1 = S-curve (ruckig) - axis: - velocity: 100 # Default velo for axis - acceleration: 100 # Default acc for axis - deceleration: 100 # Default dec for axis - # emergencyDeceleration: 0.05 # Deceleration when axis in error state - jerk: 10 # Default jerk for axis - jog: - velocity: 5 # Default velo fro JOG (motor record) -# modulo: -# range: 360 # Modulo range 0..360 -# type: 0 # Modulo type - -input: - limit: - forward: ec0.s$(DRV_SLAVE).ONE.0 # Ethercat entry for low limit switch input - # forwardPolarity: 0 # Polarity of forward limit switch - backward: ec0.s$(DRV_SLAVE).ONE.0 # Ethercat entry for high limit switch input - # backwardPolarity: 0 # Polarity of forward limit switch - home: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for home switch - # homePolarity: 0 # Polarity of home switch - interlock: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for interlock switch input - # interlockPolarity: 0 # Polarity of interlock switch - -# homing: -# type: 3 # Homing sequence type -# position: -30 # Position to reference encoder to -# velocity: -# to: 10 # Velocity to cam/sensor (used for some homing seqs) -# from: 5 # Velocity from cam/sensor (used for some homing seqs) -# acc: 20 # Acceleration during homing -# dec: 100 # Deceleration during homing -# refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id -# refAtHome: 1 # If homing is executed then set position of this encoder -# tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder -# postMoveEnable: yes # Enable move after successfull homing -# postMovePosition: 10 # Position to move to after successfull homing -# timeout: 100 # Sequence timeout - -softlimits: - enable: false # Enable soft limits - forward: 100 # Soft limit position fwd - forwardEnable: false # Soft limit position fwd enable - backward: -100 # Soft limit position bwd - backwardEnable: false # Soft limit position bwd enable - -monitoring: - lag: - enable: true # Enable position lag monitoring (following error) - tolerance: 2 # Allowed tolerance - time: 10 # Allowed time outside tolerance target: - velocity: - enable: false # Enable velocity monitoring - max: 100 # Allowed max velocity - time: - trajectory: 100 # Time allowed outside max velo before system init halt - drive: 200 # Time allowed outside max velo before system disables drive - target: - enable: true # Enable at target monitoring (needs to be enabled if using motor record) - tolerance: 0.5 # Allowed tolerance - time: 10 # Filter time inside tolerance to be at target - # velocityDifference: - # enable: true # Enable velocity diff monitoring (velo set vs velo act) - # max: 100 # Allowed max difference - # time: - # trajectory: 100 # Time allowed outside max diff velo before system init halt - # drive: 200 # Time allowed outside max diff velo before system disables drive - -plc: - enable: true # Enable axis plc - externalCommands: true # Allow axis to inputs from PLC - file: ${PLC_PATH}test.plc - code: # Sync code - - "if(static.counter % ${LIMIT} == 0){println('AX PLC: Appended');static.counter:=0;};" # calculate set pos for physical axis - - "if(not(static.plc_code_loaded)) {static.counter:=static.counter+1;};" - - ec0.s$(DRV_SLAVE).ONE > 1; # Enable axis if one of master axes is enabled - - ec0.s$(DRV_SLAVE).ZERO > 1; # calculate set pos for physical axis -# velocity_filter: # Filter used to smother velocity feedforward -# encoder: # Filter plc enc velo -# enable: false # Filter enable -# size: 100 # Filter size -# trajectory: # Filter plc traj velo -# enable: false # Filter enable -# size: 100 # Filter size diff --git a/cfg/axis_latch_no_plc.yaml b/cfg/axis_latch_no_plc.yaml deleted file mode 100644 index d0b709a..0000000 --- a/cfg/axis_latch_no_plc.yaml +++ /dev/null @@ -1,189 +0,0 @@ -macros: LIMIT=10000,TYPE=0,DRV_SLAVE=${DRV_SLAVE} # Macros for all below (evaluated before jinja linter) - -axis: - id: 1 # Axis id - type: joint # this is for future selection of axis type - # mode: CSV # supported mode, CSV and CSP, defaults CSV - parameters: 'powerAutoOnOff=2;powerOnDelay=6.0;powerOffDelay=1.0;' # Additional params to motor record driver - #healthOutput: ec0... # Ethercat entry for health output - # autoMode: # Switch drive modes automaticaly for normal motion and homing (smaract for instance) - # modeSet: ec0.. # Ethercat entry drive mode write (set CSV,CSP,homing) - # modeAct: ec0.. # Ethercat entry drive mode reading (set CSV,CSP,homing) - # modeCmdMotion: 9 # Drive mode value for normal motion (written to axis.drvMode.modeSet when normal motion) - # modeCmdHome: 10 # Drive mode value for when homing (written to axis.drvMode.modeSet when homing) - # features: - # blockCom: false # Block communication to axis - # allowedFunctions: - # homing: true # Allow homing - # constantVelocity: true # Allow constant velocity - # positioning: true # Allow positioning - -epics: - name: Axis1 # Axis anme - precision: 3 # Decimal count - description: very important motor axis # Axis description - unit: mm # Unit - motorRecord: - enable: true - description: This is MR - fieldInit: 'RTRY=0,FOFF=Frozen' # Extra config for Motor record - -drive: - numerator: 3600 # Fastest speed in engineering units - denominator: 32768 # I/O range for ECMC_EC_ALIAS_DRV_VELO_SET - # type: 0 # Stepper: 0. DS402: 1 (DS402 = servos and advanced stepper drives) - control: ec0.s$(DRV_SLAVE).driveControl01 # Control word ethercat entry - enable: 0 # Enable bit index in control word (not used if DS402) - enabled: 1 # Enabled bit index in status word (not used if DS402) - status: ec0.s$(DRV_SLAVE).driveStatus01 # Status word ethercat entry - setpoint: ec0.s$(DRV_SLAVE).velocitySetpoint01 # Velocity setpoint if CSV. Position setpoint if CSP -# reduceTorque: 2 # Reduce torque bit in drive control word -# reduceTorqueEnable: True # Enable reduce torque functionality -# brake: -# enable: true # Enable brake -# output: ec0... # Ethercat link to brake output -# openDelay: 0 # Brake timing parameter in cycles (default 1kHz) -# closeAhead: 0 # Brake timing parameter in cycles (default 1kHz) -# reset: 1 # Reset (if no drive reset bit then leave empty) -# warning: 2 # Warning (if no drive warning bit then leave empty) -# error: # max 3 -# - 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: - numerator: 360 # Scaling numerator example 360 deg/rev - denominator: 12800 # Scaling denominator example 4096 ticks per 360 degree - # type: 0 # Type: 0=Incremental, 1=Absolute - bits: 16 # Total bit count of encoder raw data - # absBits: 0 # Absolute bit count (for absolute encoders) always least significant part of 'bits' - # absOffset: 0 # Encoder offset in eng units (for absolute encoders) - # mask: '0xFFF00' # Mask applied to raw encoder value - position: ec0.s$(DRV_SLAVE).positionActual01 # Ethercat entry for actual position input (encoder) - control: ec0.s$(DRV_SLAVE).encoderControl01 # mandatory only if 'reset' is used - status: ec0.s$(DRV_SLAVE).encoderStatus01 # mandatory only if 'warning' or 'error' are used - # ready: 10 # Bit in encoder status word for encoder ready - # source: 0 # 0 = Encoder value from etehrcat hardware, 1 = Encoder value from PLC - # reset: 1 # Reset (optional) - # warning: 2 # Warning (optional) - # error: # max 3 (optional) - # - 5 # Error 0 - # - 9 # Error 1 - # - 11 # Error 2 - # filter: - # velocity: - # size: 100 # Filter size for velocity - # enable: true # enable velocity filter - # position: - # size: 100 # Filter size for encoder value - # enable: true # enable encoder value filter - latch: - position: 'ec0.s$(DRV_SLAVE).encoderLatchPostion01' # Link to latched value. Used for some homing seqs - control: 0 # Bit in encoder control word to arm latch. Used for some homing seqs - status: 0 # Bit in encoder status word for latch triggered status. Used for some homing seqs - primary: 1 # Use this encoder as primary (for control) - homing: - type: 11 # Homing sequence type - position: -30 # Position to reference encoder to - velocity: - to: 10 # Velocity to cam/sensor (used for some homing seqs) - from: 5 # Velocity from cam/sensor (used for some homing seqs) - acceleration: 20 # Acceleration during homing - deceleration: 100 # Deceleration during homing - # refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id - refAtHome: 1 # If homing is executed then set position of this encoder - # tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder - # postMoveEnable: yes # Enable move after successfull homing - # postMovePosition: 10 # Position to move to after successfull homing - # trigg: ec0.. # Ethercat entry for triggering drive internal homing seq (seq id 26) - # ready: ec0.. # Ethercat entry for reading drive internal homing seq ready (seq id 26) - latchCount: 1 - -controller: - Kp: 1 # Kp proportinal gain - Ki: 0.02 # Ki integral gain - Kd: 0 # Kd derivative gain - # Kff: 1 # Feed forward gain - # deadband: - # tol: 0.01 # Stop control if within this distance from target for the below time - # time: 100 - # limits: - # minOutput: -100 # Minimum controller output - # maxOutput: 100 # Maximum controller output - # minIntegral: -100 # Minimum integral output - # maxIntegral: 100 # Maximum integral output - # inner: - # Kp: 0.1 # Kp for when close to target - # Ki: 0.1 # Ki for when close to target - # Kd: 0.1 # Kd for when close to target - # tol: 0.1 # Distance from target for when inner PID params will be used, defaults to atTarget tol - -trajectory: - # type: 1 # Default 0 = trapetz, 1 = S-curve (ruckig) - axis: - velocity: 100 # Default velo for axis - acceleration: 100 # Default acc for axis - deceleration: 100 # Default dec for axis - # emergencyDeceleration: 0.05 # Deceleration when axis in error state - jerk: 10 # Default jerk for axis - jog: - velocity: 5 # Default velo fro JOG (motor record) -# modulo: -# range: 360 # Modulo range 0..360 -# type: 0 # Modulo type - -input: - limit: - forward: ec0.s$(DRV_SLAVE).ONE.0 # Ethercat entry for low limit switch input - # forwardPolarity: 0 # Polarity of forward limit switch - backward: ec0.s$(DRV_SLAVE).ONE.0 # Ethercat entry for high limit switch input - # backwardPolarity: 0 # Polarity of forward limit switch - home: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for home switch - # homePolarity: 0 # Polarity of home switch - interlock: 'ec0.s$(DRV_SLAVE).ONE.0' # Ethercat entry for interlock switch input - # interlockPolarity: 0 # Polarity of interlock switch - -# homing: -# type: 3 # Homing sequence type -# position: -30 # Position to reference encoder to -# velocity: -# to: 10 # Velocity to cam/sensor (used for some homing seqs) -# from: 5 # Velocity from cam/sensor (used for some homing seqs) -# acc: 20 # Acceleration during homing -# dec: 100 # Deceleration during homing -# refToEncIDAtStartup: 1 # At startup then set the start value of this encoder to actpos of this encoder id -# refAtHome: 1 # If homing is executed then set position of this encoder -# tolToPrim: 0 # If set then this is the max allowed tolerance between prim encoder and this encoder -# postMoveEnable: yes # Enable move after successfull homing -# postMovePosition: 10 # Position to move to after successfull homing -# timeout: 100 # Sequence timeout - -softlimits: - enable: false # Enable soft limits - forward: 100 # Soft limit position fwd - forwardEnable: false # Soft limit position fwd enable - backward: -100 # Soft limit position bwd - backwardEnable: false # Soft limit position bwd enable - -monitoring: - lag: - enable: true # Enable position lag monitoring (following error) - tolerance: 2 # Allowed tolerance - time: 10 # Allowed time outside tolerance target: - velocity: - enable: false # Enable velocity monitoring - max: 100 # Allowed max velocity - time: - trajectory: 100 # Time allowed outside max velo before system init halt - drive: 200 # Time allowed outside max velo before system disables drive - target: - enable: true # Enable at target monitoring (needs to be enabled if using motor record) - tolerance: 0.5 # Allowed tolerance - time: 10 # Filter time inside tolerance to be at target - - # velocityDifference: - # enable: true # Enable velocity diff monitoring (velo set vs velo act) - # max: 100 # Allowed max difference - # time: - # trajectory: 100 # Time allowed outside max diff velo before system init halt - # drive: 200 # Time allowed outside max diff velo before system disables drive diff --git a/cfg/axis_el7041_no_plc.yaml b/cfg/axis_open_loop.yaml similarity index 99% rename from cfg/axis_el7041_no_plc.yaml rename to cfg/axis_open_loop.yaml index c3b9966..170e199 100644 --- a/cfg/axis_el7041_no_plc.yaml +++ b/cfg/axis_open_loop.yaml @@ -20,7 +20,7 @@ epics: name: Axis1 # Axis anme precision: 3 # Decimal count description: very important motor axis # Axis description - unit: mm # Unit + unit: deg # Unit # motorRecord: # enable: true # description: This is MR diff --git a/el7031.script b/el7031.script deleted file mode 100644 index ff490f2..0000000 --- a/el7031.script +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################## -## Example config for el7031 - -require ecmccfg v9.0.1_RC4,"ECMC_VER=v9.0.1_RC4,ENG_MODE=1" - -epicsEnvSet(IOC,c6025a) -# Load components lib -require ecmccomp sandst_a - -############################################################################## -## Configure hardware - -epicsEnvSet("DRV_SLAVE", "4") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(DRV_SLAVE), HW_DESC=EL7031" - -#- Apply motor config with some custom macros -#${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_STDBY_MA=200,I_MAX_MA=1000,R_COIL_MOHM=1700'" - -epicsEnvSet("ENC_SLAVE", "14") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE), HW_DESC=EL5042" - -#- Apply motor config with some custom macros -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-Generic-BISS-C" - -#Apply hardware configuration -ecmcConfigOrDie "Cfg.EcApplyConfig(1)" - -############################################################################## -## AXIS 1 -# -epicsEnvSet("DEV", "$(IOC)") -epicsEnvSet("PLC_PATH", "/ioc/c6025a/ecmccfg/examples/test/ecmccomp/plc/") -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis.yaml,LIMIT=1000,TYPE=0" - -############################################################################## -## PLC 1 -# -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlPlc.cmd, "FILE=./plc/plc_cfg.yaml,LIMIT=5000,TYPE=1" - -############################################################################## -############# Configure diagnostics: - -ecmcConfigOrDie "Cfg.EcSetDiagnostics(1)" -ecmcConfigOrDie "Cfg.EcEnablePrintouts(0)" -ecmcConfigOrDie "Cfg.EcSetDomainFailedCyclesLimit(100)" -ecmcConfigOrDie "Cfg.SetDiagAxisIndex(1)" -ecmcConfigOrDie "Cfg.SetDiagAxisFreq(2)" -ecmcConfigOrDie "Cfg.SetDiagAxisEnable(0)" - -# go active -$(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd) - diff --git a/el7031_latch.script b/el7031_latch.script deleted file mode 100644 index 1908452..0000000 --- a/el7031_latch.script +++ /dev/null @@ -1,48 +0,0 @@ -############################################################################## -## Example config for el7031 - -require ecmccfg v9.0.1_RC4,"ECMC_VER=v9.0.1_RC4,ENG_MODE=1" - -epicsEnvSet(IOC,c6025a) -# Load components lib -require ecmccomp - -############################################################################## -## Configure hardware - -epicsEnvSet("DRV_SLAVE", "4") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(DRV_SLAVE), HW_DESC=EL7031" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_STDBY_MA=200,I_MAX_MA=1000,R_COIL_MOHM=1700'" - -epicsEnvSet("ENC_SLAVE", "14") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE), HW_DESC=EL5042" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-Generic-BISS-C" - -#Apply hardware configuration -ecmcConfigOrDie "Cfg.EcApplyConfig(1)" - -############################################################################## -## AXIS 1 -# -epicsEnvSet("DEV", "$(IOC)") -epicsEnvSet("PLC_PATH", "/ioc/c6025a/ecmccfg/examples/test/ecmccomp/plc/") -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis_latch.yaml,LIMIT=1000,TYPE=0" - -############################################################################## -## PLC 1 -# -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlPlc.cmd, "FILE=./plc/plc_cfg.yaml,LIMIT=5000,TYPE=1" - -############################################################################## -############# Configure diagnostics: - -ecmcConfigOrDie "Cfg.EcSetDiagnostics(1)" -ecmcConfigOrDie "Cfg.EcEnablePrintouts(0)" -ecmcConfigOrDie "Cfg.EcSetDomainFailedCyclesLimit(100)" -ecmcConfigOrDie "Cfg.SetDiagAxisIndex(1)" -ecmcConfigOrDie "Cfg.SetDiagAxisFreq(2)" -ecmcConfigOrDie "Cfg.SetDiagAxisEnable(0)" - -# go active -$(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd) - diff --git a/el7031_latch_no_plc.script b/el7031_latch_no_plc.script deleted file mode 100644 index a5d1cf5..0000000 --- a/el7031_latch_no_plc.script +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -## Example config for el7031 - -require ecmccfg v9.0.1_RC4,"ECMC_VER=v9.0.1_RC4,ENG_MODE=1" - -epicsEnvSet(IOC,c6025a) -# Load components lib -require ecmccomp - -############################################################################## -## Configure hardware - -epicsEnvSet("DRV_SLAVE", "4") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(DRV_SLAVE), HW_DESC=EL7031" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_STDBY_MA=200,I_MAX_MA=1000,R_COIL_MOHM=1700'" - -epicsEnvSet("ENC_SLAVE", "14") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE), HW_DESC=EL5042" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-Generic-BISS-C" - -#Apply hardware configuration -ecmcConfigOrDie "Cfg.EcApplyConfig(1)" - -############################################################################## -## AXIS 1 -# -epicsEnvSet("DEV", "$(IOC)") -epicsEnvSet("PLC_PATH", "/ioc/c6025a/ecmccfg/examples/test/ecmccomp/plc/") -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis_latch_no_plc.yaml,LIMIT=1000,TYPE=0" - - -############################################################################## -############# Configure diagnostics: - -ecmcConfigOrDie "Cfg.EcSetDiagnostics(1)" -ecmcConfigOrDie "Cfg.EcEnablePrintouts(0)" -ecmcConfigOrDie "Cfg.EcSetDomainFailedCyclesLimit(100)" -ecmcConfigOrDie "Cfg.SetDiagAxisIndex(1)" -ecmcConfigOrDie "Cfg.SetDiagAxisFreq(2)" -ecmcConfigOrDie "Cfg.SetDiagAxisEnable(0)" - -# go active -$(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd) - diff --git a/el7037.script b/el7037.script deleted file mode 100644 index a5554d9..0000000 --- a/el7037.script +++ /dev/null @@ -1,41 +0,0 @@ -co############################################################################## -## Example config for el7037 - -require ecmccfg sandst_a,"ECMC_VER=v9.0.1_RC3,ENG_MODE=1" - -# Load components lib -require ecmccomp sandst_a - -############################################################################## -## Configure hardware - -epicsEnvSet("ECMC_EC_SLAVE_NUM", "12") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ECMC_EC_SLAVE_NUM), HW_DESC=EL7037" - -#- Apply motor config with some cutom macros -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-OrientalMotor-PK267JB-Series,MACROS='I_STDBY_MA=200,I_MAX_MA=1000'" - -#${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-OrientalMotor-PK267JB-Series" - -#Apply hardware configuration -ecmcConfigOrDie "Cfg.EcApplyConfig(1)" - -############################################################################## -## AXIS 1 -# -epicsEnvSet("DEV", "$(IOC)") -$(SCRIPTEXEC) ($(ecmccfg_DIR)configureAxis.cmd, CONFIG=./cfg/el7037_1.ax) - -############################################################################## -############# Configure diagnostics: - -ecmcConfigOrDie "Cfg.EcSetDiagnostics(1)" -ecmcConfigOrDie "Cfg.EcEnablePrintouts(0)" -ecmcConfigOrDie "Cfg.EcSetDomainFailedCyclesLimit(100)" -ecmcConfigOrDie "Cfg.SetDiagAxisIndex(1)" -ecmcConfigOrDie "Cfg.SetDiagAxisFreq(2)" -ecmcConfigOrDie "Cfg.SetDiagAxisEnable(0)" - -# go active -$(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd) - diff --git a/el7041-0052.script b/el7041-0052.script deleted file mode 100644 index db163b6..0000000 --- a/el7041-0052.script +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################## -## Example config for el7031 - -require ecmccfg "ENG_MODE=1" - -# Load components lib -require ecmccomp - -############################################################################## -## Configure hardware - -epicsEnvSet("ENC_SLAVE", "3") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE), HW_DESC=EL5042" - -#- Apply motor config with some custom macros -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-Renishaw-32bit-BISS-C,CH_ID=2" - -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=9, HW_DESC=EL7041-0052" - -#- Apply motor config with some custom macros -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230,STEPS=400'" - -epicsEnvSet("DRV_SLAVE", "10") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(DRV_SLAVE), HW_DESC=EL7041-0052" - -#- Apply motor config with some custom macros -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230,STEPS=400'" - -#Apply hardware configuration -ecmcConfigOrDie "Cfg.EcApplyConfig(1)" - -############################################################################## -## AXIS 1 -# -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis_el7041_no_plc_analog_il.yaml" - -############################################################################## -############# Configure diagnostics: - -ecmcConfigOrDie "Cfg.EcSetDiagnostics(1)" -ecmcConfigOrDie "Cfg.EcEnablePrintouts(0)" -ecmcConfigOrDie "Cfg.EcSetDomainFailedCyclesLimit(100)" -ecmcConfigOrDie "Cfg.SetDiagAxisIndex(1)" -ecmcConfigOrDie "Cfg.SetDiagAxisFreq(2)" -ecmcConfigOrDie "Cfg.SetDiagAxisEnable(0)" - -# go active -$(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd) - diff --git a/el7041-0052_no_plc.script b/el7041-0052_no_plc.script deleted file mode 100644 index 4ed0b35..0000000 --- a/el7041-0052_no_plc.script +++ /dev/null @@ -1,55 +0,0 @@ -############################################################################## -## Example config for el7031 - -require ecmccfg sandst_a,"ECMC_VER=sandst_a,ENG_MODE=1,MAX_PARAM_COUNT=1000" - -epicsEnvSet(IOC,c6025a) -# Load components lib -require ecmccomp sandst_a - -############################################################################## -## Configure hardware - -#-epicsEnvSet("ENC_SLAVE_1", "2") -#-${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE_1), HW_DESC=EL5001" -#-${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-SSI,CH_ID=1" - -epicsEnvSet("DRV_SLAVE", "13") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(DRV_SLAVE), HW_DESC=EL7041-0052" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230,STEPS=400'" - -epicsEnvSet("ENC_SLAVE_2", "14") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE_2), HW_DESC=EL5042" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-BISS-C,CH_ID=1" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-BISS-C,CH_ID=2" - -#-epicsEnvSet("ENC_SLAVE_3", "15") -#-${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE_3), HW_DESC=EL5002" -#-${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-SSI,CH_ID=1" -#-${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-SSI,CH_ID=2" - -#Apply hardware configuration -ecmcConfigOrDie "Cfg.EcApplyConfig(1)" - -############################################################################## -## AXIS 1 -# -epicsEnvSet("DEV", "$(IOC)") -epicsEnvSet("PLC_PATH", "/ioc/c6025a/ecmccfg/examples/test/ecmccomp/plc/") -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis_el7041_no_plc.yaml,LIMIT=1000,TYPE=0" - -############################################################################## -############# Configure diagnostics: - -ecmcConfigOrDie "Cfg.EcSetDiagnostics(1)" -ecmcConfigOrDie "Cfg.EcEnablePrintouts(0)" -ecmcConfigOrDie "Cfg.EcSetDomainFailedCyclesLimit(100)" -ecmcConfigOrDie "Cfg.SetDiagAxisIndex(1)" -ecmcConfigOrDie "Cfg.SetDiagAxisFreq(2)" -ecmcConfigOrDie "Cfg.SetDiagAxisEnable(0)" - -# go active -$(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd) - -#- ecmcConfig "Cfg.SetAxisErrorId(1,100000)" - diff --git a/el7041-0052_test_analog_il.script b/openloop_stepper_bissc.script similarity index 68% rename from el7041-0052_test_analog_il.script rename to openloop_stepper_bissc.script index 9378076..a633021 100644 --- a/el7041-0052_test_analog_il.script +++ b/openloop_stepper_bissc.script @@ -1,25 +1,20 @@ ############################################################################## -## Example config for el7031 +## Example config for testing open loop stepper and BISS-C encoder -require ecmccfg v9.0.1_RC4,"ECMC_VER=v9.0.1_RC4,ENG_MODE=1" +require ecmccfg,"ENG_MODE=1" -epicsEnvSet(IOC,c6025a) # Load components lib require ecmccomp ############################################################################## ## Configure hardware -#-epicsEnvSet("ENC_SLAVE_1", "2") -#-${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE_1), HW_DESC=EL5001" -#-${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-SSI,CH_ID=1" - epicsEnvSet("DRV_SLAVE", "13") ${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(DRV_SLAVE), HW_DESC=EL7041-0052" ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230,STEPS=400'" -epicsEnvSet("ENC_SLAVE_2", "14") -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE_2), HW_DESC=EL5042" +epicsEnvSet("ENC_SLAVE", "14") +${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=$(ENC_SLAVE), HW_DESC=EL5042" ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-BISS-C,CH_ID=1" ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-24bit-BISS-C,CH_ID=2" @@ -30,8 +25,7 @@ ecmcConfigOrDie "Cfg.EcApplyConfig(1)" ## AXIS 1 # epicsEnvSet("DEV", "$(IOC)") -epicsEnvSet("PLC_PATH", "/ioc/c6025a/ecmccfg/examples/test/ecmccomp/plc/") -${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis_el7041_no_plc_analog_il.yaml,LIMIT=1000,TYPE=0" +${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis_open_loop.yaml" ############################################################################## ############# Configure diagnostics: @@ -43,8 +37,6 @@ ecmcConfigOrDie "Cfg.SetDiagAxisIndex(1)" ecmcConfigOrDie "Cfg.SetDiagAxisFreq(2)" ecmcConfigOrDie "Cfg.SetDiagAxisEnable(0)" +############################################################################## # go active $(SCRIPTEXEC) ($(ecmccfg_DIR)setAppMode.cmd) - -#- ecmcConfig "Cfg.SetAxisErrorId(1,100000)" - diff --git a/plc/plc_cfg.yaml b/plc/plc_cfg.yaml deleted file mode 100644 index 7914e14..0000000 --- a/plc/plc_cfg.yaml +++ /dev/null @@ -1,9 +0,0 @@ -macros: LIMIT=1000,TYPE=1 # Macros to pass to this file (also plc.file) -plc: - id: 1 - enable: yes - rateMilliseconds: 1 - file: ${PLC_PATH}test.plc - code: - - "if(static.counter % ${LIMIT} == 0){println('PLC: Appended');static.counter:=0;};" # calculate set pos for physical axis - - "if(not(static.plc_code_loaded)) {static.counter:=static.counter+1;};" diff --git a/plc/test.plc b/plc/test.plc deleted file mode 100644 index df6bb5c..0000000 --- a/plc/test.plc +++ /dev/null @@ -1,9 +0,0 @@ -static.counter:=static.counter+1; -static.plc_code_loaded:=1; -if(static.counter % ${LIMIT} == 0) { - if(${TYPE}=0) { - println('AX PLC: File'); - } else { - println('PLC : File'); - }; -};