extra={'description':'MB441 and REG445 ACQ, REG programm revisions'}
    )

add_attr('IpAddress', DevString, rfun=HazemeyerIocaste_PS._get_ipaddress)

add_short('Interlock1', ADDR_INTERLOCK1)
add_short('Interlock2', ADDR_INTERLOCK2)
add_short('Interlock3', ADDR_REGULATION_FAULT)
add_short('Interlock4', ADDR_INTERNAL_FAULT)

# attributes will be evaluated in order of definition!
A_extra = dict(unit='A', format='%7.4f')
add_attr('CurrentOffset', DevDouble, extra={ 'format':'%7.4f', "unit":'A'}, rfun=None, wfun=True)
add_double('I', extra=A_extra, addr=ADDR_I_MEASURE, waddr=ADDR_IREF_WRITE, rwaddr=ADDR_IREF_READ)
add_attr('CurrentSetpoint', DevDouble, extra=A_extra, wfun=True)
add_attr('Current', DevDouble, extra=A_extra, rfun=None)
add_attr('StatusBits', DevString)
add_double('Voltage',  extra={ "unit":'V'}, addr=ADDR_VOLTAGE_MEASURE)
add_double('V',  extra={ "unit":'V'}, addr=ADDR_VOLTAGE_MEASURE)
add_double('CurrentRampLocal',  extra={ 'unit':'A/s'}, addr=ADDR_CURRENT_RAMP_LOCAL)
add_double('CurrentRamp',  extra={ 'unit':'A/s'}, addr=ADDR_CURRENT_RAMP)

add_state_bit('RemoteMode', BIT_REMOTE)
add_state_bit('Ready', BIT_READY)
add_state_bit('Fault', BIT_GLOBAL_FAULT)
add_state_bit('RegulationOk', BIT_REGOK)

if __name__ == '__main__':
    PS.tango_main(HazemeyerIocaste_PS)

Ejemplo n.º 2
0
        state2 = self.modmux.Vmeas_state[self.Channel] or 0
        attr.set_value((state1 << 8) | state2)


class BrukerALC_PS_Class(PS.PowerSupply_Class):
    class_property_list = PS.gen_property_list(("RegulationPrecision",))
    class_property_list["RegulationPrecision"][2] = 0.01  # 5e-3

    device_property_list = PS.gen_property_list(("Channel",), XI=4, cpl=class_property_list)

    attr_opt = ("Current", "CurrentSetpoint", "Voltage")
    attr_list = PS.gen_attr_list(opt=attr_opt, max_err=100)
    POLL_PERIOD = 500
    attr_list["Current"][1]["polling period"] = POLL_PERIOD
    I_FMT = "%6.4f"
    attr_list["Current"][1]["format"] = I_FMT
    attr_list["CurrentSetpoint"][1]["format"] = I_FMT

    attr_list["Voltage"][1]["polling period"] = POLL_PERIOD
    attr_list["I"] = [[Tg.DevShort, Tg.SCALAR, Tg.READ_WRITE], dict()]
    attr_list["V"] = [[Tg.DevShort, Tg.SCALAR, Tg.READ], dict()]
    attr_list["ErrorCode"] = [[Tg.DevLong, Tg.SCALAR, Tg.READ], dict()]

    cmd_opt = ("UpdateState",)
    cmd_list = PS.gen_cmd_list(opt=cmd_opt)
    cmd_list["UpdateState"][2]["polling period"] = 500


if __name__ == "__main__":
    PS.tango_main("BrukerALC_PS", (BrukerALC_PS, BrukerALC_ModMux))
