

LOAD                                    = [NAME=ADC2, LIB=BasdaMoccaMpiaNDeviceDummy]


MOD.PR1.CFG.CONNECTION.ADDRESS          = tcp://192.168.61.50:4000
MOD.PR1.CFG.CONNECTION.CARD             = 1
MOD.PR1.CFG.CONNECTION.MODULE           = 2
MOD.PR1.CFG.CONNECTION.TIMEOUT:Time     = 00:00:03.000000      +UNIT=hour                             # its the time how long the service should wait for a normal command response like ACK (this timeout is blocking the service but the MoCon sends the ACK immediately)
MOD.PR1.CFG.CONNECTION.EVENT_TIMEOUT:Time = 00:00:00.500000    +UNIT=hour                             # its the time how long the service should wait for a event message (Pay attention: this timeout blocks the service while it is waiting for an event which might not send immediately)
MOD.PR1.CFG.CONNECTION.UPLOAD_TIME:Time = 00:00:00.008541000   +UNIT=hour                             # this time needs to be measured in advance to calculate the correct timing for the net profile block upload
MOD.PR1.CFG.DATASHEET.CONFIG            = track_ctrl/track_ctrl.adc.prisms-dev_datasheet-DUMMY.cfg

# MODEL STANDA 8MPR16-1; gear reduction rate 1:90 with stepper motor F10/16-3 20 step/rev and reduction gear 1:16
# MOD.PR1.CFG.DATASHEET.TRAVELRANGE:Point = [0, 7372800.0]  +UNIT=steps  +LABEL=["MIN", "MAX"]

CFG.ONEWAY:Bool      = 0
CFG.FULLTURN = 7372800 +UNIT=steps  +LABEL="FULLTURN"


CFG.SWITCHWIDTH = 60
CFG.SWITCHDEPTH = 8
CFG.SWITCHMASK = 0b11111000:8

# device configuration parameter to define which position value should be periodically updated
# default: 0 MoCon internal software Encoder
#          1 incremental Encoder
#          2 absolute Encoder
#          3 MoCon internal software Encoder + incremental Encoder
#          4 MoCon internal software Encoder + absolute Encoder
#          5 incremental Encoder + absolute Encoder
#          6 MoCon internal software Encoder + incremental Encoder + absolute Encoder
CFG.POSITION.AUTOUPDATE:Int          = 0

# device configuration parameter to define which position value should be returned by
# getPosition or displayed in the GUI
# default: 0 MoCon internal software Encoder
#          1 incremental Encoder
#          2 absolute Encoder
CFG.POSITION.REPORT:Int              = 0

# device configuration parameter to define in which unit the position value should be returned. The value is the index of the CFG.TRANS
CFG.POSITION.UNIT:Int                = 0

# device configuration parameter to define in which unit the position value should be returned. The value is the index of the CFG.TRANS
CFG.POSITION.UNIT                    = STEPS
#
# device configuration parameter
#
# Depending on how many named position you like to have add here the properties with the positions values and the labels.
# The labels are used to display them in the GUI. The position values are the absolute target positions of the motor in steps.
# The property of the named position needs to be numbered serially.
#
# CFG.NAMED_POS.ABS.0:Point                  =  [45000.0,35000.0]              +LABEL=["X", "Y"] +NAME="center"
# CFG.NAMED_POS.ABS.1:Point                  =  [600.0,600.0]              +LABEL=["X", "Y"] +NAME="NPOS 2"


CFG.NAMED_POS.ABS.0:Int = 48032 +LABEL=["ADC2"] +NAME="min_disp"


# CFG.NAMED_POS.ABS.1:Int = 3686400 +LABEL=["ADC2"] +NAME="POS180"
# CFG.NAMED_POS.ABS.2:Int = 5529600 +LABEL=["ADC2"] +NAME="POS270"
# CFG.NAMED_POS.ABS.3:Int = 921600  +LABEL=["ADC2"] +NAME="POS45"
# CFG.NAMED_POS.ABS.4:Int = 6451200 +LABEL=["ADC2"] +NAME="POS315"

#
# This is the named position for relative movements. It can be used in engineering mode in order to move the motor to a relative position several times.
# without to edit the target position permanently.
#
# CFG.NAMED_POS.REL.0:Point                  = [0.1,0.1]               +LABEL=["X", "Y"] +NAME="Rel. 0"

#
# This are the position switch codings for the single named positions
#

#CFG.NAMED_POS.SWITCH.0 = 0xFE
#CFG.NAMED_POS.SWITCH.0 = 0x5
#CFG.NAMED_POS.SWITCH.1 = 0xFD
#CFG.NAMED_POS.SWITCH.2 = 0xFC
#CFG.NAMED_POS.SWITCH.3 = 0xFB

#
# It follows the definition of the coordination transformation
# from the focal plane in the motor coordinate system.
# It is also used to convert to different units.

# CFG.TRANS.STEPS:WMatrix = [[1, 0], [0, 1], [0, 0]]   +LABEL=["Scale X", "Shear X", "Shear Y", "Scale Y", "Offset X", "Offset Y"] +PREC=0

# According to LN-MPIA-VER-CRY-001 motor #2 has a range of 20100 steps for
# the x coordinate and motor #3 has a range of 19700 steps for the y-coord.
# The number of steps for a full range of 30.03 degrees is 3268, which
# gives 0.009186 deg per step. Note that both signs may still be individually
# wrong and may be negative (depending on whether sky rotations are flipped...)
# RJM 2016-11-10
# CFG.TRANS.MM:WMatrix    = [[0.00918605, 0], [0, 0.00918605], [0, 0]] +LABEL=["Scale X", "Shear X", "Shear Y", "Scale Y", "Offset X", "Offset Y"] +PREC=2

# Two gears 1:16 & 1:90 with a motor 20 steps/revol microsteps 256 -> 7372800 microsteps/fullrevolution -> 20480 micrsteps/degree ; 5.688888888 microsteps/arcsec
# 4.8828125e-05 = 1/(80*256) = 1/20480
CFG.TRANS.DEGREE:Point = [4.8828125e-05, 0]  +LABEL=["Scale", "Offset"] +PREC=2
CFG.TRANS.ARCSEC:Point = [0.17578125, 0]  +LABEL=["Scale", "Offset"] +PREC=2
