import re
from pymelsec import Type3E
from pymelsec.constants import DT

plc = Type3E(host="192.168.3.39", port=5010, plc_type="Q")
plc.connect("192.168.3.39", 5010)

# D500에 값 전송
plc.batch_write(ref_device="B5F", values=[1], data_type=DT.BIT)

re = plc.batch_read(ref_device="B52", read_size=1, data_type=DT.BIT)
print(re)

plc.close()