Commit c6946a5f authored by Jose Tiago Macara Coutinho's avatar Jose Tiago Macara Coutinho Committed by blissadm_ID31@bibhelm
Browse files

SPEC config: add eurotherm motor limits

parent 23ede9d0
......@@ -674,6 +674,8 @@ class Generator(object):
klass = eurotherm_config['class']
etype = config['type']
if etype == 'motor':
low_limit = float(config.get('low_limit', 0.))
high_limit = float(config.get('high_limit', 0.))
# can only be one motor controller so we do it here
motor_ctrl = Device(ltype='PSE_MAC_MOT', addr=klass, num=999,
conf=server.eurotherm)
......@@ -681,6 +683,7 @@ class Generator(object):
ctrl_addr = 'MAC_MOT:{0}/1'.format(motor_ctrl.getCtrlIndex())
motor = Motor(ctrl=ctrl_addr, steps=1, sign=1, slew=1, base=1,
backl=0, mne=name, name=name)
motor.setSettings(0, 0., low_limit, high_limit)
motor.addPar('MOTPAR:read_mode = 7')
self.spec_config.addMotor(motor)
else: # must be a counter
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment