Metadata-Version: 2.1
Name: pypanasonic
Version: 0.0.2
Summary: Panasonic PLC mewtocol lib via serial port
Author-email: Wei-zhao Lu <luweizhao09@gmail.com>, Hua lu <hualu0305@gmail.com>
Maintainer-email: Wei-zhao lu <luweizhao09@gmail.com>
Project-URL: Homepage, https://github.com/hy1stax/pypanasonic
Project-URL: Documentation, https://github.com/hy1stax/pypanasonic/README.md
Project-URL: Repository, https://github.com/hy1stax/pypanasonic.git
Project-URL: Bug Tracker, https://github.com/hy1stax/pypanasonic/issues
Project-URL: Changelog, https://github.com/hy1stax/pypanasonic/CHANGELOG.md
Keywords: Panasonic,Mewtocol,Protocol,Serial,PLC
Classifier: Programming Language :: Python
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: regex

# Install
This lib contains panasonic PLC use mewtocol via serial port.<br>
`pip install regex`<br>
`pip install pypanasonic`<br>
`pip install serial`
# Usage
Here is an example of using it.
````
import serial
import pypansonic

#Change port number fits your desired port, here is com3
ser = serial.Serial(port="COM3",
                    baudrate=9600,
                    bytesize=serial.EIGHTBITS,
                    parity=serial.PARITY_ODD,
                    stopbits=serial.STOPBITS_ONE,
                    xonxoff = True,
                    timeout=0.5)
if ser.is_open:
    print("\n"+ser.name)
    write_len = ser.write(plcVer().encode('ascii'))
    while True:
        com_message=ser.readline()
        if com_message:
            print("Port Open sucesses, message received is: ")
            print(com_message.decode('ascii'))
    ser.close()
else:
    print("Fail of open ports")

````
