Panasonic PLC mewtocol lib via serial port
Project description
Install
This lib contains panasonic PLC use mewtocol via serial port.
pip install regex
pip install pypanasonic
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")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypanasonic-0.0.2.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for pypanasonic-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24587f442c598b3f710feeb13dd4bbc16aa657344b41446ecba1dd9e5246a055 |
|
MD5 | b283562e04e7558215224b30db8a743c |
|
BLAKE2b-256 | d54968dc4278b20c393684c17269b193eba3fcd62cfbc955f96b5fba377a9ef2 |