Exemplo n.º 1
0
def create_port(port, baudrate, parity, stopbits, bytesize):
    client = ModbusClient(method='rtu', timeout=0.5)
    client.port = port
    client.bytesize = bytesize
    client.stopbits = stopbits
    client.baudrate = baudrate
    client.parity = parity
    return client
Exemplo n.º 2
0
def create_port(port, baudrate, parity, stopbits, bytesize):
    client = ModbusClient(method='rtu', timeout=0.5)
    client.port = port
    client.bytesize = bytesize
    client.stopbits = stopbits
    client.baudrate = baudrate
    client.parity = parity
    return client