Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

        def writeRegistersRequest(startAddr, values, unitId = None):
    numReg = len(values)
    
    for v in values:
        if not isinstance(v, int):
            raise TypeError("Value written must be an integer.")
    
    if unitId is None:
        unitId = 0xff
    
    header = _buildHeaderBytes(length = 7+(numReg*2), unitId = unitId)
    
    header += pack('>BHHB', *(16, startAddr, numReg, numReg*2) )
    
    format = '>' + 'H' * numReg
    packet = header + pack(format, *values)
    return packet
        


src/p/s/psychopy-HEAD/psychopy/iohub/devices/daq/hw/labjack/win32/python27/pylabjack/LabJackPython.py   psychopy(Download)
    def _buildWriteMultipleRegisters(self, startAddr, values, unitId = None):
        request = Modbus.writeRegistersRequest(startAddr, values, unitId)
        request = [ ord(c) for c in request ]
        numBytes = 12
 

src/p/s/psychopy-HEAD/psychopy/iohub/devices/daq/hw/labjack/win32/python26/pylabjack/LabJackPython.py   psychopy(Download)
    def _buildWriteMultipleRegisters(self, startAddr, values, unitId = None):
        request = Modbus.writeRegistersRequest(startAddr, values, unitId)
        request = [ ord(c) for c in request ]
        numBytes = 12
 

src/i/o/ioHub-HEAD/iohub/devices/daq/hw/labjack/win32/python27/pylabjack/LabJackPython.py   ioHub(Download)
    def _buildWriteMultipleRegisters(self, startAddr, values, unitId = None):
        request = Modbus.writeRegistersRequest(startAddr, values, unitId)
        request = [ ord(c) for c in request ]
        numBytes = 12
 

src/i/o/ioHub-HEAD/iohub/devices/daq/hw/labjack/win32/python26/pylabjack/LabJackPython.py   ioHub(Download)
    def _buildWriteMultipleRegisters(self, startAddr, values, unitId = None):
        request = Modbus.writeRegistersRequest(startAddr, values, unitId)
        request = [ ord(c) for c in request ]
        numBytes = 12
 

src/l/a/LabJackPython-4-24-2014/src/LabJackPython.py   LabJackPython(Download)
    def _buildWriteMultipleRegisters(self, startAddr, values, unitId = None):
        request = Modbus.writeRegistersRequest(startAddr, values, unitId)
        request = [ ord(c) for c in request ]
        numBytes = 12
 

src/l/a/LabJackPython-HEAD/src/LabJackPython.py   LabJackPython(Download)
    def _buildWriteMultipleRegisters(self, startAddr, values, unitId = None):
        request = Modbus.writeRegistersRequest(startAddr, values, unitId)
        request = [ ord(c) for c in request ]
        numBytes = 12