easymodbus/modbusClient.py
def convert_registers_to_float(registers, register_order=RegisterOrder.lowHigh):
    """
    Convert two 16 Bit Registers to 32 Bit real value - Used to receive float values from Modbus (Modbus Registers are 16 Bit long)
    registers: 16 Bit Registers
    return: 32 bit value real
    """
    b = bytearray(4)
    b[0] = registers[0] & 0xff
    b[1] = (registers[0] & 0xff00) >> 8
    b[2] = (registers[1] & 0xff)
    b[3] = (registers[1] & 0xff00) >> 8
    if register_order == RegisterOrder.highLow:
        b[2] = registers[0] & 0xff
        b[3] = (registers[0] & 0xff00) >> 8
        b[0] = (registers[1] & 0xff)
        b[1] = (registers[1] & 0xff00) >> 8
    returnValue = struct.unpack('<f', b)  # little Endian
    return returnValue

    Convert two 16 Bit Registers to 32 Bit real value - Used to receive float values from Modbus (Modbus Registers are 16 Bit long)
    registers: 16 Bit Registers
    return: 32 bit value real
    
Convert two 16 Bit Registers to 32 Bit real value - Used to receive float values from Modbus (Modbus Registers are 16 Bit long)
registers: 16 Bit Registers
return: 32 bit value real
Convert two 16 Bit Registers to 32 Bit real value - Used to receive float values from Modbus ( Modbus Registers are 16 Bit long ) registers : 16 Bit Registers return : 32 bit value real
def convert_registers_to_float(registers, register_order=RegisterOrder.lowHigh):
    b = bytearray(4)
    b[0] = registers[0] & 0xff
    b[1] = (registers[0] & 0xff00) >> 8
    b[2] = (registers[1] & 0xff)
    b[3] = (registers[1] & 0xff00) >> 8
    if register_order == RegisterOrder.highLow:
        b[2] = registers[0] & 0xff
        b[3] = (registers[0] & 0xff00) >> 8
        b[0] = (registers[1] & 0xff)
        b[1] = (registers[1] & 0xff00) >> 8
    returnValue = struct.unpack('<f', b)  
    return returnValue
def convert_registers_to_float ( registers , register_order = RegisterOrder . lowHigh ) : b = bytearray ( 4 ) b [ 0 ] = registers [ 0 ] & 0xff b [ 1 ] = ( registers [ 0 ] & 0xff00 ) >> 8 b [ 2 ] = ( registers [ 1 ] & 0xff ) b [ 3 ] = ( registers [ 1 ] & 0xff00 ) >> 8 if register_order == RegisterOrder . highLow : b [ 2 ] = registers [ 0 ] & 0xff b [ 3 ] = ( registers [ 0 ] & 0xff00 ) >> 8 b [ 0 ] = ( registers [ 1 ] & 0xff ) b [ 1 ] = ( registers [ 1 ] & 0xff00 ) >> 8 returnValue = struct . unpack ( '<f' , b ) return returnValue
Convert two 16 Bit Registers to 32 Bit real value - Used to receive float values from Modbus (Modbus Registers are 16 Bit long)
registers: 16 Bit Registers
return: 32 bit value real
Convert two 16 Bit Registers to 32 Bit real value - Used to receive float values from Modbus ( Modbus Registers are 16 Bit long ) registers : 16 Bit Registers return : 32 bit value real
"""
    Convert two 16 Bit Registers to 32 Bit real value - Used to receive float values from Modbus (Modbus Registers are 16 Bit long)
    registers: 16 Bit Registers
    return: 32 bit value real
    """ # little Endian
registers
register_order