###########################################################################################
## Config file generated from python script: "../motion_ctrl/stages/motion_ctrl.stagex.inbeam_dep-dev_X_datasheet.cfg"
##
## Created
##      by: dumpMoConParams.py
##
## WARNING! All changes made in this file will be lost executing dumpMoConParams.py script!
###########################################################################################

# predefined properties with default values
# needed by MoCon service
TYPE:String    = "Linear Stage"
VENDOR:String  = "PI"
PRODUCT:String = "LS-180"

# enable this flag to flash the MoCon with these settings 
UPLOAD_SETTINGS:Bool = 0

# external profile settings
PROFILE.SEGMENTS_PER_BLOCK:U32 = 5
TIME_PER_CYCLE:Double = 614.411  +UNIT="microsecond"

# trace settings: SAMPLE_MODE:  0=one time; 1=rolling buffer
#                 SAMPLE_RATE:  measure every 1..65000 cycle.
TRACE.SAMPLE_MODE:Int = 0
TRACE.SAMPLE_RATE:Int = 1  +MIN:Int=1  +MAX:Int=65000


# amplifier settings can not be downloaded. Properties are defined with default values!
# amplifier settings: BITMASK:       bit mask for microsteps: 0x0..0xFF
#                     SENSE_CONTROL: sense control signal: 0x0..0x3F
#                                    bit 0: PWMa/Pulse     (0=not inverse, 1=inverse)
#                                    bit 1: PWMb           (0=not inverse, 1=inverse)
#                                    bit 2: PWMc/AtRest    (0=not inverse, 1=inverse)
#                                    bit 3: Sign/Dir       (0=not inverse, 1=inverse)
#                                    bit 4: power off      (0=not inverse, 1=inverse)
#                                    bit 5: auto power off (0=not inverse, 1=inverse)
AMPLIFIER.BITMASK:U16             = 0  +MIN:U16=0  +MAX:U16=255
AMPLIFIER.MICROSTEPS.BITVALUE:U16 = 0  +MIN:U16=0  +MAX:U16=255
AMPLIFIER.MICROSTEPS.POSITION:U16 = 1  +MIN:U16=1  +MAX:U16=16
AMPLIFIER.MICROSTEPS.VALUE:U16    = 1  +MIN:U16=0  +MAX:U16=1024
AMPLIFIER.SENSE_CONTROL:BitSet    = 0x0:6 +LABEL:SeqString=["Bit 0: PWMa / Pulse","Bit 1: PWMb","Bit 2: PWMc / ArRest","Bit 3: Sig  / Dir","Bit 4: Power Off","Bit 5: Auto Power Off"]


# following values are a dump of the MoCon settings
# basic settings: JERK:                  3930..2147483647 (unit: revolution per minute^3);
#                                        0 means value is not required for that motor configuration
#                 PROFILE:               0=trapeze, 2=Constant Velocity, 2=s-curve
#                 RESOLUTION:            steps per revolution 1..8192
#                 VELOCITY.ACCELERATION: 1717..2147483647 (unit: revolution per minute^2);
#                                        0 means value is not required for that motor configuration
#                 VELOCITY.DECELERATION: 1717..2147483647 (unit: revolution per minute^2);
#                                        0 means value is not required for that motor configuration
#                 VELOCITY.START:        this settings is only available for stepper motors
#                                        0.0115..81916250.0 (unit: revolution per minute);
#                                        0 means value is not required for that motor configuration
#                 VELOCITY.STRAIGHT:     1.55..81916250.0 (unit: revolution per minute);
BASIC.JERK:U32                  = 0           +MIN:U32=0     +MAX:U32=2147483647      +UNIT:String=rev/min^3
BASIC.PROFILE:U16               = 0           +SELECT:SeqString=[Trapeze,"Constant Velocity",S-Curve]
BASIC.RESOLUTION:U16            = 2000        +MIN:U16=1     +MAX:U16=8192            +UNIT:String=counts/rev
BASIC.VELOCITY.ACCELERATION:U32 = 199944      +MIN:U32=0     +MAX:U32=2147483647      +UNIT:String=rev/min^2
BASIC.VELOCITY.DECELERATION:U32 = 199944      +MIN:U32=0     +MAX:U32=2147483647      +UNIT:String=rev/min^2
BASIC.VELOCITY.START:Double     = 0.0000      +MIN:Double=0  +MAX:Double=8.19162e+07  +UNIT:String=rev/min
BASIC.VELOCITY.STRAIGHT:Double  = 1700.0000   +MIN:Double=0  +MAX:Double=8.19162e+07  +UNIT:String=rev/min


