def rawReadRAM(self, Address = 0):
        """
        Name: U12.rawReadRAM(Address = 0)
        
        Args: Address, the starting address to read from
        
        Desc: Reads 4 bytes out of the U12's internal memory. See section 5.11
              of the User's Guide.
              
              By default, reads the bytes that make up the serial number.
              
        Returns: A dictionary with the following keys:
            DataByte0, the data byte at Address - 0
            DataByte1, the data byte at Address - 1
            DataByte2, the data byte at Address - 2
            DataByte3, the data byte at Address - 3
            
        Example:
        >>> import u12, struct
        >>> d = u12.U12()
        >>> r = d.rawReadRAM()
        >>> print r
        {'DataByte3': 5, 'DataByte2': 246, 'DataByte1': 139, 'DataByte0': 170}
        >>> bytes = [ r['DataByte3'], r['DataByte2'], r['DataByte1'], r['DataByte0'] ]
        >>> print struct.unpack(">I", struct.pack("BBBB", *bytes))[0]
        100043690
        """
        command = [ 0 ] * 8
        
        # 01010000 (Read RAM)
        bf = BitField()
        bf.bit6 = 1
        bf.bit4 = 1
        command[5] = int(bf)
        
        command[6] = (Address >> 8) & 0xff
        command[7] = Address & 0xff
        
        self.write(command)
        results = self.read()
        
        if results[0] != int(bf):
            raise U12Exception("Expected ReadRAM response, got %s" % results[0])
        
        if (results[6] != command[6]) or (results[7] != command[7]):
            receivedAddress = (results[6] << 8) + results[7]
            raise U12Exception("Wanted address %s got address %s" % (Address, receivedAddress))
        
        returnDict = dict()
        
        returnDict['DataByte3'] = results[1]
        returnDict['DataByte2'] = results[2]
        returnDict['DataByte1'] = results[3]
        returnDict['DataByte0'] = results[4]
        
        return returnDict
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.rawReadRAM/original