def rawPulseout(self, B1 = 10, C1 = 2, B2 = 10, C2 = 2, D7ToD0PulseSelection = 1, ClearFirst = False, NumberOfPulses = 5):
        """
        Name: U12.rawPulseout( B1 = 10, C1 = 2, B2 = 10, C2 = 2,
                               D7ToD0PulseSelection = 1, ClearFirst = False,
                               NumberOfPulses = 5)
        
        Args: B1, the B component of the first half cycle
              C1, the C component of the first half cycle
              B2, the B component of the second half cycle
              C2, the C component of the second half cycle
              D7ToD0PulseSelection, which D lines to pulse.
              ClearFirst, True = Start Low.
              NumberOfPulses, the number of pulses
        
        Desc: This command creates pulses on any, or all, of D0-D7. The desired
              D lines must be set to output with some other function. See
              Section 5.7 of the User's Guide.
              
              By default, pulses D0 5 times at 400us high, then 400 us low.
        
        Returns: None
        
        Example:
        Have a jumper wire connected from D0 to CNT.
        
        >>> import u12
        >>> d = u12.U12()
        >>> d.rawDIO(D7toD0Directions = 0, UpdateDigital = True)
        >>> d.rawCounter(ResetCounter = True)
        >>> d.rawPulseout(ClearFirst = True)
        >>> print d.rawCounter()
        { 'IO3toIO0States': ... , 
          'Counter': 5, 
          'D7toD0States': ... ,
          'D15toD8States': ...
        }
        """
        command = [ 0 ] * 8
        
        command[0] = B1
        command[1] = C1
        command[2] = B2
        command[3] = C2
        command[4] = int(D7ToD0PulseSelection)
        
        # 01100100 (Pulseout)
        bf = BitField()
        bf.bit6 = 1
        bf.bit5 = 1
        bf.bit2 = 1
        
        command[5] = int(bf)
        
        bf2 = BitField( rawByte = ( NumberOfPulses >> 8 ) )
        bf2.bit7 = int(bool(ClearFirst))
        
        command[6] = int(bf2)
        command[7] = NumberOfPulses & 0xff
        
        self.write(command)
        results = self.read()
        
        if command[5] != results[5]:
            raise U12Exception("Expected Pulseout response, got %s instead." % results[5])
        
        if results[4] != 0:
            errors = BitField(rawByte = command[4], labelPrefix = "D", zeroLabel = "Ok", oneLabel = "Error")
            raise U12Exception(errors % "D7-D0 Direction error detected: %s")
        
        return None
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.rawPulseout/swapped operands of `%`