# encoder settings:             TYPE:                absolute and incremental encoder position value will be downloaded when the property is configured in that way.
#                                                    0=without encoder, 1=incremental encoder, 2=absolute encoder, 3=incremental and absolute encoder
# absolute encoder settings:    ABSOLUTE.CODE:       coding of the absolute encoder position
#                               ABSOLUTE.RESOLUTION: for absolute encoder 13..29 bit; default 25
# incremental encoder settings: INCREMENTAL.STEPS:   steps per revolution (only for stepper) -32767..32767
#                               INCREMENTAL.COUNTS:  incremental counts per revolution -32767..32767
#                               INCREMENTAL.ERROR:   error limit: 0..2147483647
ENCODER.TYPE:Int                    = 0           +SELECT:SeqString=["No Encoder","Incremental Encoder","Absolute Encoder","Incremental and Absolute Encoder"]
ENCODER.ABSOLUTE.CODE:U16           = 1           +MIN:U16=0         +MAX:U16=1
ENCODER.ABSOLUTE.RESOLUTION:U16     = 25          +MIN:U16=13        +MAX:U16=29          +UNIT:String=bit
ENCODER.INCREMENTAL.STEPS:Short     = 0           +MIN:Short=-32767  +MAX:Short=32767     +UNIT:String=steps/rev
ENCODER.INCREMENTAL.COUNTS:Short    = 2000        +MIN:Short=-32767  +MAX:Short=32767     +UNIT:String=counts/rev
ENCODER.INCREMENTAL.ERROR_LIMIT:U32 = 10000       +MIN:U32=0         +MAX:U32=2147483647


# firmware settings can not be downloaded. Properties are defined with default values!
# firmware settings: these values are stored in the EEPROM when uploaded and are valid after a reset.
#                    AUTOLOADER: if the flag is true the motor settings are loaded from the EEPROM automatically after a reset.
#                    EVENT:      if the flag is false all event messages are blocked.
#                    INFO:       if the flag is false all info messages are blocked.
FIRMWARE.AUTOLOADER:Bool = 0
FIRMWARE.EVENT:Bool      = 1
FIRMWARE.INFO:Bool       = 0


# motor settings: DOCKING_DISTANCE: to reference switch 1..1000000000
#                 REFERENCE_SENSE:  false=reference switch high active,  true=reference switch low active
#                 REFERENCE_SWITCH: 0=disable(default),
#                                   1=positive limit switch,
#                                   2=negative limit switch,
#                                   3=separate switch,
#                                   4=level switch
#                 TYPE:             0=servo, 1 stepper
#                 UNIT:             this is used to define the units of the position properties. Stepper: steps / SERVO: counts
#                 VELOCITY.DOCKING: home position docking velocity: 0.0115..81916250.0 (unit: revolution per minute);
#                                   0 means value is not required for that motor configuration
#                 VELOCITY.HOME:    0.0115..81916250.0 (unit: revolution per minute);
#                                   0 means value is not required for that motor configuration
MOTOR.DOCKING_DISTANCE:U32    = 40000       +MIN:U32=0     +MAX:U32=1000000000
MOTOR.REFERENCE.SENSE:Bool    = 0           +MIN:U32=0     +MAX:U32=1               +SELECT:SeqString=["High Active","Low Active"]
MOTOR.REFERENCE.SWITCH:Int    = 1           +MIN:U32=0     +MAX:U32=4               +SELECT:SeqString=["Disable (default)","Positive Limit Switch","Negative Limit Switch","Separate Switch","Level Switch"]
MOTOR.TYPE:Int                = 0  +SELECT:SeqString=[Servo,Stepper]
MOTOR.UNIT:String             = counts
MOTOR.VELOCITY.DOCKING:Double = 999.99980   +MIN:Double=0  +MAX:Double=8.19162e+07  +UNIT:String=rev/min
MOTOR.VELOCITY.HOME:Double    = 2000.0000   +MIN:Double=0  +MAX:Double=8.19162e+07  +UNIT:String=rev/min


# servo loop settings: BIAS:  -100..100
#                      ILIM:  0..2147483647
#                      KAFF:  0..32767
#                      KD:    0..32767
#                      KI:    0..32767
#                      KOUT:  0..100
#                      KP:    0..32767
#                      KVFF:  0..32767
#                      Limit: 0..100
SERVOLOOP.BIAS:Short = 0           +MIN:Short=-100  +MAX:Short=100       +UNIT:String=%
SERVOLOOP.ILIM:U32   = 80000       +MIN:U32=0       +MAX:U32=2147483647
SERVOLOOP.KAFF:U16   = 0           +MIN:U16=0       +MAX:U16=32767     
SERVOLOOP.KD:U16     = 120         +MIN:U16=0       +MAX:U16=32767     
SERVOLOOP.KI:U16     = 240         +MIN:U16=0       +MAX:U16=32767     
SERVOLOOP.KOUT:U16   = 100         +MIN:U16=0       +MAX:U16=100         +UNIT:String=%
SERVOLOOP.KP:U16     = 150         +MIN:U16=0       +MAX:U16=32767     
SERVOLOOP.KVFF:U16   = 0           +MIN:U16=0       +MAX:U16=32767     
SERVOLOOP.LIMIT:U16  = 100         +MIN:U16=0       +MAX:U16=100         +UNIT:String=%
