Kaco powador rs485

others protocols
Post Reply
andy
Posts: 23
Joined: Wed May 04, 2016 10:25 am

Kaco powador rs485

Post by andy » Sun Jun 18, 2017 6:33 pm

In this topic i try ti create script for monitoring with rs485 interface.

andy
Posts: 23
Joined: Wed May 04, 2016 10:25 am

Re: Kaco powador rs485

Post by andy » Tue Jun 20, 2017 2:05 pm

Code: Select all

import serial, time
ser=serial.Serial(
        port='/dev/ttyUSB0',
        baudrate=9600,
        parity=serial.PARITY_NONE,
        stopbits=serial.STOPBITS_ONE,
        bytesize=serial.EIGHTBITS,
        timeout=0.5
        )
ser.write('#010\r\n'.encode())
time.sleep(0.7)
answer = []
while ser.inWaiting() > 0:
        answer.append(ser.readline())
print(''.join(answer))
sample script (without parser yet) v 0.001

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest