Skip to content
Snippets Groups Projects
Select Git revision
  • 48a213c23bf7970380e5b57802cc28541a657389
  • master default protected
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
41 results

cleanupcontroller.js

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    APSPU_I2C.py 1.62 KiB
    #******************************************#
    # I2C address, registers and ports for UNB2c
    # Created: 2021-05-11
    #******************************************#
    
    ###################################
    # General, Point of load converters
    ###################################
    
    CTR_LBA    = 0x3C
    CTR_RCU2_A = 0x3D
    CTR_RCU2_D = 0x0E
    CTR_POLS = {"CTR_LBA" :  0x3C,
                "CTR_RCU2_A" : 0x3D,
                "CTR_RCU2_D" : 0x3E}
    
    LP_VOUT_MODE      = 0x20
    LP_VOUT           = 0x8B #
    LP_temp           = 0x8D #
    LP_IOUT           = 0x8C
    
    ###################################
    # Central I2C Devices
    ###################################
    EEPROM            = 0x50
    
    ###################################
    # FAN speed
    ###################################
    MAX6620          = 0x52
    
    REG_GLOBAL = 0x00
    REG_TACH_1_MSP = 0x10
    REG_TACH_1_LSP = 0x11
    REG_TACH_2_MSP = 0x12
    REG_TACH_2_LSP = 0x13
    REG_TACH_3_MSP = 0x14
    REG_TACH_3_LSP = 0x15
    
    RUN_MONITOR = 0x80
    
    
    
    ######################
    # Functions
    ######################
    
    # Calculate floating point value according PMBus lineair
    def calc_lin_2bytes(data):
        expo = ((data[1] & 0xf8)>>3) 
        if expo > 2**4:
            expo = expo-2**5
        mantisse = (data[1] & 0x7)*0x100 + data[0]
        output = mantisse * 2**expo
        return output
    
    # Calculate floating point value according PMBus lineair
    def calc_lin_3bytes(data,mode):
        expo = (mode[0] & 0x1F) 
        if expo > 2**4:
            expo = expo - 2**5
        output = (data[1]*256 + data[0]) * 2**expo
        return output
    def tach(tach_msb, tach_lsb):
        tach_pulse_per_revolution = 2
        tach = (int(tach_msb, 16)*8) + (int(tach_lsb, 16)/32)
        rpm = 60/(tach*tach_pulse_per_revolution)
        return rpm