def rawCounter(self, StrobeEnabled = False, ResetCounter = False):
        """
        Name: U12.rawCounter(StrobeEnabled = False, ResetCounter = False)
        Args: StrobeEnable, set to True to enable strobe.
              ResetCounter, set to True to reset the counter AFTER reading.
        Desc: This command controls and reads the 32-bit counter. See
              Section 5.3 of the User's Guide.
        
        Returns: A dictionary with the following keys:
            D15toD8States, a BitField representing the states of D15-D8.
            D7toD0States, a BitField representing the states of D7-D0.
            IO3toIO0States, a BitField representing the states of IO3-IO0.
            Counter, the value of the counter
        
        Example:
        >>> import u12
        >>> d = u12.U12()
        >>> d.rawCounter()
        {
          'D15toD8States':
            <BitField object: [ D15 = Low (0), D14 = Low (0), D13 = Low (0),
                                D12 = Low (0), D11 = Low (0), D10 = Low (0),
                                D9 = Low (0), D8 = Low (0) ] >,
        
          'D7toD0States':
            <BitField object: [ D7 = Low (0), D6 = Low (0), D5 = Low (0),
                                D4 = Low (0), D3 = Low (0), D2 = Low (0),
                                D1 = Low (0), D0 = Low (0) ] >,
        
          'IO3toIO0States':
            <BitField object: [ IO3 = Low (0), IO2 = Low (0), IO1 = Low (0),
                                IO0 = Low (0) ] >,
          
          'Counter': 0
        }


        """
        command = [ 0 ] * 8
        
        bf = BitField()
        bf.bit1 = int(StrobeEnabled)
        bf.bit0 = int(ResetCounter)
        
        command[0] = int(bf)
        
        bf.fromByte(0)
        bf.bit6 = 1
        bf.bit4 = 1
        bf.bit1 = 1
        command[5] = int(bf)
        
        self.write(command)
        results = self.read()
        
        returnDict = {}
        
        if results[0] != command[5]:
            raise U12Exception(results[0] % "Expected a Counter response, got %s instead.")
        
        returnDict['D15toD8States'] = BitField(results[1], "D", list(range(15, 7, -1)), "Low", "High")
        returnDict['D7toD0States'] = BitField(results[2], "D", list(range(7, -1, -1)), "Low", "High")
        returnDict['IO3toIO0States'] = BitField((results[3] >> 4), "IO", list(range(3, -1, -1)), "Low", "High")
        
        counter = results[7]
        counter += results[6] << 8
        counter += results[5] << 16
        counter += results[4] << 24
        returnDict['Counter'] = counter
        
        return returnDict
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.rawCounter/swapped operands of `%`