def read_chip_sn(self):
commands = []<EOL>commands.extend(self.register.get_commands("<STR_LIT>"))<EOL>self.register_utils.send_commands(commands)<EOL>with self.readout(fill_buffer=True, callback=None, errback=None):<EOL><INDENT>if self.register.fei4b:<EOL><INDENT>commands = []<EOL>self.register.set_global_register_value('<STR_LIT>', <NUM_LIT:1>)<EOL>commands.extend(self.register.get_commands("<STR_LIT>", name=['<STR_LIT>']))<EOL>commands.extend(self.register.get_commands("<STR_LIT>", Width=<NUM_LIT:0>))<EOL>self.register.set_global_register_value('<STR_LIT>', <NUM_LIT:0>)<EOL>commands.extend(self.register.get_commands("<STR_LIT>", name=['<STR_LIT>']))<EOL>self.register_utils.send_commands(commands)<EOL><DEDENT>commands = []<EOL>self.register.set_global_register_value('<STR_LIT>', <NUM_LIT:1>)<EOL>commands.extend(self.register.get_commands("<STR_LIT>", name=['<STR_LIT>']))<EOL>chip_sn_address = self.register.get_global_register_attributes("<STR_LIT>", name="<STR_LIT>")<EOL>commands.extend(self.register.get_commands("<STR_LIT>", addresses=chip_sn_address))<EOL>self.register_utils.send_commands(commands)<EOL><DEDENT>data = self.read_data()<EOL>if data.shape[<NUM_LIT:0>] == <NUM_LIT:0>:<EOL><INDENT>logging.error('<STR_LIT>')<EOL>return<EOL><DEDENT>read_values = []<EOL>for index, word in enumerate(np.nditer(data)):<EOL><INDENT>fei4_data_word = FEI4Record(word, self.register.chip_flavor)<EOL>if fei4_data_word == '<STR_LIT>':<EOL><INDENT>fei4_next_data_word = FEI4Record(data[index + <NUM_LIT:1>], self.register.chip_flavor)<EOL>if fei4_next_data_word == '<STR_LIT>':<EOL><INDENT>read_value = fei4_next_data_word['<STR_LIT:value>']<EOL>read_values.append(read_value)<EOL>
Reading Chip S/N

    Note
    ----
    Bits [MSB-LSB] | [15]       | [14-6]       | [5-0]
    Content        | reserved   | wafer number | chip number