Panasonic PLC mewtocol lib via serial port
Project description
pypanasonic
Table of Contents
Install
This lib contains panasonic PLC use mewtocol via serial port.
pip install regex
pip install pypanasonic
pip install pyserial
Usage
Here is an example of using it.
import serial
from pypansonic import mewtocol
#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 the function here:
write_len = ser.write(plcVer().encode('ascii'))
write_len = ser.write(switchSingleOn('R0001'))
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")
License
MIT
pypanasonic
is distributed under the terms of the MIT license.
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.6.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for pypanasonic-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbf612dc2b35d21fb55acd0c30324c694c5657c60f656073a7d341dce7e2064e |
|
MD5 | b8e32ba3a4975a3cd25c5445a6bf480d |
|
BLAKE2b-256 | 4daf4d9140e643c2e57b75a3140be13e96d29bbe3bbe11e096e997fdb2b50e69 |