Ejemplo n.º 3
0
#                'WaveX' : [[ Tg.DevDouble, Tg.SPECTRUM, Tg.READ_WRITE, 2**14] , {} ],
                'WaveLength' : [[ Tg.DevShort, Tg.SCALAR, Tg.READ], {'unit' : 'points'} ],
                'WaveStatus' : [[ Tg.DevString, Tg.SCALAR, Tg.READ ]],
                'WaveName' : [[ Tg.DevString, Tg.SCALAR, Tg.READ ]],
                'WaveId' : [[ Tg.DevLong, Tg.SCALAR, Tg.READ ]],
                'WaveDuration' : [[ Tg.DevDouble, Tg.SCALAR, Tg.READ ], {'unit': 'ms'} ],
                'WaveOffset' : [[ Tg.DevDouble, Tg.SCALAR, Tg.READ_WRITE ], {'unit': 'A'} ],
                'WaveInterpolation' : [[ Tg.DevShort, Tg.SCALAR, Tg.READ_WRITE ], { 'unit': 'log2(periods/point)' } ],
                'RegulationFrequency' : [[ Tg.DevDouble, Tg.SCALAR, Tg.READ ], { 'unit' : 'kHz'} ],
                'TriggerMask': [[Tg.DevLong, Tg.SCALAR,  Tg.READ_WRITE],
                    { 'min value' : 0, 'max value' : 0x3fffffff,
    'description' : '''number of triggers to consider:
0:no wave generated, 1:generate single wave, 0x3fffffff:continously''' }
                    ],
                'SyncStatus' : [[ Tg.DevString, Tg.SCALAR, Tg.READ ]],
        })

        attr_list['CurrentSetpoint'][1]['format'] = FMT
        attr_list['Voltage'][1]['format'] = FMT
        attr_list['Current'][1]['format'] = FMT

        #  BrukerBend_PSClass Constructor
        def __init__(self, name):
                Tg.DeviceClass.__init__(self, name)
                self.set_type(name);


if __name__ == '__main__':
    classes = (BrukerBend_PS, )
    PS.tango_main( 'BrukerBend_PS', classes)
Ejemplo n.º 4
0
#                'WaveX' : [[ Tg.DevDouble, Tg.SPECTRUM, Tg.READ_WRITE, 2**14] , {} ],
                'WaveLength' : [[ Tg.DevShort, Tg.SCALAR, Tg.READ], {'unit' : 'points'} ],
                'WaveStatus' : [[ Tg.DevString, Tg.SCALAR, Tg.READ ]],
                'WaveName' : [[ Tg.DevString, Tg.SCALAR, Tg.READ ]],
                'WaveId' : [[ Tg.DevLong, Tg.SCALAR, Tg.READ ]],
                'WaveDuration' : [[ Tg.DevDouble, Tg.SCALAR, Tg.READ ], {'unit': 'ms'} ],
                'WaveOffset' : [[ Tg.DevDouble, Tg.SCALAR, Tg.READ_WRITE ], {'unit': 'A'} ],
                'WaveInterpolation' : [[ Tg.DevShort, Tg.SCALAR, Tg.READ_WRITE ], { 'unit': 'log2(periods/point)' } ],
                'RegulationFrequency' : [[ Tg.DevDouble, Tg.SCALAR, Tg.READ ], { 'unit' : 'kHz'} ],
                'TriggerMask': [[Tg.DevLong, Tg.SCALAR,  Tg.READ_WRITE],
                    { 'min value' : 0, 'max value' : 0x3fffffff,
    'description' : '''number of triggers to consider:
0:no wave generated, 1:generate single wave, 0x3fffffff:continously''' }
                    ],
                'SyncStatus' : [[ Tg.DevString, Tg.SCALAR, Tg.READ ]],
        })

        attr_list['CurrentSetpoint'][1]['format'] = FMT
        attr_list['Voltage'][1]['format'] = FMT
        attr_list['Current'][1]['format'] = FMT

        #  BrukerBend_PSClass Constructor
        def __init__(self, name):
                Tg.DeviceClass.__init__(self, name)
                self.set_type(name);


if __name__ == '__main__':
    classes = (BrukerBend_PS, )
    PS.tango_main( 'BrukerBend_PS', classes)