[Python] CAS-5200A returns null data via ADAM-4561 in Python despite correct connection...

Discussão em 'Python' iniciado por Stack, Maio 23, 2025.

  1. Stack

    Stack Membro Participativo

    I have CAS-5200A and ADAM 4561 and ADAM 4521, and I must get data from CAS with ADAM in python. But get data null.

    import serial
    import time

    ser = serial.Serial(
    port='COM3', # Confirmed correct port in Device Manager
    baudrate=9600,
    parity=serial.PARITY_NONE,
    stopbits=serial.STOPBITS_ONE,
    bytesize=serial.EIGHTBITS,
    timeout=1
    )

    try:
    command = b"#01\r\n" # Command format from CAS-5200A manual
    ser.write(command)
    time.sleep(0.1)
    response = ser.read_all()
    print(f"Received: {response}") # Always shows empty response

    except Exception as e:
    print(f"Error: {e}")
    finally:
    ser.close()

    Continue reading...

Compartilhe esta Página